#include <OnLatticeSimulation.hpp>
Inherits AbstractCellBasedSimulation< DIM >.
Public Member Functions | |
OnLatticeSimulation (AbstractCellPopulation< DIM > &rCellPopulation, bool deleteCellPopulationInDestructor=false, bool initialiseCells=true) | |
void | AddCaUpdateRule (boost::shared_ptr< AbstractCaUpdateRule< DIM > > pUpdateRule) |
void | RemoveAllCaUpdateRules () |
void | AddPottsUpdateRule (boost::shared_ptr< AbstractPottsUpdateRule< DIM > > pUpdateRule) |
void | RemoveAllPottsUpdateRules () |
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 () |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Friends | |
class | boost::serialization::access |
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 59 of file OnLatticeSimulation.hpp.
OnLatticeSimulation< DIM >::OnLatticeSimulation | ( | AbstractCellPopulation< DIM > & | rCellPopulation, | |
bool | deleteCellPopulationInDestructor = false , |
|||
bool | initialiseCells = true | |||
) | [inline] |
Constructor.
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 45 of file OnLatticeSimulation.cpp.
References EXCEPTION, and AbstractCellBasedSimulation< DIM >::mDt.
void OnLatticeSimulation< DIM >::AddCaUpdateRule | ( | boost::shared_ptr< AbstractCaUpdateRule< DIM > > | pUpdateRule | ) | [inline] |
Add an update rule to be used in this simulation.
pUpdateRule | shared pointer to a CA update rule law |
Definition at line 61 of file OnLatticeSimulation.cpp.
References AbstractCellBasedSimulation< DIM >::mrCellPopulation.
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).
pUpdateRule | shared pointer to a Potts update rule law |
Definition at line 79 of file OnLatticeSimulation.cpp.
References AbstractCellBasedSimulation< DIM >::mrCellPopulation.
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.
pParentCell | the parent cell |
Implements AbstractCellBasedSimulation< DIM >.
Definition at line 97 of file OnLatticeSimulation.cpp.
void OnLatticeSimulation< DIM >::OutputAdditionalSimulationSetup | ( | out_stream & | rParamsFile | ) | [inline, virtual] |
Overridden OutputAdditionalSimulationSetup() method to output the force and cell population boundary condition information.
rParamsFile | the file stream to which the parameters are output |
Reimplemented from AbstractCellBasedSimulation< DIM >.
Definition at line 151 of file OnLatticeSimulation.cpp.
References AbstractCellBasedSimulation< DIM >::mrCellPopulation.
void OnLatticeSimulation< DIM >::OutputSimulationParameters | ( | out_stream & | rParamsFile | ) | [inline, virtual] |
Overridden OutputSimulationParameters() method.
rParamsFile | the file stream to which the parameters are output |
Implements AbstractCellBasedSimulation< DIM >.
Definition at line 187 of file OnLatticeSimulation.cpp.
void OnLatticeSimulation< DIM >::RemoveAllCaUpdateRules | ( | ) | [inline] |
Method to remove all the CaUpdateRules
Definition at line 70 of file OnLatticeSimulation.cpp.
References AbstractCellBasedSimulation< DIM >::mrCellPopulation.
void OnLatticeSimulation< DIM >::RemoveAllPottsUpdateRules | ( | ) | [inline] |
Method to remove all the PottsUpdateRules
Definition at line 88 of file OnLatticeSimulation.cpp.
References AbstractCellBasedSimulation< DIM >::mrCellPopulation.
void OnLatticeSimulation< DIM >::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Serialize the object and any member variables.
archive | the archive | |
version | the current version of this class |
Reimplemented from AbstractCellBasedSimulation< DIM >.
Definition at line 72 of file OnLatticeSimulation.hpp.
void OnLatticeSimulation< DIM >::UpdateCellLocationsAndTopology | ( | ) | [inline, protected, virtual] |
Overridden UpdateCellLocationsAndTopology() method.
If using a PottsBasedCellPopulation, this method performs Monte Carlo sampling.
Implements AbstractCellBasedSimulation< DIM >.
Definition at line 113 of file OnLatticeSimulation.cpp.
References GenericEventHandler< 11, CellBasedEventHandler >::BeginEvent(), GenericEventHandler< 11, CellBasedEventHandler >::EndEvent(), AbstractCellBasedSimulation< DIM >::mDt, and AbstractCellBasedSimulation< DIM >::mrCellPopulation.
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 122 of file OnLatticeSimulation.cpp.
References SimulationTime::Instance(), AbstractCellBasedSimulation< DIM >::mInitialiseCells, AbstractCellBasedSimulation< DIM >::mrCellPopulation, and NEVER_REACHED.
void OnLatticeSimulation< DIM >::WriteVisualizerSetupFile | ( | ) | [inline, protected, virtual] |
Overridden WriteVisualizerSetupFile() method.
Reimplemented from AbstractCellBasedSimulation< DIM >.
Definition at line 104 of file OnLatticeSimulation.cpp.
References AbstractCellBasedSimulation< DIM >::mpVizSetupFile, and AbstractCellBasedSimulation< DIM >::mrCellPopulation.
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from AbstractCellBasedSimulation< DIM >.
Definition at line 64 of file OnLatticeSimulation.hpp.