CellModules
|
Template class for a grid diffusion-based plugin. More...
#include <PluginDiffusion.hpp>
Public Member Functions | |
PluginDiffusion ()=default | |
Default constructor. More... | |
PluginDiffusion (double dx, double accuracy) | |
Constructor with grid parameters. More... | |
void | setDx (double dx) |
Sets the grid cell size. More... | |
void | setAccuracy (double a) |
Sets the diffusion accuracy. More... | |
DiffusionGrid * | getGrid () |
Gets the diffusion grid. More... | |
void | addMolecule (int n, Molecule m) |
Adds a new molecule to the grid. More... | |
template<typename world_t > | |
void | onAddCell (world_t *w) |
Hook called when a cell is added to the world. More... | |
template<typename world_t > | |
void | preBehaviorUpdate (world_t *w) |
Hook called before the behavior update of the world. More... | |
Private Attributes | |
DiffusionGrid | grid |
Template class for a grid diffusion-based plugin.
cell_t | Type of the cell used in the grid. |
Definition at line 29 of file PluginDiffusion.hpp.
|
default |
Default constructor.
|
inline |
Constructor with grid parameters.
dx | Grid cell size |
accuracy | Diffusion accuracy |
Definition at line 46 of file PluginDiffusion.hpp.
|
inline |
Adds a new molecule to the grid.
Definition at line 71 of file PluginDiffusion.hpp.
|
inline |
Gets the diffusion grid.
Definition at line 64 of file PluginDiffusion.hpp.
|
inline |
Hook called when a cell is added to the world.
world_t | Type of the world |
w | Pointer to the world |
Definition at line 79 of file PluginDiffusion.hpp.
|
inline |
Hook called before the behavior update of the world.
Computes and updates the molecule quantities for each cell.
world_t | Type of the world |
w | Pointer to the world |
Definition at line 94 of file PluginDiffusion.hpp.
|
inline |
Sets the diffusion accuracy.
a | Diffusion accuracy |
Definition at line 58 of file PluginDiffusion.hpp.
|
inline |
Sets the grid cell size.
dx | Grid cell size |
Definition at line 52 of file PluginDiffusion.hpp.
|
private |
Grid for diffusion calculations
Definition at line 32 of file PluginDiffusion.hpp.