CryptSimulation2d Class Reference

#include <CryptSimulation2d.hpp>

Inheritance diagram for CryptSimulation2d:

Inheritance graph
[legend]
Collaboration diagram for CryptSimulation2d:

Collaboration graph
[legend]

List of all members.

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


Detailed Description

A 2D crypt simulation object. For more details, see the paper by van Leeuwen et al (2009) [doi:10.1111/j.1365-2184.2009.00627.x].

Definition at line 42 of file CryptSimulation2d.hpp.


Constructor & Destructor Documentation

CryptSimulation2d::CryptSimulation2d ( AbstractCellPopulation< 2 > &  rCellPopulation,
bool  deleteCellPopulationAndForceCollection = false,
bool  initialiseCells = true 
)

Constructor.

Parameters:
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.


Member Function Documentation

template<class Archive>
void CryptSimulation2d::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, protected]

Archive the simulation and member variable.

Parameters:
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.

Parameters:
pParentCell the parent cell
Returns:
daughter_coords the coordinates for the daughter 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]

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]

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.

Parameters:
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.

Parameters:
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().


Friends And Related Function Documentation

friend class boost::serialization::access [friend]

Needed for serialization.

Reimplemented from CellBasedSimulation< 2 >.

Definition at line 51 of file CryptSimulation2d.hpp.


Member Data Documentation

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().

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().

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().


The documentation for this class was generated from the following files:

Generated on Mon Apr 18 11:36:55 2011 for Chaste by  doxygen 1.5.5