OnLatticeSimulation< DIM > Class Template Reference

#include <OnLatticeSimulation.hpp>

Inherits AbstractCellBasedSimulation< DIM >.

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

List of all members.

Public Member Functions

 OnLatticeSimulation (AbstractCellPopulation< DIM > &rCellPopulation, bool deleteCellPopulationInDestructor=false, bool initialiseCells=true)
void AddCaUpdateRule (boost::shared_ptr< AbstractCaUpdateRule< DIM > > pUpdateRule)
void AddPottsUpdateRule (boost::shared_ptr< AbstractPottsUpdateRule< DIM > > pUpdateRule)
bool GetOutputCellVelocities ()
void SetOutputCellVelocities (bool outputCellVelocities)
virtual void SetupSolve ()
virtual void AfterSolve ()
void OutputAdditionalSimulationSetup (out_stream &rParamsFile)
void OutputSimulationParameters (out_stream &rParamsFile)

Protected Member Functions

void UpdateCellPopulation ()
void UpdateCellLocationsAndTopology ()
virtual c_vector< double, DIM > CalculateCellDivisionVector (CellPtr pParentCell)
virtual void WriteVisualizerSetupFile ()

Protected Attributes

bool mOutputCellVelocities
out_stream mpCellVelocitiesFile

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)

Friends

class boost::serialization::access

Detailed Description

template<unsigned DIM>
class OnLatticeSimulation< DIM >

Run an on-lattice 2D or 3D cell-based simulation.

The OnLatticeSimulation is constructed with a CellPopulation, which updates the correspondence between each Cell and its spatial representation and handles cell division (governed by the CellCycleModel associated with each cell). Once constructed, one or more Update rules may be passed to the OnLatticeSimulation object, to define the processes which update cells in the CellPopulation. Similarly, one or more CellKillers may be passed to the OnLatticeSimulation object to specify conditions in which Cells may die.

Definition at line 52 of file OnLatticeSimulation.hpp.


Constructor & Destructor Documentation

template<unsigned DIM>
OnLatticeSimulation< DIM >::OnLatticeSimulation ( AbstractCellPopulation< DIM > &  rCellPopulation,
bool  deleteCellPopulationInDestructor = false,
bool  initialiseCells = true 
) [inline]

Constructor.

Parameters:
rCellPopulation A cell population object
deleteCellPopulationInDestructor Whether to delete the cell population on destruction to free up memory (defaults to false)
initialiseCells Whether to initialise cells (defaults to true, set to false when loading from an archive)

Definition at line 38 of file OnLatticeSimulation.cpp.

References EXCEPTION, and AbstractCellBasedSimulation< DIM >::mDt.


Member Function Documentation

template<unsigned DIM>
void OnLatticeSimulation< DIM >::AddCaUpdateRule ( boost::shared_ptr< AbstractCaUpdateRule< DIM > >  pUpdateRule  )  [inline]

Add an update rule to be used in this simulation.

Parameters:
pUpdateRule shared pointer to a CA update rule law

Definition at line 55 of file OnLatticeSimulation.cpp.

References AbstractCellBasedSimulation< DIM >::mrCellPopulation.

template<unsigned DIM>
void OnLatticeSimulation< DIM >::AddPottsUpdateRule ( boost::shared_ptr< AbstractPottsUpdateRule< DIM > >  pUpdateRule  )  [inline]

Add an update rule to be used in this simulation (use this to set the Hamiltonian).

Parameters:
pUpdateRule shared pointer to a Potts update rule law

Definition at line 64 of file OnLatticeSimulation.cpp.

References AbstractCellBasedSimulation< DIM >::mrCellPopulation.

template<unsigned DIM>
void OnLatticeSimulation< DIM >::AfterSolve (  )  [inline, virtual]

Overridden AfterSolve() method to close the cell velocities file.

Reimplemented from AbstractCellBasedSimulation< DIM >.

Definition at line 161 of file OnLatticeSimulation.cpp.

References OnLatticeSimulation< DIM >::mOutputCellVelocities, and OnLatticeSimulation< DIM >::mpCellVelocitiesFile.

template<unsigned DIM>
c_vector< double, DIM > OnLatticeSimulation< DIM >::CalculateCellDivisionVector ( CellPtr  pParentCell  )  [inline, protected, virtual]

Overridden CalculateCellDivisionVector() method for determining how cell division occurs. This method returns a vector which is then passed into the CellPopulation method AddCell(). This method may be overridden by subclasses.

Parameters:
pParentCell the parent cell
Returns:
a vector containing information on cell division.

Todo:
do something for Potts models here

Implements AbstractCellBasedSimulation< DIM >.

Definition at line 73 of file OnLatticeSimulation.cpp.

template<unsigned DIM>
bool OnLatticeSimulation< DIM >::GetOutputCellVelocities (  )  [inline]

Overridden OutputAdditionalSimulationSetup() method. Outputs the update rule information.

Definition at line 173 of file OnLatticeSimulation.cpp.

References OnLatticeSimulation< DIM >::mOutputCellVelocities.

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

Overridden OutputAdditionalSimulationSetup() method to output the force and cell population boundary condition information.

Parameters:
rParamsFile the file stream to which the parameters are output

Reimplemented from AbstractCellBasedSimulation< DIM >.

Definition at line 213 of file OnLatticeSimulation.cpp.

References AbstractCellBasedSimulation< DIM >::mrCellPopulation.

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

Overridden OutputSimulationParameters() method.

Parameters:
rParamsFile the file stream to which the parameters are output

Implements AbstractCellBasedSimulation< DIM >.

Definition at line 245 of file OnLatticeSimulation.cpp.

References OnLatticeSimulation< DIM >::mOutputCellVelocities.

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

Serialize the object and any member variables.

Parameters:
archive the archive
version the current version of this class

Reimplemented from AbstractCellBasedSimulation< DIM >.

Definition at line 65 of file OnLatticeSimulation.hpp.

References OnLatticeSimulation< DIM >::mOutputCellVelocities.

template<unsigned DIM>
void OnLatticeSimulation< DIM >::SetOutputCellVelocities ( bool  outputCellVelocities  )  [inline]

Set mOutputCellVelocities.

Parameters:
outputCellVelocities the new value of mOutputCellVelocities

Definition at line 179 of file OnLatticeSimulation.cpp.

References OnLatticeSimulation< DIM >::mOutputCellVelocities.

template<unsigned DIM>
void OnLatticeSimulation< DIM >::SetupSolve (  )  [inline, virtual]
template<unsigned DIM>
void OnLatticeSimulation< DIM >::UpdateCellLocationsAndTopology (  )  [inline, protected, virtual]
template<unsigned DIM>
void OnLatticeSimulation< DIM >::UpdateCellPopulation (  )  [inline, protected, virtual]

Overridden UpdateCellPopulation() method.

If using a CaBasedCellPopulation, this method does nothing if at the start of a simulation that has just been loaded, to ensure consistency in random number generation.

Reimplemented from AbstractCellBasedSimulation< DIM >.

Definition at line 186 of file OnLatticeSimulation.cpp.

References SimulationTime::Instance(), AbstractCellBasedSimulation< DIM >::mInitialiseCells, and AbstractCellBasedSimulation< DIM >::mrCellPopulation.

template<unsigned DIM>
void OnLatticeSimulation< DIM >::WriteVisualizerSetupFile (  )  [inline, protected, virtual]

Friends And Related Function Documentation

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

Needed for serialization.

Reimplemented from AbstractCellBasedSimulation< DIM >.

Definition at line 57 of file OnLatticeSimulation.hpp.


Member Data Documentation

template<unsigned DIM>
bool OnLatticeSimulation< DIM >::mOutputCellVelocities [protected]
template<unsigned DIM>
out_stream OnLatticeSimulation< DIM >::mpCellVelocitiesFile [protected]

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