#include <CryptSimulation2d.hpp>
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 |
Definition at line 46 of file CryptSimulation2d.hpp.
CryptSimulation2d::CryptSimulation2d | ( | AbstractTissue< 2 > & | rTissue, | |
std::vector< AbstractForce< 2 > * > | forceCollection, | |||
bool | deleteTissueAndForceCollection = false , |
|||
bool | initialiseCells = true | |||
) |
Constructor.
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.
void CryptSimulation2d::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Archive the simulation and member variable.
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.
pParentCell | pointer to the parent 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] |
Write beta catenin results to file.
time | the current time |
Definition at line 105 of file CryptSimulation2d.cpp.
References IngeWntSwatCellCycleModel::GetCytoplasmicBetaCateninLevel(), AbstractTissue< DIM >::GetLocationIndexUsingCell(), AbstractCellCentreBasedTissue< DIM >::GetLocationOfCellCentre(), IngeWntSwatCellCycleModel::GetMembraneBoundBetaCateninLevel(), IngeWntSwatCellCycleModel::GetNuclearBetaCateninLevel(), mBetaCatResultsFile, mpStaticCastTissue, and TissueSimulation< 2 >::mrTissue.
Referenced by PostSolve(), and SetupSolve().
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] |
Overridden PostSolve() method.
Write current beta catenin results to file if required.
Reimplemented from TissueSimulation< 2 >.
Definition at line 150 of file CryptSimulation2d.cpp.
References SimulationTime::GetTime(), SimulationTime::GetTimeStep(), SimulationTime::GetTimeStepsElapsed(), SimulationTime::Instance(), TissueSimulation< 2 >::mrTissue, TissueSimulation< 2 >::mSamplingTimestepMultiple, and WriteBetaCatenin().
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.
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().
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from TissueSimulation< 2 >.
Definition at line 55 of file CryptSimulation2d.hpp.
bool CryptSimulation2d::mUseJiggledBottomCells [private] |
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().
out_stream CryptSimulation2d::mBetaCatResultsFile [private] |
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().