CryptSimulation2d Class Reference

#include <CryptSimulation2d.hpp>

Inherits TissueSimulation< 2 >.

Collaboration diagram for CryptSimulation2d:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CryptSimulation2d (AbstractTissue< 2 > &rTissue, std::vector< AbstractForce< 2 > * > forceCollection, bool deleteTissueAndForceCollection=false, bool initialiseCells=true)
void UseJiggledBottomCells ()
void ApplyTissueBoundaryConditions (const std::vector< c_vector< double, 2 > > &rOldLocations)
void SetBottomCellAncestors ()

Protected Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
c_vector< double, 2 > CalculateCellDivisionVector (TissueCell &rParentCell)
void WriteVisualizerSetupFile ()
void SetupWriteBetaCatenin ()
void WriteBetaCatenin (double time)
void SetupSolve ()
void OutputParameters ()
void PostSolve ()
void AfterSolve ()

Protected Attributes

bool mUseJiggledBottomCells
out_stream mBetaCatResultsFile
MeshBasedTissueWithGhostNodes< 2 > * mpStaticCastTissue

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 ( AbstractTissue< 2 > &  rTissue,
std::vector< AbstractForce< 2 > * >  forceCollection,
bool  deleteTissueAndForceCollection = false,
bool  initialiseCells = true 
)

Constructor.

Parameters:
rTissue A tissue facade class (contains a mesh and cells)
forceCollection The mechanics to use in the simulation
deleteTissueAndForceCollection Whether to delete the tissue 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 35 of file CryptSimulation2d.cpp.

References mpStaticCastTissue, and TissueSimulation< 2 >::mrTissue.


Member Function Documentation

void CryptSimulation2d::AfterSolve (  )  [protected, virtual]

Overridden AfterSolve() method.

Closes beta catenin results file if required, then calls the base class method.

Reimplemented from TissueSimulation< 2 >.

Definition at line 250 of file CryptSimulation2d.cpp.

References mBetaCatResultsFile, and TissueSimulation< 2 >::mrTissue.

void CryptSimulation2d::ApplyTissueBoundaryConditions ( const std::vector< c_vector< double, 2 > > &  rOldLocations  ) 

Overridden ApplyTissueBoundaryConditions() 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 266 of file CryptSimulation2d.cpp.

References AbstractTissue< DIM >::GetLocationIndexUsingCell(), AbstractCellCentreBasedTissue< DIM >::GetNodeCorrespondingToCell(), TissueSimulation< 2 >::mpRandomGenerator, mpStaticCastTissue, TissueSimulation< 2 >::mrTissue, mUseJiggledBottomCells, RandomNumberGenerator::ranf(), Node< SPACE_DIM >::rGetLocation(), and Node< SPACE_DIM >::rGetModifiableLocation().

c_vector< double, 2 > CryptSimulation2d::CalculateCellDivisionVector ( TissueCell rParentCell  )  [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:
rParentCell the parent cell
Returns:
daughter_coords the coordinates for the daughter cell.

Reimplemented from TissueSimulation< 2 >.

Definition at line 49 of file CryptSimulation2d.cpp.

References TissueConfig::GetDivisionSeparation(), AbstractTissue< DIM >::GetLocationIndexUsingCell(), AbstractCellCentreBasedTissue< DIM >::GetLocationOfCellCentre(), RandomNumberGenerator::Instance(), TissueConfig::Instance(), mpStaticCastTissue, TissueSimulation< 2 >::mrTissue, and RandomNumberGenerator::ranf().

void CryptSimulation2d::OutputParameters (  )  [protected]

Helper method to output all the simulations parameters to file

Definition at line 172 of file CryptSimulation2d.cpp.

References TissueConfig::GetApoptosisTime(), TissueConfig::GetApoptoticSpringCompressionStiffness(), TissueConfig::GetApoptoticSpringTensionStiffness(), TissueConfig::GetAreaBasedDampingConstantParameter(), TissueConfig::GetBetaCatSpringScaler(), TissueConfig::GetCellBoundaryAdhesionEnergyParameter(), TissueConfig::GetCellCellAdhesionEnergyParameter(), TissueConfig::GetCriticalHypoxicDuration(), TissueConfig::GetCryptLength(), TissueConfig::GetCryptProjectionParameterA(), TissueConfig::GetCryptProjectionParameterB(), TissueConfig::GetCryptWidth(), TissueConfig::GetDampingConstantMutant(), TissueConfig::GetDampingConstantNormal(), TissueConfig::GetDeformationEnergyParameter(), TissueConfig::GetG2Duration(), TissueConfig::GetHepaOneCellG1Duration(), TissueConfig::GetHepaOneCellHypoxicConcentration(), TissueConfig::GetHepaOneCellQuiescentConcentration(), TissueConfig::GetMaxTransitGenerations(), TissueConfig::GetMDuration(), TissueConfig::GetMechanicsCutOffLength(), TissueConfig::GetMembraneSurfaceEnergyParameter(), TissueConfig::GetMinimumGapDuration(), TissueConfig::GetOutputCellAges(), TissueConfig::GetOutputCellAncestors(), TissueConfig::GetOutputCellAreas(), TissueConfig::GetOutputCellCyclePhases(), TissueConfig::GetOutputCellIdData(), TissueConfig::GetOutputCellMutationStates(), TissueConfig::GetOutputCellProliferativeTypes(), TissueConfig::GetOutputCellVariables(), TissueConfig::GetOutputNodeVelocities(), TissueConfig::GetOutputTissueAreas(), TissueConfig::GetOutputVoronoiData(), TissueConfig::GetSDuration(), TissueConfig::GetSG2MDuration(), TissueConfig::GetSpringStiffness(), TissueConfig::GetStemCellG1Duration(), TissueConfig::GetSymmetricDivisionProbability(), TissueConfig::GetTransitCellG1Duration(), TissueConfig::GetWelikyOsterAreaParameter(), TissueConfig::GetWelikyOsterPerimeterParameter(), TissueConfig::GetWntChemotaxisStrength(), TissueConfig::GetWntConcentrationParameter(), TissueConfig::GetWntLabelledThreshold(), TissueConfig::GetWntStemThreshold(), TissueConfig::GetWntTransitThreshold(), TissueConfig::Instance(), TissueSimulation< 2 >::mSimulationOutputDirectory, and OutputFileHandler::OpenOutputFile().

Referenced by SetupSolve().

void CryptSimulation2d::PostSolve (  )  [protected, virtual]
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 TissueSimulation< 2 >.

Definition at line 59 of file CryptSimulation2d.hpp.

References mUseJiggledBottomCells.

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 325 of file CryptSimulation2d.cpp.

References AbstractTissue< DIM >::Begin(), AbstractTissue< DIM >::End(), AbstractCellCentreBasedTissue< DIM >::GetLocationOfCellCentre(), and mpStaticCastTissue.

void CryptSimulation2d::SetupSolve (  )  [protected, virtual]

Overridden SetupSolve() method.

Write initial beta catenin results to file if required.

Reimplemented from TissueSimulation< 2 >.

Definition at line 159 of file CryptSimulation2d.cpp.

References SimulationTime::GetTime(), SimulationTime::Instance(), TissueSimulation< 2 >::mrTissue, OutputParameters(), SetupWriteBetaCatenin(), and WriteBetaCatenin().

void CryptSimulation2d::SetupWriteBetaCatenin (  )  [protected]

Use an output file handler to reate a beta catenin results file.

Definition at line 117 of file CryptSimulation2d.cpp.

References mBetaCatResultsFile, TissueSimulation< 2 >::mpSetupFile, TissueSimulation< 2 >::mSimulationOutputDirectory, and OutputFileHandler::OpenOutputFile().

Referenced by SetupSolve().

void CryptSimulation2d::UseJiggledBottomCells (  ) 

Set method for mUseJiggledBottomCells.

Definition at line 260 of file CryptSimulation2d.cpp.

References mUseJiggledBottomCells.

void CryptSimulation2d::WriteBetaCatenin ( double  time  )  [protected]
void CryptSimulation2d::WriteVisualizerSetupFile (  )  [protected, virtual]

Overridden WriteVisualizerSetupFile() method.

Writes out special information about the mesh to the visualizer.

Reimplemented from TissueSimulation< 2 >.

Definition at line 111 of file CryptSimulation2d.cpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetWidth(), TissueSimulation< 2 >::mpSetupFile, mpStaticCastTissue, and MeshBasedTissue< DIM >::rGetMesh().


Friends And Related Function Documentation

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

Needed for serialization.

Reimplemented from TissueSimulation< 2 >.

Definition at line 51 of file CryptSimulation2d.hpp.


Member Data Documentation

The file that the values of beta catenin is written out to.

Definition at line 71 of file CryptSimulation2d.hpp.

Referenced by AfterSolve(), SetupWriteBetaCatenin(), and WriteBetaCatenin().

Whether to use a flat bottom surface or to jiggle the cells on the bottom surface

Definition at line 68 of file CryptSimulation2d.hpp.

Referenced by ApplyTissueBoundaryConditions(), serialize(), and UseJiggledBottomCells().


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

Generated by  doxygen 1.6.2