1#ifndef ONKO3D_3_0_PLUGINDIFFUSION_HPP
2#define ONKO3D_3_0_PLUGINDIFFUSION_HPP
28 template<
typename cell_t>
78 template<
typename world_t>
80 for (cell_t *c : w->newCells){
81 c->getBody().setDiffusionGrid(&
grid);
93 template<
typename world_t>
molecules 2D Grid manager
Class representing a grid for molecule diffusion.
void setDx(double _dx)
Sets the grid cell size.
void setAccuracy(double a)
Sets the diffusion accuracy.
void updateBoundary(world_t *w)
Updates the grid boundaries and consumptions.
void addMolecule(int n, Molecule m)
Adds a molecule to the grid.
void computeMolecules(world_t *w)
Updates the quantities of molecules in the grid.
Template class for a grid diffusion-based plugin.
PluginDiffusion(double dx, double accuracy)
Constructor with grid parameters.
void addMolecule(int n, Molecule m)
Adds a new molecule to the grid.
void preBehaviorUpdate(world_t *w)
Hook called before the behavior update of the world.
DiffusionGrid * getGrid()
Gets the diffusion grid.
void onAddCell(world_t *w)
Hook called when a cell is added to the world.
void setAccuracy(double a)
Sets the diffusion accuracy.
void setDx(double dx)
Sets the grid cell size.
PluginDiffusion()=default
Default constructor.
Namespace for diffusion-related structures and classes.
Structure representing a molecule in the diffusion grid.