#include <DiffusionCaUpdateRule.hpp>
Inherits AbstractCaUpdateRule< DIM >.
Public Member Functions | |
DiffusionCaUpdateRule (double diffusionConstant=1.0) | |
~DiffusionCaUpdateRule () | |
unsigned | GetNewLocationOfCell (unsigned currentLocationIndex, CaBasedCellPopulation< DIM > &rCellPopulation, double dt) |
double | GetDiffusionConstant () |
void | OutputUpdateRuleParameters (out_stream &rParamsFile) |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Private Attributes | |
double | mDiffusionConstant |
Friends | |
class | boost::serialization::access |
An update rule class to model diffusion on the lattice.
A diffusion coefficient (defaulting to 1.0) is passed into the constructor. At each time step, a uniform random number r_i is generated for each cell i; if r_i > D*dt, where D denotes the diffusion coefficient and dt denotes the time step, then the cell is moved to a random free neighbouring site (if there are no free neighbouring sites, then the cell is not moved).
Definition at line 48 of file DiffusionCaUpdateRule.hpp.
DiffusionCaUpdateRule< DIM >::DiffusionCaUpdateRule | ( | double | diffusionConstant = 1.0 |
) | [inline] |
Constructor.
diffusionConstant | the diffusion constant (defaults to 1.0) |
Definition at line 34 of file DiffusionCaUpdateRule.cpp.
DiffusionCaUpdateRule< DIM >::~DiffusionCaUpdateRule | ( | ) | [inline] |
Destructor.
Definition at line 41 of file DiffusionCaUpdateRule.cpp.
double DiffusionCaUpdateRule< DIM >::GetDiffusionConstant | ( | ) | [inline] |
Definition at line 85 of file DiffusionCaUpdateRule.cpp.
References DiffusionCaUpdateRule< DIM >::mDiffusionConstant.
unsigned DiffusionCaUpdateRule< DIM >::GetNewLocationOfCell | ( | unsigned | currentLocationIndex, | |
CaBasedCellPopulation< DIM > & | rCellPopulation, | |||
double | dt | |||
) | [inline, virtual] |
Overridden GetNewLocationOfCell() method.
This randomly moves the cell in one of the possible directions defined by the cell population method GetNeighbouringNodeIndices().
currentLocationIndex | the current location index corresponding to a cell | |
rCellPopulation | reference to the cell population | |
dt | simulation time step, used to calculate the probability of movement |
Implements AbstractCaUpdateRule< DIM >.
Definition at line 46 of file DiffusionCaUpdateRule.cpp.
References EXCEPTION, CaBasedCellPopulation< DIM >::GetFreeNeighbouringNodeIndices(), RandomNumberGenerator::Instance(), CaBasedCellPopulation< DIM >::IsEmptySite(), DiffusionCaUpdateRule< DIM >::mDiffusionConstant, and RandomNumberGenerator::randMod().
void DiffusionCaUpdateRule< DIM >::OutputUpdateRuleParameters | ( | out_stream & | rParamsFile | ) | [inline, virtual] |
Overridden OutputUpdateRuleParameters() method.
rParamsFile | the file stream to which the parameters are output |
Implements AbstractCaUpdateRule< DIM >.
Definition at line 91 of file DiffusionCaUpdateRule.cpp.
References DiffusionCaUpdateRule< DIM >::mDiffusionConstant.
void DiffusionCaUpdateRule< DIM >::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Serialize the object and its member variables.
archive | the archive | |
version | the current version of this class |
Reimplemented from AbstractCaUpdateRule< DIM >.
Definition at line 64 of file DiffusionCaUpdateRule.hpp.
References DiffusionCaUpdateRule< DIM >::mDiffusionConstant.
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from AbstractCaUpdateRule< DIM >.
Definition at line 56 of file DiffusionCaUpdateRule.hpp.
double DiffusionCaUpdateRule< DIM >::mDiffusionConstant [private] |
Diffusion constant.
Definition at line 53 of file DiffusionCaUpdateRule.hpp.
Referenced by DiffusionCaUpdateRule< DIM >::GetDiffusionConstant(), DiffusionCaUpdateRule< DIM >::GetNewLocationOfCell(), DiffusionCaUpdateRule< DIM >::OutputUpdateRuleParameters(), and DiffusionCaUpdateRule< DIM >::serialize().