1#ifndef ONKO3D_3_0_BODYDIFFUSION_HPP
2#define ONKO3D_3_0_BODYDIFFUSION_HPP
10#include "../../../../src/core/BaseBody.hpp"
12#include <unordered_map>
29 template<
typename cell_t,
class plugin_t>
Manages a 2D grid for molecule diffusion.
Class for managing molecule diffusion in a cell body.
double getQuantity(int x, int y, int mol)
Gets the quantity of a molecule at a specific position.
std::vector< double > getConsumptions() const
Gets the consumptions of all molecules.
void onCellPluginLinking()
Hook called when the body is linked to the plugin.
std::vector< double > consumptions
double getConsumption(int mol)
Gets the consumption of a molecule.
BodyDiffusion()
Default constructor.
BodyDiffusion(int size)
Constructor with the number of existing molecules.
void setConsumption(int mol, double value)
Sets the consumption of a molecule.
void initNbMolecules(int n)
Initializes the quantities and consumptions.
DiffusionGrid * getDiffusionGrid()
Gets the diffusion grid.
Manages a grid of molecules for diffusion.
double getMolecule(int x, int y, int m)
Gets the quantity of a molecule at a specific position.
std::unordered_map< int, int > moleculesDict
size_t size() const
Returns the number of elements in the vector.
Namespace for 2D diffusion-related classes and functions.
Provides common mathematical functions and vector operations.