#include <CryptSimulation1d.hpp>
Public Member Functions | |
CryptSimulation1d (AbstractCellPopulation< 1 > &rCellPopulation, bool deleteCellPopulationAndForceCollection=false, bool initialiseCells=true) | |
void | ApplyCellPopulationBoundaryConditions (const std::vector< c_vector< double, 1 > > &rOldLocations) |
void | OutputSimulationParameters (out_stream &rParamsFile) |
Private Member Functions | |
template<class Archive> | |
void | serialize (Archive &archive, const unsigned int version) |
c_vector< double, 1 > | CalculateCellDivisionVector (CellPtr pParentCell) |
Private Attributes | |
MeshBasedCellPopulation< 1 > * | mpStaticCastCellPopulation |
Friends | |
class | TestCryptSimulation1d |
class | boost::serialization::access |
Definition at line 45 of file CryptSimulation1d.hpp.
CryptSimulation1d::CryptSimulation1d | ( | AbstractCellPopulation< 1 > & | 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 33 of file CryptSimulation1d.cpp.
References mpStaticCastCellPopulation, and CellBasedSimulation< 1 >::mrCellPopulation.
void CryptSimulation1d::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Archive the simulation and member variables.
archive | the archive | |
version | the current version of this class |
Reimplemented from CellBasedSimulation< 1 >.
Definition at line 61 of file CryptSimulation1d.hpp.
c_vector< double, 1 > CryptSimulation1d::CalculateCellDivisionVector | ( | CellPtr | pParentCell | ) | [private, 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< 1 >.
Definition at line 44 of file CryptSimulation1d.cpp.
References AbstractCellPopulation< DIM >::GetLocationIndexUsingCell(), AbstractCentreBasedCellPopulation< DIM >::GetLocationOfCellCentre(), AbstractCentreBasedCellPopulation< DIM >::GetMeinekeDivisionSeparation(), RandomNumberGenerator::Instance(), mpStaticCastCellPopulation, CellBasedSimulation< 1 >::mrCellPopulation, and RandomNumberGenerator::ranf().
void CryptSimulation1d::ApplyCellPopulationBoundaryConditions | ( | const std::vector< c_vector< double, 1 > > & | 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 99 of file CryptSimulation1d.cpp.
References WntConcentration< DIM >::Destroy(), AbstractCellPopulation< DIM >::GetLocationIndexUsingCell(), AbstractCentreBasedCellPopulation< DIM >::GetNodeCorrespondingToCell(), WntConcentration< DIM >::Instance(), WntConcentration< DIM >::IsWntSetUp(), mpStaticCastCellPopulation, CellBasedSimulation< 1 >::mrCellPopulation, Node< SPACE_DIM >::rGetLocation(), and Node< SPACE_DIM >::rGetModifiableLocation().
void CryptSimulation1d::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< 1 >.
Definition at line 144 of file CryptSimulation1d.cpp.
References CellBasedSimulation< DIM >::OutputSimulationParameters().
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from CellBasedSimulation< 1 >.
Definition at line 53 of file CryptSimulation1d.hpp.
Helper member that is a static cast of the cell population.
Definition at line 69 of file CryptSimulation1d.hpp.
Referenced by ApplyCellPopulationBoundaryConditions(), CalculateCellDivisionVector(), and CryptSimulation1d().