DiffusionCaUpdateRule< DIM > Class Template Reference

#include <DiffusionCaUpdateRule.hpp>

Inherits AbstractCaUpdateRule< DIM >.

Collaboration diagram for DiffusionCaUpdateRule< DIM >:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

template<unsigned DIM>
class DiffusionCaUpdateRule< DIM >

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.


Constructor & Destructor Documentation

template<unsigned DIM>
DiffusionCaUpdateRule< DIM >::DiffusionCaUpdateRule ( double  diffusionConstant = 1.0  )  [inline]

Constructor.

Parameters:
diffusionConstant the diffusion constant (defaults to 1.0)

Definition at line 34 of file DiffusionCaUpdateRule.cpp.

template<unsigned DIM>
DiffusionCaUpdateRule< DIM >::~DiffusionCaUpdateRule (  )  [inline]

Destructor.

Definition at line 41 of file DiffusionCaUpdateRule.cpp.


Member Function Documentation

template<unsigned DIM>
double DiffusionCaUpdateRule< DIM >::GetDiffusionConstant (  )  [inline]
Returns:
mDiffusionConstant

Definition at line 85 of file DiffusionCaUpdateRule.cpp.

References DiffusionCaUpdateRule< DIM >::mDiffusionConstant.

template<unsigned DIM>
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().

Parameters:
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
Returns:
the new location index of the cell

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().

template<unsigned DIM>
void DiffusionCaUpdateRule< DIM >::OutputUpdateRuleParameters ( out_stream &  rParamsFile  )  [inline, virtual]

Overridden OutputUpdateRuleParameters() method.

Parameters:
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.

template<unsigned DIM>
template<class Archive >
void DiffusionCaUpdateRule< DIM >::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, private]

Serialize the object and its member variables.

Parameters:
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.


Friends And Related Function Documentation

template<unsigned DIM>
friend class boost::serialization::access [friend]

Needed for serialization.

Reimplemented from AbstractCaUpdateRule< DIM >.

Definition at line 56 of file DiffusionCaUpdateRule.hpp.


Member Data Documentation

template<unsigned DIM>
double DiffusionCaUpdateRule< DIM >::mDiffusionConstant [private]

The documentation for this class was generated from the following files:
Generated on Thu Dec 22 13:04:16 2011 for Chaste by  doxygen 1.6.3