Chaste Release::3.1
|
#include <OnLatticeSimulation.hpp>
Public Member Functions | |
OnLatticeSimulation (AbstractCellPopulation< DIM > &rCellPopulation, bool deleteCellPopulationInDestructor=false, bool initialiseCells=true) | |
void | AddMultipleCaUpdateRule (boost::shared_ptr< AbstractMultipleCaUpdateRule< DIM > > pUpdateRule) |
void | RemoveAllMultipleCaUpdateRules () |
void | AddPottsUpdateRule (boost::shared_ptr< AbstractPottsUpdateRule< DIM > > pUpdateRule) |
void | RemoveAllPottsUpdateRules () |
bool | GetOutputCellVelocities () |
void | SetOutputCellVelocities (bool outputCellVelocities) |
virtual void | SetupSolve () |
virtual void | UpdateAtEndOfSolve () |
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 |
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 |
||
) |
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 >::AddMultipleCaUpdateRule | ( | boost::shared_ptr< AbstractMultipleCaUpdateRule< DIM > > | pUpdateRule | ) |
Add an update rule to be used in this simulation.
pUpdateRule | shared pointer to a multiple CA update rule law |
Definition at line 62 of file OnLatticeSimulation.cpp.
References MultipleCaBasedCellPopulation< DIM >::AddUpdateRule().
void OnLatticeSimulation< DIM >::AddPottsUpdateRule | ( | boost::shared_ptr< AbstractPottsUpdateRule< DIM > > | pUpdateRule | ) |
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 80 of file OnLatticeSimulation.cpp.
References PottsBasedCellPopulation< DIM >::AddUpdateRule().
c_vector< double, DIM > OnLatticeSimulation< DIM >::CalculateCellDivisionVector | ( | CellPtr | pParentCell | ) | [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 98 of file OnLatticeSimulation.cpp.
bool OnLatticeSimulation< DIM >::GetOutputCellVelocities | ( | ) |
Overridden OutputAdditionalSimulationSetup() method. Outputs the update rule information.
Definition at line 192 of file OnLatticeSimulation.cpp.
void OnLatticeSimulation< DIM >::OutputAdditionalSimulationSetup | ( | out_stream & | rParamsFile | ) | [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 233 of file OnLatticeSimulation.cpp.
References MultipleCaBasedCellPopulation< DIM >::rGetUpdateRuleCollection(), and PottsBasedCellPopulation< DIM >::rGetUpdateRuleCollection().
void OnLatticeSimulation< DIM >::OutputSimulationParameters | ( | out_stream & | rParamsFile | ) | [virtual] |
Overridden OutputSimulationParameters() method.
rParamsFile | the file stream to which the parameters are output |
Implements AbstractCellBasedSimulation< DIM >.
Definition at line 269 of file OnLatticeSimulation.cpp.
References AbstractCellBasedSimulation< ELEMENT_DIM, SPACE_DIM >::OutputSimulationParameters().
void OnLatticeSimulation< DIM >::RemoveAllMultipleCaUpdateRules | ( | ) |
Method to remove all the MultipleCaUpdateRules
Definition at line 71 of file OnLatticeSimulation.cpp.
References MultipleCaBasedCellPopulation< DIM >::RemoveAllUpdateRules().
void OnLatticeSimulation< DIM >::RemoveAllPottsUpdateRules | ( | ) |
Method to remove all the PottsUpdateRules
Definition at line 89 of file OnLatticeSimulation.cpp.
References PottsBasedCellPopulation< DIM >::RemoveAllUpdateRules().
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.
References OnLatticeSimulation< DIM >::mOutputCellVelocities.
void OnLatticeSimulation< DIM >::SetOutputCellVelocities | ( | bool | outputCellVelocities | ) |
Set mOutputCellVelocities.
outputCellVelocities | the new value of mOutputCellVelocities |
Definition at line 198 of file OnLatticeSimulation.cpp.
void OnLatticeSimulation< DIM >::SetupSolve | ( | ) | [virtual] |
Overridden SetupSolve() method to setup the cell velocities file.
Reimplemented from AbstractCellBasedSimulation< DIM >.
Definition at line 173 of file OnLatticeSimulation.cpp.
References OutputFileHandler::OpenOutputFile().
void OnLatticeSimulation< DIM >::UpdateAtEndOfSolve | ( | ) | [virtual] |
Overridden UpdateAtEndOfSolve() method to close the cell velocities file.
Reimplemented from AbstractCellBasedSimulation< DIM >.
Definition at line 183 of file OnLatticeSimulation.cpp.
void OnLatticeSimulation< DIM >::UpdateCellLocationsAndTopology | ( | ) | [protected, virtual] |
Overridden UpdateCellLocationsAndTopology() method.
If using a PottsBasedCellPopulation, this method performs Monte Carlo sampling.
Implements AbstractCellBasedSimulation< DIM >.
Definition at line 114 of file OnLatticeSimulation.cpp.
References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Begin(), GenericEventHandler< 11, CellBasedEventHandler >::BeginEvent(), GenericEventHandler< 11, CellBasedEventHandler >::EndEvent(), SimulationTime::GetTime(), SimulationTime::GetTimeStepsElapsed(), SimulationTime::Instance(), and AbstractOnLatticeCellPopulation< DIM >::UpdateCellLocations().
void OnLatticeSimulation< DIM >::UpdateCellPopulation | ( | ) | [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 204 of file OnLatticeSimulation.cpp.
References SimulationTime::Instance(), NEVER_REACHED, and AbstractCellBasedSimulation< ELEMENT_DIM, SPACE_DIM >::UpdateCellPopulation().
void OnLatticeSimulation< DIM >::WriteVisualizerSetupFile | ( | ) | [protected, virtual] |
Overridden WriteVisualizerSetupFile() method.
Reimplemented from AbstractCellBasedSimulation< DIM >.
Definition at line 105 of file OnLatticeSimulation.cpp.
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from AbstractCellBasedSimulation< DIM >.
Definition at line 64 of file OnLatticeSimulation.hpp.
bool OnLatticeSimulation< DIM >::mOutputCellVelocities [protected] |
Whether to write the cell velocities to a file. Initialised to false in constuctor.
Definition at line 84 of file OnLatticeSimulation.hpp.
Referenced by OnLatticeSimulation< DIM >::serialize().
out_stream OnLatticeSimulation< DIM >::mpCellVelocitiesFile [protected] |
Results file cell velocities.
Definition at line 87 of file OnLatticeSimulation.hpp.