#include <CryptSimulation2d.hpp>
Public Member Functions | |
CryptSimulation2d (AbstractCellPopulation< 2 > &rCellPopulation, bool deleteCellPopulationAndForceCollection=false, bool initialiseCells=true) | |
void | UseJiggledBottomCells () |
void | ApplyCellPopulationBoundaryConditions (const std::vector< c_vector< double, 2 > > &rOldLocations) |
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 | WriteVisualizerSetupFile () |
void | SetupWriteBetaCatenin () |
virtual void | WriteBetaCatenin (double time) |
void | SetupSolve () |
void | PostSolve () |
void | AfterSolve () |
Protected Attributes | |
bool | mUseJiggledBottomCells |
bool | mWriteBetaCatenin |
out_stream | mVizBetaCateninResultsFile |
MeshBasedCellPopulationWithGhostNodes< 2 > * | mpStaticCastCellPopulation |
Friends | |
class | TestCryptSimulation2d |
class | boost::serialization::access |
Definition at line 42 of file CryptSimulation2d.hpp.
CryptSimulation2d::CryptSimulation2d | ( | AbstractCellPopulation< 2 > & | rCellPopulation, | |
bool | deleteCellPopulationAndForceCollection = false , |
|||
bool | initialiseCells = true | |||
) |
Constructor.
rCellPopulation | A cell population object | |
deleteCellPopulationAndForceCollection | Whether to delete the cell population and force collection on destruction to free up memory | |
initialiseCells | whether to initialise cells (set to false when loading from an archive) |
Definition at line 34 of file CryptSimulation2d.cpp.
References mpStaticCastCellPopulation, CellBasedSimulation< 2 >::mrCellPopulation, and mWriteBetaCatenin.
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 CellBasedSimulation< 2 >.
Definition at line 59 of file CryptSimulation2d.hpp.
References mUseJiggledBottomCells, and mWriteBetaCatenin.
c_vector< double, 2 > CryptSimulation2d::CalculateCellDivisionVector | ( | CellPtr | pParentCell | ) | [protected, virtual] |
Calculates the new locations of a dividing cell's cell centres. Moves the dividing node a bit and returns co-ordinates for the new node. It does this by picking a random direction (0->2PI) and placing the parent and daughter in opposing directions on this axis.
pParentCell | the parent cell |
Reimplemented from CellBasedSimulation< 2 >.
Definition at line 57 of file CryptSimulation2d.cpp.
References AbstractCentreBasedCellPopulation< DIM >::GetMeinekeDivisionSeparation(), RandomNumberGenerator::Instance(), mpStaticCastCellPopulation, CellBasedSimulation< 2 >::mrCellPopulation, and RandomNumberGenerator::ranf().
void CryptSimulation2d::WriteVisualizerSetupFile | ( | ) | [protected, virtual] |
Overridden WriteVisualizerSetupFile() method.
Writes out special information about the mesh to the visualizer.
Reimplemented from CellBasedSimulation< 2 >.
Definition at line 117 of file CryptSimulation2d.cpp.
References CellBasedSimulation< 2 >::mpVizSetupFile, and CellBasedSimulation< 2 >::mrCellPopulation.
void CryptSimulation2d::SetupWriteBetaCatenin | ( | ) | [protected] |
Use an output file handler to create a beta catenin results file.
Definition at line 122 of file CryptSimulation2d.cpp.
References CellBasedSimulation< 2 >::mpVizSetupFile, CellBasedSimulation< 2 >::mSimulationOutputDirectory, mVizBetaCateninResultsFile, and OutputFileHandler::OpenOutputFile().
Referenced by SetupSolve().
void CryptSimulation2d::WriteBetaCatenin | ( | double | time | ) | [protected, virtual] |
Write beta catenin results to file.
time | the current time |
Definition at line 129 of file CryptSimulation2d.cpp.
References AbstractVanLeeuwen2009WntSwatCellCycleModel::GetCytoplasmicBetaCateninLevel(), AbstractVanLeeuwen2009WntSwatCellCycleModel::GetMembraneBoundBetaCateninLevel(), AbstractVanLeeuwen2009WntSwatCellCycleModel::GetNuclearBetaCateninLevel(), CellBasedSimulation< 2 >::mrCellPopulation, mVizBetaCateninResultsFile, and mWriteBetaCatenin.
Referenced by PostSolve(), and SetupSolve().
void CryptSimulation2d::SetupSolve | ( | ) | [protected, virtual] |
Overridden SetupSolve() method.
Write initial beta catenin results to file if required.
Reimplemented from CellBasedSimulation< 2 >.
Definition at line 162 of file CryptSimulation2d.cpp.
References SimulationTime::GetTime(), SimulationTime::Instance(), CellBasedSimulation< 2 >::mrCellPopulation, mWriteBetaCatenin, SetupWriteBetaCatenin(), and WriteBetaCatenin().
void CryptSimulation2d::PostSolve | ( | ) | [protected, virtual] |
Overridden PostSolve() method.
Write current beta catenin results to file if required.
Reimplemented from CellBasedSimulation< 2 >.
Definition at line 178 of file CryptSimulation2d.cpp.
References SimulationTime::GetTime(), SimulationTime::GetTimeStep(), SimulationTime::GetTimeStepsElapsed(), SimulationTime::Instance(), CellBasedSimulation< 2 >::mrCellPopulation, CellBasedSimulation< 2 >::mSamplingTimestepMultiple, mWriteBetaCatenin, and WriteBetaCatenin().
void CryptSimulation2d::AfterSolve | ( | ) | [protected, virtual] |
Overridden AfterSolve() method.
Closes beta catenin results file if required, then calls the base class method.
Reimplemented from CellBasedSimulation< 2 >.
Definition at line 198 of file CryptSimulation2d.cpp.
References CellBasedSimulation< 2 >::mrCellPopulation, mVizBetaCateninResultsFile, and mWriteBetaCatenin.
void CryptSimulation2d::UseJiggledBottomCells | ( | ) |
Set method for mUseJiggledBottomCells.
Definition at line 211 of file CryptSimulation2d.cpp.
References mUseJiggledBottomCells.
void CryptSimulation2d::ApplyCellPopulationBoundaryConditions | ( | const std::vector< c_vector< double, 2 > > & | rOldLocations | ) |
Overridden ApplyCellPopulationBoundaryConditions() method.
If an instance of WntConcentration is not set up, then stem cells at the bottom of the crypt are pinned. Any cell that has moved below the bottom of the crypt is moved back up.
rOldLocations | the node locations at the previous time step |
If WntConcentration is not set up then stem cells must be pinned, so we reset the location of each stem cell.
Definition at line 216 of file CryptSimulation2d.cpp.
References WntConcentration< DIM >::Destroy(), WntConcentration< DIM >::Instance(), WntConcentration< DIM >::IsWntSetUp(), CellBasedSimulation< 2 >::mpRandomGenerator, CellBasedSimulation< 2 >::mrCellPopulation, mUseJiggledBottomCells, RandomNumberGenerator::ranf(), Node< SPACE_DIM >::rGetLocation(), and Node< SPACE_DIM >::rGetModifiableLocation().
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 274 of file CryptSimulation2d.cpp.
References CellBasedSimulation< 2 >::mrCellPopulation.
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 CellBasedSimulation< 2 >.
Definition at line 288 of file CryptSimulation2d.cpp.
References CellBasedSimulation< 2 >::mrCellPopulation, mUseJiggledBottomCells, and CellBasedSimulation< DIM >::OutputSimulationParameters().
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from CellBasedSimulation< 2 >.
Definition at line 51 of file CryptSimulation2d.hpp.
bool CryptSimulation2d::mUseJiggledBottomCells [protected] |
Whether to use a flat bottom surface or to jiggle the cells on the bottom surface
Definition at line 69 of file CryptSimulation2d.hpp.
Referenced by ApplyCellPopulationBoundaryConditions(), OutputSimulationParameters(), serialize(), and UseJiggledBottomCells().
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 77 of file CryptSimulation2d.hpp.
Referenced by AfterSolve(), CryptSimulation2d(), PostSolve(), serialize(), SetupSolve(), and WriteBetaCatenin().
out_stream CryptSimulation2d::mVizBetaCateninResultsFile [protected] |
The file that the values of beta catenin is written out to.
Definition at line 80 of file CryptSimulation2d.hpp.
Referenced by AfterSolve(), SetupWriteBetaCatenin(), and WriteBetaCatenin().
Helper member that is a static cast of the cell population.
Definition at line 83 of file CryptSimulation2d.hpp.
Referenced by CalculateCellDivisionVector(), and CryptSimulation2d().