Chaste  Release::3.4
CryptSimulation1d Class Reference

#include <CryptSimulation1d.hpp>

+ Inheritance diagram for CryptSimulation1d:
+ Collaboration diagram for CryptSimulation1d:

Public Member Functions

 CryptSimulation1d (AbstractCellPopulation< 1 > &rCellPopulation, bool deleteCellPopulationInDestructor=false, bool initialiseCells=true)
 
virtual ~CryptSimulation1d ()
 
void OutputSimulationParameters (out_stream &rParamsFile)
 
- Public Member Functions inherited from OffLatticeSimulation< 1 >
 OffLatticeSimulation (AbstractCellPopulation< ELEMENT_DIM, ELEMENT_DIM > &rCellPopulation, bool deleteCellPopulationInDestructor=false, bool initialiseCells=true)
 
void AddForce (boost::shared_ptr< AbstractForce< ELEMENT_DIM, ELEMENT_DIM > > pForce)
 
void RemoveAllForces ()
 
void AddCellPopulationBoundaryCondition (boost::shared_ptr< AbstractCellPopulationBoundaryCondition< ELEMENT_DIM, ELEMENT_DIM > > pBoundaryCondition)
 
void RemoveAllCellPopulationBoundaryConditions ()
 
void OutputAdditionalSimulationSetup (out_stream &rParamsFile)
 
- Public Member Functions inherited from AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >
 AbstractCellBasedSimulation (AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &rCellPopulation, bool deleteCellPopulationInDestructor=false, bool initialiseCells=true)
 
virtual ~AbstractCellBasedSimulation ()
 
void SetCellBasedPdeHandler (CellBasedPdeHandler< SPACE_DIM > *pCellBasedPdeHandler)
 
CellBasedPdeHandler< SPACE_DIM > * GetCellBasedPdeHandler ()
 
std::vector< doubleGetNodeLocation (const unsigned &rNodeIndex)
 
double GetDt ()
 
unsigned GetNumBirths ()
 
unsigned GetNumDeaths ()
 
std::string GetOutputDirectory ()
 
void SetDt (double dt)
 
void SetEndTime (double endTime)
 
void SetOutputDirectory (std::string outputDirectory)
 
void SetSamplingTimestepMultiple (unsigned samplingTimestepMultiple)
 
void SetNoBirth (bool noBirth)
 
void SetUpdateCellPopulationRule (bool updateCellPopulation)
 
bool GetUpdateCellPopulationRule ()
 
void AddCellKiller (boost::shared_ptr< AbstractCellKiller< SPACE_DIM > > pCellKiller)
 
void RemoveAllCellKillers ()
 
void AddSimulationModifier (boost::shared_ptr< AbstractCellBasedSimulationModifier< ELEMENT_DIM, SPACE_DIM > > pSimulationModifier)
 
std::vector< boost::shared_ptr
< AbstractCellBasedSimulationModifier
< ELEMENT_DIM, SPACE_DIM > > > * 
GetSimulationModifiers ()
 
void Solve ()
 
AbstractCellPopulation
< ELEMENT_DIM, SPACE_DIM > & 
rGetCellPopulation ()
 
const AbstractCellPopulation
< ELEMENT_DIM, SPACE_DIM > & 
rGetCellPopulation () const
 
bool GetOutputDivisionLocations ()
 
void SetOutputDivisionLocations (bool outputDivisionLocations)
 
bool GetOutputCellVelocities ()
 
void SetOutputCellVelocities (bool outputCellVelocities)
 
- Public Member Functions inherited from Identifiable
virtual ~Identifiable ()
 
std::string GetIdentifier () const
 

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
 

Additional Inherited Members

- Protected Member Functions inherited from OffLatticeSimulation< 1 >
virtual void UpdateCellLocationsAndTopology ()
 
virtual void UpdateNodePositions ()
 
virtual void SetupSolve ()
 
virtual void WriteVisualizerSetupFile ()
 
- Protected Member Functions inherited from AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >
virtual unsigned DoCellBirth ()
 
unsigned DoCellRemoval ()
 
virtual bool StoppingEventHasOccurred ()
 
virtual void UpdateCellPopulation ()
 
void OutputSimulationSetup ()
 
- Protected Attributes inherited from OffLatticeSimulation< 1 >
std::vector< boost::shared_ptr
< AbstractForce< ELEMENT_DIM,
ELEMENT_DIM > > > 
mForceCollection
 
std::vector< boost::shared_ptr
< AbstractCellPopulationBoundaryCondition
< ELEMENT_DIM, ELEMENT_DIM > > > 
mBoundaryConditions
 
- Protected Attributes inherited from AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >
double mDt
 
double mEndTime
 
AbstractCellPopulation
< ELEMENT_DIM, SPACE_DIM > & 
mrCellPopulation
 
bool mDeleteCellPopulationInDestructor
 
bool mInitialiseCells
 
bool mNoBirth
 
bool mUpdateCellPopulation
 
std::string mOutputDirectory
 
std::string mSimulationOutputDirectory
 
out_stream mpVizSetupFile
 
unsigned mNumBirths
 
unsigned mNumDeaths
 
bool mOutputDivisionLocations
 
out_stream mpDivisionLocationFile
 
bool mOutputCellVelocities
 
out_stream mpCellVelocitiesFile
 
std::vector< boost::shared_ptr
< AbstractCellKiller
< SPACE_DIM > > > 
mCellKillers
 
std::vector< boost::shared_ptr
< AbstractCellBasedSimulationModifier
< ELEMENT_DIM, SPACE_DIM > > > 
mSimulationModifiers
 
unsigned mSamplingTimestepMultiple
 
CellBasedPdeHandler< SPACE_DIM > * mpCellBasedPdeHandler
 

Detailed Description

A 1D crypt simulation object. The model is a simplified version of a 2D crypt model developed by Meineke et al (doi:10.1046/j.0960-7722.2001.00216.x).

Definition at line 54 of file CryptSimulation1d.hpp.

Constructor & Destructor Documentation

CryptSimulation1d::CryptSimulation1d ( AbstractCellPopulation< 1 > &  rCellPopulation,
bool  deleteCellPopulationInDestructor = false,
bool  initialiseCells = true 
)

Constructor.

Parameters
rCellPopulationA cell population object
deleteCellPopulationInDestructorWhether to delete the cell population on destruction to free up memory (defaults to false)
initialiseCellswhether to initialise cells (defaults to true, set to false when loading from an archive)

Definition at line 40 of file CryptSimulation1d.cpp.

References OffLatticeSimulation< 1 >::AddCellPopulationBoundaryCondition(), MAKE_PTR_ARGS, AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >::mDeleteCellPopulationInDestructor, mpStaticCastCellPopulation, and AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >::mrCellPopulation.

CryptSimulation1d::~CryptSimulation1d ( )
virtual

Destructor.

This frees the CryptSimulationBoundaryCondition.

Definition at line 57 of file CryptSimulation1d.cpp.

Member Function Documentation

c_vector< double, 1 > CryptSimulation1d::CalculateCellDivisionVector ( CellPtr  pParentCell)
privatevirtual

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
pParentCellthe parent cell
Returns
daughter_coords the coordinates for the daughter cell.

Reimplemented from OffLatticeSimulation< 1 >.

Definition at line 61 of file CryptSimulation1d.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationIndexUsingCell(), AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationOfCellCentre(), AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetMeinekeDivisionSeparation(), RandomNumberGenerator::Instance(), mpStaticCastCellPopulation, AbstractCellBasedSimulation< ELEMENT_DIM, ELEMENT_DIM >::mrCellPopulation, and RandomNumberGenerator::ranf().

void CryptSimulation1d::OutputSimulationParameters ( out_stream &  rParamsFile)
virtual

Outputs simulation parameters to file

As this method is pure virtual, it must be overridden in subclasses.

Parameters
rParamsFilethe file stream to which the parameters are output

Reimplemented from OffLatticeSimulation< 1 >.

Definition at line 115 of file CryptSimulation1d.cpp.

References OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::OutputSimulationParameters().

template<class Archive >
void CryptSimulation1d::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

Archive the simulation and member variables.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 70 of file CryptSimulation1d.hpp.

References SerializableSingleton< SINGLETON_CLASS >::GetSerializationWrapper(), and WntConcentration< DIM >::Instance().

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 62 of file CryptSimulation1d.hpp.

Member Data Documentation

MeshBasedCellPopulation<1>* CryptSimulation1d::mpStaticCastCellPopulation
private

Helper member that is a static cast of the cell population.

Definition at line 79 of file CryptSimulation1d.hpp.

Referenced by CalculateCellDivisionVector(), and CryptSimulation1d().


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