Chaste Release::3.1
|
#include <CryptSimulation2d.hpp>
Public Member Functions | |
CryptSimulation2d (AbstractCellPopulation< 2 > &rCellPopulation, bool deleteCellPopulationInDestructor=false, bool initialiseCells=true) | |
virtual | ~CryptSimulation2d () |
void | UseJiggledBottomCells () |
void | SetBottomCellAncestors () |
void | OutputSimulationParameters (out_stream &rParamsFile) |
Protected Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
c_vector< double, 2 > | CalculateCellDivisionVector (CellPtr pParentCell) |
void | SetupWriteBetaCatenin () |
virtual void | WriteBetaCatenin (double time) |
void | SetupSolve () |
void | UpdateAtEndOfTimeStep () |
void | UpdateAtEndOfSolve () |
Protected Attributes | |
bool | mWriteBetaCatenin |
out_stream | mVizBetaCateninResultsFile |
bool | mUsingMeshBasedCellPopulation |
Friends | |
class | TestCryptSimulation2dWithMeshBasedCellPopulation |
class | TestCryptSimulation2dWithVertexBasedCellPopulation |
class | boost::serialization::access |
A 2D crypt simulation object. For more details on the crypt geometry, see the papers by van Leeuwen et al (2009) [doi:10.1111/j.1365-2184.2009.00627.x] and Osborne et al (2010) [doi:10.1098/rsta.2010.0173].
Definition at line 53 of file CryptSimulation2d.hpp.
CryptSimulation2d::CryptSimulation2d | ( | AbstractCellPopulation< 2 > & | 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 42 of file CryptSimulation2d.cpp.
References OffLatticeSimulation< 2 >::AddCellPopulationBoundaryCondition(), EXCEPTION, MAKE_PTR_ARGS, AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >::mDeleteCellPopulationInDestructor, AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >::mrCellPopulation, mUsingMeshBasedCellPopulation, and mWriteBetaCatenin.
CryptSimulation2d::~CryptSimulation2d | ( | ) | [virtual] |
Destructor.
This frees the CryptSimulationBoundaryCondition.
Definition at line 85 of file CryptSimulation2d.cpp.
c_vector< double, 2 > CryptSimulation2d::CalculateCellDivisionVector | ( | CellPtr | pParentCell | ) | [protected, virtual] |
In the case of a MeshBasedCellPopulationWithGhostNodes, this method calculates the new locations of a dividing cell's cell centres. The node correspond to the dividing cell is moved a bit and the co-ordinates of the new node are returned. This is done by drawing a random direction (0->2PI) and placing the parent and daughter nodes in opposing directions along this axis.
In the case of a VertexBasedCellPopulation, by default this method returns the zero vector. If the parent cell is a stem cell, then this method returns the vector (0,1). This is then used by the VertexBasedCellPopulation method AddCell() as the axis along which the cell divides.
pParentCell | the parent cell |
Reimplemented from OffLatticeSimulation< 2 >.
Definition at line 89 of file CryptSimulation2d.cpp.
References RandomNumberGenerator::Instance(), WntConcentration< DIM >::IsWntSetUp(), AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >::mrCellPopulation, mUsingMeshBasedCellPopulation, and RandomNumberGenerator::ranf().
void CryptSimulation2d::OutputSimulationParameters | ( | out_stream & | rParamsFile | ) | [virtual] |
Outputs simulation parameters to file
As this method is pure virtual, it must be overridden in subclasses.
rParamsFile | the file stream to which the parameters are output |
Reimplemented from OffLatticeSimulation< 2 >.
Definition at line 289 of file CryptSimulation2d.cpp.
References OffLatticeSimulation< 2 >::mBoundaryConditions, and AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >::mrCellPopulation.
void CryptSimulation2d::serialize | ( | Archive & | archive, |
const unsigned int | version | ||
) | [inline, protected] |
Archive the simulation and member variable.
archive | the archive |
version | the current version of this class |
Reimplemented from OffLatticeSimulation< 2 >.
Definition at line 70 of file CryptSimulation2d.hpp.
References SerializableSingleton< SINGLETON_CLASS >::GetSerializationWrapper(), and mWriteBetaCatenin.
void CryptSimulation2d::SetBottomCellAncestors | ( | ) |
Sets the Ancestor index of all the cells at the bottom in order, can be used to trace clonal populations.
Definition at line 263 of file CryptSimulation2d.cpp.
References MAKE_PTR_ARGS, AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >::mrCellPopulation, and mUsingMeshBasedCellPopulation.
void CryptSimulation2d::SetupSolve | ( | ) | [protected, virtual] |
Overridden SetupSolve() method.
Write initial beta catenin results to file if required.
Reimplemented from OffLatticeSimulation< 2 >.
Definition at line 202 of file CryptSimulation2d.cpp.
References SimulationTime::GetTime(), SimulationTime::Instance(), AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >::mrCellPopulation, mWriteBetaCatenin, SetupWriteBetaCatenin(), and WriteBetaCatenin().
void CryptSimulation2d::SetupWriteBetaCatenin | ( | ) | [protected] |
Use an output file handler to create a beta catenin results file.
Definition at line 169 of file CryptSimulation2d.cpp.
References AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >::mpVizSetupFile, AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >::mSimulationOutputDirectory, mVizBetaCateninResultsFile, and OutputFileHandler::OpenOutputFile().
Referenced by SetupSolve().
void CryptSimulation2d::UpdateAtEndOfSolve | ( | ) | [protected, virtual] |
Overridden UpdateAtEndOfSolve() method.
Closes beta catenin results file if required, then calls the base class method.
Reimplemented from OffLatticeSimulation< 2 >.
Definition at line 241 of file CryptSimulation2d.cpp.
References AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >::mrCellPopulation, mVizBetaCateninResultsFile, and mWriteBetaCatenin.
void CryptSimulation2d::UpdateAtEndOfTimeStep | ( | ) | [protected, virtual] |
Overridden UpdateAtEndOfTimeStep() method.
Write current beta catenin results to file if required.
Reimplemented from AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >.
Definition at line 221 of file CryptSimulation2d.cpp.
References SimulationTime::GetTime(), SimulationTime::GetTimeStep(), SimulationTime::GetTimeStepsElapsed(), SimulationTime::Instance(), AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >::mrCellPopulation, AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >::mSamplingTimestepMultiple, mWriteBetaCatenin, and WriteBetaCatenin().
void CryptSimulation2d::UseJiggledBottomCells | ( | ) |
Set method for mUseJiggledBottomCells.
Definition at line 257 of file CryptSimulation2d.cpp.
References OffLatticeSimulation< 2 >::mBoundaryConditions.
void CryptSimulation2d::WriteBetaCatenin | ( | double | time | ) | [protected, virtual] |
Write beta catenin results to file.
time | the current time |
Definition at line 176 of file CryptSimulation2d.cpp.
References AbstractVanLeeuwen2009WntSwatCellCycleModel::GetCytoplasmicBetaCateninLevel(), AbstractVanLeeuwen2009WntSwatCellCycleModel::GetMembraneBoundBetaCateninLevel(), AbstractVanLeeuwen2009WntSwatCellCycleModel::GetNuclearBetaCateninLevel(), AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >::mrCellPopulation, mVizBetaCateninResultsFile, and mWriteBetaCatenin.
Referenced by SetupSolve(), and UpdateAtEndOfTimeStep().
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from OffLatticeSimulation< 2 >.
Definition at line 62 of file CryptSimulation2d.hpp.
bool CryptSimulation2d::mUsingMeshBasedCellPopulation [protected] |
Helper member that stores whether we are using a MeshBasedCellPopulationWithGhostNodes (if not, then we are assumed to be using a VertexBasedCellPopulation).
Definition at line 95 of file CryptSimulation2d.hpp.
Referenced by CalculateCellDivisionVector(), CryptSimulation2d(), and SetBottomCellAncestors().
out_stream CryptSimulation2d::mVizBetaCateninResultsFile [protected] |
The file that the values of beta catenin is written out to.
Definition at line 89 of file CryptSimulation2d.hpp.
Referenced by SetupWriteBetaCatenin(), UpdateAtEndOfSolve(), and WriteBetaCatenin().
bool CryptSimulation2d::mWriteBetaCatenin [protected] |
Whether the simulation includes the cell-cycle models VanLeeuwen2009WntSwatCellCycleModelHypothesisOne or VanLeeuwen2009WntSwatCellCycleModelHypothesisOne, and hence whether beta catenin results are written to file.
Definition at line 86 of file CryptSimulation2d.hpp.
Referenced by CryptSimulation2d(), serialize(), SetupSolve(), UpdateAtEndOfSolve(), UpdateAtEndOfTimeStep(), and WriteBetaCatenin().