|
CellModules
|
Class for managing molecule diffusion in a cell body. More...
#include <BodyDiffusion.hpp>
Public Member Functions | |
| BodyDiffusion () | |
| Default constructor. More... | |
| BodyDiffusion (int size) | |
| Constructor with the number of existing molecules. More... | |
| void | initNbMolecules (int n) |
| Initializes the quantities and consumptions. More... | |
| double | getQuantity (int x, int y, int mol) |
| Gets the quantity of a molecule at a specific position. More... | |
| double | getConsumption (int mol) |
| Gets the consumption of a molecule. More... | |
| std::vector< double > | getConsumptions () const |
| Gets the consumptions of all molecules. More... | |
| void | setConsumption (int mol, double value) |
| Sets the consumption of a molecule. More... | |
| DiffusionGrid * | getDiffusionGrid () |
| Gets the diffusion grid. More... | |
| void | onCellPluginLinking () |
| Hook called when the body is linked to the plugin. More... | |
| void | setCellPlugin (plugin_t *_cellPlugin) |
Protected Attributes | |
| plugin_t * | cellPlugin |
Private Attributes | |
| std::vector< double > | consumptions |
| int | nbMolecules = 0 |
Class for managing molecule diffusion in a cell body.
| cell_t | Type of the cell. |
| plugin_t | Type of the plugin. |
Definition at line 30 of file BodyDiffusion.hpp.
|
inline |
Default constructor.
Definition at line 41 of file BodyDiffusion.hpp.
|
inlineexplicit |
Constructor with the number of existing molecules.
| size | Number of existing molecules. |
Definition at line 48 of file BodyDiffusion.hpp.
|
inline |
Gets the consumption of a molecule.
| mol | Number of the molecule. |
Definition at line 83 of file BodyDiffusion.hpp.
|
inline |
Gets the consumptions of all molecules.
Definition at line 92 of file BodyDiffusion.hpp.
|
inline |
Gets the diffusion grid.
Definition at line 110 of file BodyDiffusion.hpp.
|
inline |
Gets the quantity of a molecule at a specific position.
| x | X-coordinate. |
| y | Y-coordinate. |
| mol | Number of the molecule. |
Definition at line 72 of file BodyDiffusion.hpp.
|
inline |
Initializes the quantities and consumptions.
| n | Number of existing molecules. |
Definition at line 57 of file BodyDiffusion.hpp.
|
inline |
Hook called when the body is linked to the plugin.
This hook is called when the body has access to the plugin, which happens when the cell is added to the world (w.addCell(c)). This hook can be useful for setting up Body properties based on elements from the Plugin part.
Definition at line 118 of file BodyDiffusion.hpp.
|
inlineinherited |
Definition at line 14 of file BaseBody.hpp.
|
inline |
Sets the consumption of a molecule.
| mol | Number of the molecule. |
| value | Consumption value. |
Definition at line 100 of file BodyDiffusion.hpp.
|
protectedinherited |
Definition at line 9 of file BaseBody.hpp.
|
private |
Consumption of each molecule per step
Definition at line 33 of file BodyDiffusion.hpp.
|
private |
Number of diffused molecules
Definition at line 34 of file BodyDiffusion.hpp.