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

Private Member Functions

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

Private 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 (to appear in Cell Prolif.).

Definition at line 46 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 178 of file CryptSimulation2d.cpp.

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


Member Function Documentation

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

Archive the simulation and member variable.

Parameters:
archive 
version 

Reimplemented from TissueSimulation< 2 >.

Definition at line 63 of file CryptSimulation2d.hpp.

References mUseJiggledBottomCells.

c_vector< double, 2 > CryptSimulation2d::CalculateDividingCellCentreLocations ( TissueCell 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.

Parameters:
pParentCell pointer to the parent cell
Returns:
daughter_coords the coordinates for the daughter cell.

Reimplemented from TissueSimulation< 2 >.

Definition at line 33 of file CryptSimulation2d.cpp.

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

void CryptSimulation2d::WriteVisualizerSetupFile (  )  [private, virtual]

Overridden WriteVisualizerSetupFile() method.

Writes out special information about the mesh to the visualizer.

Reimplemented from TissueSimulation< 2 >.

Definition at line 91 of file CryptSimulation2d.cpp.

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

void CryptSimulation2d::SetupWriteBetaCatenin (  )  [private]

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

Definition at line 97 of file CryptSimulation2d.cpp.

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

Referenced by SetupSolve().

void CryptSimulation2d::WriteBetaCatenin ( double  time  )  [private]

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

Overridden SetupSolve() method.

Write initial beta catenin results to file if required.

Reimplemented from TissueSimulation< 2 >.

Definition at line 138 of file CryptSimulation2d.cpp.

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

void CryptSimulation2d::PostSolve (  )  [private, virtual]

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

Overridden AfterSolve() method.

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

Reimplemented from TissueSimulation< 2 >.

Definition at line 166 of file CryptSimulation2d.cpp.

References TissueSimulation< DIM >::AfterSolve(), mBetaCatResultsFile, and TissueSimulation< 2 >::mrTissue.

void CryptSimulation2d::UseJiggledBottomCells (  ) 

Set method for mUseJiggledBottomCells.

Definition at line 192 of file CryptSimulation2d.cpp.

References mUseJiggledBottomCells.

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

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


Friends And Related Function Documentation

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

Needed for serialization.

Reimplemented from TissueSimulation< 2 >.

Definition at line 55 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 72 of file CryptSimulation2d.hpp.

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

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

Definition at line 75 of file CryptSimulation2d.hpp.

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

Helper member that is a static cast of the tissue.

Definition at line 78 of file CryptSimulation2d.hpp.

Referenced by ApplyTissueBoundaryConditions(), CalculateDividingCellCentreLocations(), CryptSimulation2d(), WriteBetaCatenin(), and WriteVisualizerSetupFile().


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

Generated on Wed Mar 18 12:52:27 2009 for Chaste by  doxygen 1.5.5