molecules grid based class
More...
#include <DiffusionGrid.hpp>
molecules grid based class
Definition at line 70 of file DiffusionGrid.hpp.
◆ DiffusionGrid()
Diffusion2D::DiffusionGrid::DiffusionGrid |
( |
| ) |
|
|
default |
◆ addMolecule()
void Diffusion2D::DiffusionGrid::addMolecule |
( |
int |
n, |
|
|
Molecule |
m |
|
) |
| |
|
inline |
molecule adder
- Parameters
-
n | : number of the molecule |
m | : molecule to be added |
Definition at line 251 of file DiffusionGrid.hpp.
◆ computeMolecules()
template<typename world_t >
void Diffusion2D::DiffusionGrid::computeMolecules |
( |
world_t * |
w | ) |
|
|
inline |
molecules quantities updater
- Template Parameters
-
- Parameters
-
Definition at line 287 of file DiffusionGrid.hpp.
◆ computeStep()
void Diffusion2D::DiffusionGrid::computeStep |
( |
| ) |
|
|
inlineprivate |
molecules updater
updates the quantity of a molecule for each cell and returns the total amount of this molecule
Definition at line 159 of file DiffusionGrid.hpp.
◆ diffuse()
void Diffusion2D::DiffusionGrid::diffuse |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inlineprivate |
apply diffusion to the molecule m at position (x,y)
- Parameters
-
Definition at line 103 of file DiffusionGrid.hpp.
◆ getGrid()
◆ getHeight()
int Diffusion2D::DiffusionGrid::getHeight |
( |
| ) |
const |
|
inline |
◆ getMolecule()
double Diffusion2D::DiffusionGrid::getMolecule |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
m |
|
) |
| |
|
inline |
molecule quantity getter
- Parameters
-
x | : x pos |
y | : y pos |
m | : number of the molecule |
- Returns
- double
Definition at line 220 of file DiffusionGrid.hpp.
◆ getMolecules()
◆ getWidth()
int Diffusion2D::DiffusionGrid::getWidth |
( |
| ) |
const |
|
inline |
◆ initGrid() [1/2]
void Diffusion2D::DiffusionGrid::initGrid |
( |
int |
size | ) |
|
|
inline |
◆ initGrid() [2/2]
void Diffusion2D::DiffusionGrid::initGrid |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
|
inline |
grid initializer
- Parameters
-
w | : grid width |
h | : grid height
|
Definition at line 262 of file DiffusionGrid.hpp.
◆ preStep()
void Diffusion2D::DiffusionGrid::preStep |
( |
| ) |
|
|
inlineprivate |
◆ setTore()
void Diffusion2D::DiffusionGrid::setTore |
( |
bool |
x, |
|
|
bool |
y |
|
) |
| |
|
inline |
◆ setToreX()
void Diffusion2D::DiffusionGrid::setToreX |
( |
bool |
b | ) |
|
|
inline |
◆ setToreY()
void Diffusion2D::DiffusionGrid::setToreY |
( |
bool |
b | ) |
|
|
inline |
◆ updateConsumptions()
template<typename world_t >
void Diffusion2D::DiffusionGrid::updateConsumptions |
( |
world_t * |
w | ) |
|
|
inlineprivate |
consumptions updater
- Template Parameters
-
- Parameters
-
Definition at line 174 of file DiffusionGrid.hpp.
◆ grid
◆ height
int Diffusion2D::DiffusionGrid::height = 10 |
|
private |
◆ molecules
◆ moleculesDict
unordered_map<int,int> Diffusion2D::DiffusionGrid::moleculesDict |
◆ toreX
bool Diffusion2D::DiffusionGrid::toreX = true |
|
private |
◆ toreY
bool Diffusion2D::DiffusionGrid::toreY = true |
|
private |
◆ width
int Diffusion2D::DiffusionGrid::width = 10 |
|
private |
The documentation for this class was generated from the following file: