Chaste Commit::f2ff7ee04e70ac9d06c57344df8d017dbb12b97b
PottsBasedCellPopulation< DIM > Class Template Reference

#include <PottsBasedCellPopulation.hpp>

+ Inheritance diagram for PottsBasedCellPopulation< DIM >:
+ Collaboration diagram for PottsBasedCellPopulation< DIM >:

Public Member Functions

 PottsBasedCellPopulation (PottsMesh< DIM > &rMesh, std::vector< CellPtr > &rCells, bool deleteMesh=false, bool validate=true, const std::vector< unsigned > locationIndices=std::vector< unsigned >())
 
 PottsBasedCellPopulation (PottsMesh< DIM > &rMesh)
 
virtual ~PottsBasedCellPopulation ()
 
PottsMesh< DIM > & rGetMesh ()
 
const PottsMesh< DIM > & rGetMesh () const
 
virtual TetrahedralMesh< DIM, DIM > * GetTetrahedralMeshForPdeModifier ()
 
PottsElement< DIM > * GetElement (unsigned elementIndex)
 
unsigned GetNumElements ()
 
Node< DIM > * GetNode (unsigned index)
 
unsigned GetNumNodes ()
 
std::set< unsignedGetNeighbouringLocationIndices (CellPtr pCell)
 
c_vector< double, DIM > GetLocationOfCellCentre (CellPtr pCell)
 
PottsElement< DIM > * GetElementCorrespondingToCell (CellPtr pCell)
 
CellPtr AddCell (CellPtr pNewCell, CellPtr pParentCell=CellPtr())
 
unsigned RemoveDeadCells ()
 
void UpdateCellLocations (double dt)
 
bool IsCellAssociatedWithADeletedLocation (CellPtr pCell)
 
void Update (bool hasHadBirthsOrDeaths=true)
 
virtual void OpenWritersFiles (OutputFileHandler &rOutputFileHandler)
 
virtual void WriteResultsToFiles (const std::string &rDirectory)
 
virtual void AcceptPopulationWriter (boost::shared_ptr< AbstractCellPopulationWriter< DIM, DIM > > pPopulationWriter)
 
virtual void AcceptPopulationCountWriter (boost::shared_ptr< AbstractCellPopulationCountWriter< DIM, DIM > > pPopulationCountWriter)
 
virtual void AcceptPopulationEventWriter (boost::shared_ptr< AbstractCellPopulationEventWriter< DIM, DIM > > pPopulationEventWriter)
 
virtual void AcceptCellWriter (boost::shared_ptr< AbstractCellWriter< DIM, DIM > > pCellWriter, CellPtr pCell)
 
double GetVolumeOfCell (CellPtr pCell)
 
double GetWidth (const unsigned &rDimension)
 
void OutputCellPopulationParameters (out_stream &rParamsFile)
 
void SetTemperature (double temperature)
 
double GetTemperature ()
 
void SetNumSweepsPerTimestep (unsigned numSweepsPerTimestep)
 
unsigned GetNumSweepsPerTimestep ()
 
void CreateElementTessellation ()
 
VertexMesh< DIM, DIM > * GetElementTessellation ()
 
void CreateMutableMesh ()
 
MutableMesh< DIM, DIM > * GetMutableMesh ()
 
virtual void AddUpdateRule (boost::shared_ptr< AbstractUpdateRule< DIM > > pUpdateRule)
 
virtual double GetCellDataItemAtPdeNode (unsigned pdeNodeIndex, std::string &rVariableName, bool dirichletBoundaryConditionApplies=false, double dirichletBoundaryValue=0.0)
 
- Public Member Functions inherited from AbstractOnLatticeCellPopulation< DIM >
 AbstractOnLatticeCellPopulation (AbstractMesh< DIM, DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >(), bool deleteMesh=false)
 
virtual ~AbstractOnLatticeCellPopulation ()
 
bool GetUpdateNodesInRandomOrder ()
 
void SetUpdateNodesInRandomOrder (bool updateNodesInRandomOrder)
 
void SetIterateRandomlyOverUpdateRuleCollection (bool iterateRandomly)
 
bool GetIterateRandomlyOverUpdateRuleCollection ()
 
void SetNode (unsigned index, ChastePoint< DIM > &rNewLocation)
 
std::set< unsignedGetNeighbouringNodeIndices (unsigned index)
 
virtual double GetDefaultTimeStep ()
 
virtual void RemoveAllUpdateRules ()
 
virtual const std::vector< boost::shared_ptr< AbstractUpdateRule< DIM > > > GetUpdateRuleCollection () const
 
- Public Member Functions inherited from AbstractCellPopulation< DIM >
 AbstractCellPopulation (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >())
 
virtual ~AbstractCellPopulation ()
 
void InitialiseCells ()
 
void SetDataOnAllCells (const std::string &rDataName, double dataValue)
 
AbstractMesh< ELEMENT_DIM, SPACE_DIM > & rGetMesh ()
 
virtual bool IsPdeNodeAssociatedWithNonApoptoticCell (unsigned pdeNodeIndex)
 
std::list< CellPtr > & rGetCells ()
 
virtual void SetNode (unsigned nodeIndex, ChastePoint< SPACE_DIM > &rNewLocation)=0
 
virtual void WriteDataToVisualizerSetupFile (out_stream &pVizSetupFile)
 
std::vector< unsignedGetCellMutationStateCount ()
 
std::vector< unsignedGetCellProliferativeTypeCount ()
 
std::vector< unsignedGetCellCyclePhaseCount ()
 
unsigned GetNumRealCells ()
 
unsigned GetNumAllCells ()
 
void SetCellAncestorsToLocationIndices ()
 
std::set< unsignedGetCellAncestors ()
 
virtual CellPtr GetCellUsingLocationIndex (unsigned index)
 
std::set< CellPtr > GetCellsUsingLocationIndex (unsigned index)
 
virtual bool IsCellAttachedToLocationIndex (unsigned index)
 
void SetCellUsingLocationIndex (unsigned index, CellPtr pCell)
 
virtual void AddCellUsingLocationIndex (unsigned index, CellPtr pCell)
 
virtual void RemoveCellUsingLocationIndex (unsigned index, CellPtr pCell)
 
void MoveCellInLocationMap (CellPtr pCell, unsigned old_index, unsigned new_index)
 
unsigned GetLocationIndexUsingCell (CellPtr pCell)
 
boost::shared_ptr< CellPropertyRegistryGetCellPropertyRegistry ()
 
void SetDefaultCellMutationStateAndProliferativeTypeOrdering ()
 
virtual std::set< std::pair< unsigned, unsigned > > GetNeighbouringEdgeIndices (CellPtr pCell, unsigned pEdgeIndex)
 
c_vector< double, SPACE_DIM > GetCentroidOfCellPopulation ()
 
virtual void UpdateCellProcessLocation ()
 
virtual void CloseWritersFiles ()
 
virtual void AcceptPopulationWriter (boost::shared_ptr< AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM > > pPopulationWriter)=0
 
virtual void AcceptPopulationCountWriter (boost::shared_ptr< AbstractCellPopulationCountWriter< ELEMENT_DIM, SPACE_DIM > > pPopulationCountWriter)=0
 
virtual void AcceptPopulationEventWriter (boost::shared_ptr< AbstractCellPopulationEventWriter< ELEMENT_DIM, SPACE_DIM > > pPopulationEventWriter)=0
 
virtual void AcceptCellWriter (boost::shared_ptr< AbstractCellWriter< ELEMENT_DIM, SPACE_DIM > > pCellWriter, CellPtr pCell)=0
 
std::vector< std::string > GetDivisionsInformation ()
 
void AddDivisionInformation (std::string divisionInformation)
 
void ClearDivisionsInformation ()
 
std::vector< std::string > GetRemovalsInformation ()
 
void AddRemovalInformation (std::string removalInformation)
 
void ClearRemovalsInformation ()
 
void GenerateRemovalInformation (CellPtr pCell, std::string killerInfo)
 
void KillCell (CellPtr pCell, std::string killerInfo)
 
void StartApoptosisOnCell (CellPtr pCell, std::string killerInfo)
 
void OutputCellPopulationInfo (out_stream &rParamsFile)
 
virtual void SimulationSetupHook (AbstractCellBasedSimulation< ELEMENT_DIM, SPACE_DIM > *pSimulation)
 
bool GetOutputResultsForChasteVisualizer ()
 
void AddPopulationWriter ()
 
void AddPopulationWriter (boost::shared_ptr< AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM > > pPopulationWriter)
 
void AddCellWriter ()
 
void AddCellWriter (boost::shared_ptr< AbstractCellWriter< ELEMENT_DIM, SPACE_DIM > > pCellWriter)
 
void AddCellPopulationCountWriter ()
 
void AddCellPopulationCountWriter (boost::shared_ptr< AbstractCellPopulationCountWriter< ELEMENT_DIM, SPACE_DIM > > pCellPopulationCountWriter)
 
void AddCellPopulationEventWriter ()
 
void AddCellPopulationEventWriter (boost::shared_ptr< AbstractCellPopulationEventWriter< ELEMENT_DIM, SPACE_DIM > > pCellPopulationEventWriter)
 
bool HasWriter () const
 
void SetOutputResultsForChasteVisualizer (bool outputResultsForChasteVisualizer)
 
c_vector< double, SPACE_DIM > GetSizeOfCellPopulation ()
 
virtual bool IsRoomToDivide (CellPtr pCell)
 
std::pair< unsigned, unsignedCreateOrderedPair (unsigned index1, unsigned index2)
 
Iterator Begin ()
 
Iterator End ()
 
- 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)
 
void Validate ()
 
virtual void WriteVtkResultsToFile (const std::string &rDirectory)
 

Private Attributes

VertexMesh< DIM, DIM > * mpElementTessellation
 
PottsMesh< DIM > * mpPottsMesh
 
MutableMesh< DIM, DIM > * mpMutableMesh
 
double mTemperature
 
unsigned mNumSweepsPerTimestep
 

Friends

class TestPottsBasedCellPopulation
 
class boost::serialization::access
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractOnLatticeCellPopulation< DIM >
 AbstractOnLatticeCellPopulation (AbstractMesh< DIM, DIM > &rMesh)
 
- Protected Member Functions inherited from AbstractCellPopulation< DIM >
 AbstractCellPopulation (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh)
 
virtual void AcceptCellWritersAcrossPopulation ()
 
- Protected Attributes inherited from AbstractOnLatticeCellPopulation< DIM >
std::vector< boost::shared_ptr< AbstractUpdateRule< DIM > > > mUpdateRuleCollection
 
bool mDeleteMesh
 
bool mUpdateNodesInRandomOrder
 
bool mIterateRandomlyOverUpdateRuleCollection
 
- Protected Attributes inherited from AbstractCellPopulation< DIM >
std::map< unsigned, std::set< CellPtr > > mLocationCellMap
 
std::map< Cell *, unsignedmCellLocationMap
 
AbstractMesh< ELEMENT_DIM, SPACE_DIM > & mrMesh
 
std::list< CellPtr > mCells
 
c_vector< double, SPACE_DIM > mCentroid
 
out_stream mpVtkMetaFile
 
boost::shared_ptr< CellPropertyRegistrympCellPropertyRegistry
 
bool mOutputResultsForChasteVisualizer
 
std::vector< boost::shared_ptr< AbstractCellWriter< ELEMENT_DIM, SPACE_DIM > > > mCellWriters
 
std::vector< boost::shared_ptr< AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM > > > mCellPopulationWriters
 
std::vector< boost::shared_ptr< AbstractCellPopulationCountWriter< ELEMENT_DIM, SPACE_DIM > > > mCellPopulationCountWriters
 
std::vector< boost::shared_ptr< AbstractCellPopulationEventWriter< ELEMENT_DIM, SPACE_DIM > > > mCellPopulationEventWriters
 
std::vector< std::string > mDivisionsInformation
 
std::vector< std::string > mRemovalsInformation
 

Detailed Description

template<unsigned DIM>
class PottsBasedCellPopulation< DIM >

A facade class encapsulating a cell population under the Cellular Potts Model framework.

Contains a group of cells and maintains the associations between CellPtrs and elements in a specialised PottsMesh class.

The code currently requires the PottsMesh object to be fixed, in the sense that no new nodes or elements can be added.

Definition at line 60 of file PottsBasedCellPopulation.hpp.

Constructor & Destructor Documentation

◆ PottsBasedCellPopulation() [1/2]

template<unsigned DIM>
PottsBasedCellPopulation< DIM >::PottsBasedCellPopulation ( PottsMesh< DIM > &  rMesh,
std::vector< CellPtr > &  rCells,
bool  deleteMesh = false,
bool  validate = true,
const std::vector< unsigned locationIndices = std::vector<unsigned>() 
)

Create a new cell population facade from a mesh and collection of cells.

There must be precisely one CellPtr for each PottsElement in the mesh.

Parameters
rMeshreference to a PottsMesh
rCellsreference to a vector of CellPtrs
deleteMeshset to true if you want the cell population to free the mesh memory on destruction (defaults to false)
validatewhether to validate the cell population when it is created (defaults to true)
locationIndicesan optional vector of location indices that correspond to real cells

Definition at line 75 of file PottsBasedCellPopulation.cpp.

References PottsBasedCellPopulation< DIM >::mpPottsMesh, AbstractCellPopulation< DIM >::mrMesh, and PottsBasedCellPopulation< DIM >::Validate().

◆ PottsBasedCellPopulation() [2/2]

template<unsigned DIM>
PottsBasedCellPopulation< DIM >::PottsBasedCellPopulation ( PottsMesh< DIM > &  rMesh)

Constructor for use by the de-serializer.

Parameters
rMesha vertex mesh.

Definition at line 95 of file PottsBasedCellPopulation.cpp.

References PottsBasedCellPopulation< DIM >::mpPottsMesh, and AbstractCellPopulation< DIM >::mrMesh.

◆ ~PottsBasedCellPopulation()

template<unsigned DIM>
PottsBasedCellPopulation< DIM >::~PottsBasedCellPopulation ( )
virtual

Destructor, which frees any memory allocated by the constructor.

Definition at line 106 of file PottsBasedCellPopulation.cpp.

Member Function Documentation

◆ AcceptCellWriter()

template<unsigned DIM>
void PottsBasedCellPopulation< DIM >::AcceptCellWriter ( boost::shared_ptr< AbstractCellWriter< DIM, DIM > >  pCellWriter,
CellPtr  pCell 
)
virtual

A virtual method to accept a cell writer so it can write data from this object to file.

Parameters
pCellWriterthe population writer.
pCellthe cell whose data are being written.

Definition at line 405 of file PottsBasedCellPopulation.cpp.

◆ AcceptPopulationCountWriter()

template<unsigned DIM>
void PottsBasedCellPopulation< DIM >::AcceptPopulationCountWriter ( boost::shared_ptr< AbstractCellPopulationCountWriter< DIM, DIM > >  pPopulationCountWriter)
virtual

A virtual method to accept a cell population count writer so it can write data from this object to file.

Parameters
pPopulationCountWriterthe population count writer.

Definition at line 393 of file PottsBasedCellPopulation.cpp.

◆ AcceptPopulationEventWriter()

template<unsigned DIM>
void PottsBasedCellPopulation< DIM >::AcceptPopulationEventWriter ( boost::shared_ptr< AbstractCellPopulationEventWriter< DIM, DIM > >  pPopulationEventWriter)
virtual

A virtual method to accept a cell population event writer so it can write data from this object to file.

Parameters
pPopulationEventWriterthe population event writer.

Definition at line 399 of file PottsBasedCellPopulation.cpp.

◆ AcceptPopulationWriter()

template<unsigned DIM>
void PottsBasedCellPopulation< DIM >::AcceptPopulationWriter ( boost::shared_ptr< AbstractCellPopulationWriter< DIM, DIM > >  pPopulationWriter)
virtual

A virtual method to accept a cell population writer so it can write data from this object to file.

Parameters
pPopulationWriterthe population writer.

Definition at line 387 of file PottsBasedCellPopulation.cpp.

◆ AddCell()

template<unsigned DIM>
CellPtr PottsBasedCellPopulation< DIM >::AddCell ( CellPtr  pNewCell,
CellPtr  pParentCell = CellPtr() 
)
virtual

Overridden AddCell() method.

Add a new cell to the cell population.

Parameters
pNewCellthe cell to add
pParentCellpointer to a parent cell (if required)
Returns
address of cell as it appears in the cell list (internal of this method uses a copy constructor along the way)

Implements AbstractCellPopulation< DIM >.

Definition at line 194 of file PottsBasedCellPopulation.cpp.

◆ AddUpdateRule()

template<unsigned DIM>
void PottsBasedCellPopulation< DIM >::AddUpdateRule ( boost::shared_ptr< AbstractUpdateRule< DIM > >  pUpdateRule)
virtual

Overridden AddUpdateRule() method.

Parameters
pUpdateRulepointer to an update rule

Implements AbstractOnLatticeCellPopulation< DIM >.

Definition at line 432 of file PottsBasedCellPopulation.cpp.

◆ CreateElementTessellation()

template<unsigned DIM>
void PottsBasedCellPopulation< DIM >::CreateElementTessellation ( )

Create a Element tessellation of the mesh for use in visualising the mesh.

Todo:
implement this method (#1666)

Definition at line 439 of file PottsBasedCellPopulation.cpp.

◆ CreateMutableMesh()

template<unsigned DIM>
void PottsBasedCellPopulation< DIM >::CreateMutableMesh ( )

Create a mutable mesh from the nodes of the Potts mesh. Used for solving PDEs

Definition at line 464 of file PottsBasedCellPopulation.cpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode().

◆ GetCellDataItemAtPdeNode()

template<unsigned DIM>
double PottsBasedCellPopulation< DIM >::GetCellDataItemAtPdeNode ( unsigned  pdeNodeIndex,
std::string &  rVariableName,
bool  dirichletBoundaryConditionApplies = false,
double  dirichletBoundaryValue = 0.0 
)
virtual

Overridden GetCellDataItemAtPdeNode() method.

Parameters
pdeNodeIndexindex of a node in a tetrahedral mesh for use with a PDE modifier
rVariableNamethe name of the cell data item to get
dirichletBoundaryConditionApplieswhere a Dirichlet boundary condition is used (optional; defaults to false)
dirichletBoundaryValuethe value of the Dirichlet boundary condition, if used (optional; defaults to 0.0)
Returns
the value of a CellData item (interpolated if necessary) at a node, specified by its index in a tetrahedral mesh for use with a PDE modifier. This method can be called by PDE modifier classes.

Implements AbstractCellPopulation< DIM >.

Definition at line 767 of file PottsBasedCellPopulation.cpp.

◆ GetElement()

template<unsigned DIM>
PottsElement< DIM > * PottsBasedCellPopulation< DIM >::GetElement ( unsigned  elementIndex)

Get a particular PottsElement.

Parameters
elementIndexthe global index of the PottsElement
Returns
a pointer to the PottsElement.

Definition at line 151 of file PottsBasedCellPopulation.cpp.

Referenced by CellPopulationElementWriter< ELEMENT_DIM, SPACE_DIM >::Visit().

◆ GetElementCorrespondingToCell()

template<unsigned DIM>
PottsElement< DIM > * PottsBasedCellPopulation< DIM >::GetElementCorrespondingToCell ( CellPtr  pCell)

Get a pointer to the element corresponding to a given CellPtr.

Parameters
pCellthe cell
Returns
pointer to the element.

Definition at line 188 of file PottsBasedCellPopulation.cpp.

◆ GetElementTessellation()

template<unsigned DIM>
VertexMesh< DIM, DIM > * PottsBasedCellPopulation< DIM >::GetElementTessellation ( )
Returns
a reference to mpElementTessellation.

Definition at line 457 of file PottsBasedCellPopulation.cpp.

◆ GetLocationOfCellCentre()

template<unsigned DIM>
c_vector< double, DIM > PottsBasedCellPopulation< DIM >::GetLocationOfCellCentre ( CellPtr  pCell)
virtual

Overridden GetLocationOfCellCentre() method. Find where a given cell is in space.

Parameters
pCellthe cell
Returns
the location of the centre of mass of the element corresponding to this cell.

Implements AbstractCellPopulation< DIM >.

Definition at line 182 of file PottsBasedCellPopulation.cpp.

◆ GetMutableMesh()

template<unsigned DIM>
MutableMesh< DIM, DIM > * PottsBasedCellPopulation< DIM >::GetMutableMesh ( )
Returns
the Mutable Mesh

Definition at line 480 of file PottsBasedCellPopulation.cpp.

◆ GetNeighbouringLocationIndices()

template<unsigned DIM>
std::set< unsigned > PottsBasedCellPopulation< DIM >::GetNeighbouringLocationIndices ( CellPtr  pCell)
virtual

Overridden GetNeighbouringLocationIndices() method.

Given a cell, returns the set of location indices corresponding to neighbouring cells.

Parameters
pCella cell
Returns
the set of neighbouring location indices.

Implements AbstractCellPopulation< DIM >.

Definition at line 175 of file PottsBasedCellPopulation.cpp.

Referenced by HeterotypicBoundaryLengthWriter< ELEMENT_DIM, SPACE_DIM >::Visit().

◆ GetNode()

◆ GetNumElements()

template<unsigned DIM>
unsigned PottsBasedCellPopulation< DIM >::GetNumElements ( )
Returns
the number of PottsElements in the cell population.

Definition at line 157 of file PottsBasedCellPopulation.cpp.

◆ GetNumNodes()

template<unsigned DIM>
unsigned PottsBasedCellPopulation< DIM >::GetNumNodes ( )
virtual

Overridden GetNumNodes() method.

Returns
the number of nodes in the cell population.

Implements AbstractCellPopulation< DIM >.

Definition at line 169 of file PottsBasedCellPopulation.cpp.

◆ GetNumSweepsPerTimestep()

template<unsigned DIM>
unsigned PottsBasedCellPopulation< DIM >::GetNumSweepsPerTimestep ( )
Returns
mNumSweepsPerTimestep

Definition at line 515 of file PottsBasedCellPopulation.cpp.

◆ GetTemperature()

template<unsigned DIM>
double PottsBasedCellPopulation< DIM >::GetTemperature ( )
Returns
mTemperature

Definition at line 503 of file PottsBasedCellPopulation.cpp.

◆ GetTetrahedralMeshForPdeModifier()

template<unsigned DIM>
TetrahedralMesh< DIM, DIM > * PottsBasedCellPopulation< DIM >::GetTetrahedralMeshForPdeModifier ( )
virtual

Overridden GetTetrahedralMeshForPdeModifier() method.

Returns
a pointer to a tetrahedral mesh

This method is called by AbstractGrowingDomainPdeModifier.

Implements AbstractCellPopulation< DIM >.

Definition at line 133 of file PottsBasedCellPopulation.cpp.

◆ GetVolumeOfCell()

template<unsigned DIM>
double PottsBasedCellPopulation< DIM >::GetVolumeOfCell ( CellPtr  pCell)
virtual

Overridden GetVolumeOfCell() method.

Parameters
pCellboost shared pointer to a cell
Returns
volume via associated mesh element

Implements AbstractCellPopulation< DIM >.

Definition at line 411 of file PottsBasedCellPopulation.cpp.

◆ GetWidth()

template<unsigned DIM>
double PottsBasedCellPopulation< DIM >::GetWidth ( const unsigned rDimension)
virtual

Overridden GetWidth() method.

Calculate the 'width' of any dimension of the cell population by calling GetWidth() on the mesh.

Parameters
rDimensiona dimension (0,1 or 2)
Returns
The maximum distance between any nodes in this dimension.

Implements AbstractCellPopulation< DIM >.

Definition at line 423 of file PottsBasedCellPopulation.cpp.

◆ IsCellAssociatedWithADeletedLocation()

template<unsigned DIM>
bool PottsBasedCellPopulation< DIM >::IsCellAssociatedWithADeletedLocation ( CellPtr  pCell)
virtual

Overridden IsCellAssociatedWithADeletedLocation() method.

Parameters
pCellthe cell
Returns
whether a given cell is associated with a deleted element.

Implements AbstractCellPopulation< DIM >.

Definition at line 352 of file PottsBasedCellPopulation.cpp.

◆ OpenWritersFiles()

template<unsigned DIM>
void PottsBasedCellPopulation< DIM >::OpenWritersFiles ( OutputFileHandler rOutputFileHandler)
virtual

Overridden OpenWritersFiles() method.

Open all files in mCellPopulationWriters and mCellWriters for writing (not appending).

Parameters
rOutputFileHandlerhandler for the directory in which to open this file.

Reimplemented from AbstractCellPopulation< DIM >.

Definition at line 363 of file PottsBasedCellPopulation.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::OpenWritersFiles().

◆ OutputCellPopulationParameters()

template<unsigned DIM>
void PottsBasedCellPopulation< DIM >::OutputCellPopulationParameters ( out_stream &  rParamsFile)
virtual

Outputs CellPopulation 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 AbstractOnLatticeCellPopulation< DIM >.

Definition at line 487 of file PottsBasedCellPopulation.cpp.

References AbstractOnLatticeCellPopulation< DIM >::OutputCellPopulationParameters().

◆ RemoveDeadCells()

template<unsigned DIM>
unsigned PottsBasedCellPopulation< DIM >::RemoveDeadCells ( )
virtual

Remove all cells labelled as dead.

Note that after calling this method the cell population will be in an inconsistent state until the equivalent of a 'remesh' is performed! So don't try iterating over cells or anything like that.

Returns
number of cells removed

Implements AbstractCellPopulation< DIM >.

Definition at line 212 of file PottsBasedCellPopulation.cpp.

◆ rGetMesh() [1/2]

◆ rGetMesh() [2/2]

template<unsigned DIM>
const PottsMesh< DIM > & PottsBasedCellPopulation< DIM >::rGetMesh ( ) const
Returns
const reference to mrMesh (used in archiving).

Definition at line 127 of file PottsBasedCellPopulation.cpp.

◆ serialize()

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

Serialize the object and its member variables.

Note that serialization of the mesh and cells is handled by load/save_construct_data.

Note also that member data related to writers is not saved - output must be set up again by the caller after a restart.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 107 of file PottsBasedCellPopulation.hpp.

References PottsBasedCellPopulation< DIM >::mNumSweepsPerTimestep, PottsBasedCellPopulation< DIM >::mpElementTessellation, and PottsBasedCellPopulation< DIM >::mTemperature.

◆ SetNumSweepsPerTimestep()

template<unsigned DIM>
void PottsBasedCellPopulation< DIM >::SetNumSweepsPerTimestep ( unsigned  numSweepsPerTimestep)

Set mNumSweepsPerTimestep.

Parameters
numSweepsPerTimestepthe number of MonteCarlo sweeps of the mesh performed each timestep

Definition at line 509 of file PottsBasedCellPopulation.cpp.

◆ SetTemperature()

template<unsigned DIM>
void PottsBasedCellPopulation< DIM >::SetTemperature ( double  temperature)

Set mTemperature.

Parameters
temperaturethe temperature of the system

Definition at line 497 of file PottsBasedCellPopulation.cpp.

◆ Update()

template<unsigned DIM>
void PottsBasedCellPopulation< DIM >::Update ( bool  hasHadBirthsOrDeaths = true)
virtual

Remove the PottsElements which have been marked as deleted, and update the correspondence with CellPtrs.

Parameters
hasHadBirthsOrDeaths- a bool saying whether cell population has had Births Or Deaths

Implements AbstractCellPopulation< DIM >.

Definition at line 358 of file PottsBasedCellPopulation.cpp.

◆ UpdateCellLocations()

template<unsigned DIM>
void PottsBasedCellPopulation< DIM >::UpdateCellLocations ( double  dt)
virtual

◆ Validate()

template<unsigned DIM>
void PottsBasedCellPopulation< DIM >::Validate ( )
privatevirtual

Check the consistency of internal data structures. Each PottsElement must have a CellPtr associated with it.

Implements AbstractCellPopulation< DIM >.

Definition at line 47 of file PottsBasedCellPopulation.cpp.

References EXCEPTION, and SimulationTime::Instance().

Referenced by PottsBasedCellPopulation< DIM >::PottsBasedCellPopulation().

◆ WriteResultsToFiles()

template<unsigned DIM>
void PottsBasedCellPopulation< DIM >::WriteResultsToFiles ( const std::string &  rDirectory)
virtual

Overridden WriteResultsToFiles() method.

Parameters
rDirectorypathname of the output directory, relative to where Chaste output is stored

Reimplemented from AbstractCellPopulation< DIM >.

Definition at line 379 of file PottsBasedCellPopulation.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::WriteResultsToFiles().

◆ WriteVtkResultsToFile()

template<unsigned DIM>
void PottsBasedCellPopulation< DIM >::WriteVtkResultsToFile ( const std::string &  rDirectory)
privatevirtual

Overridden WriteVtkResultsToFile() method.

As a CellIdWriter is added to the population in the overridden method OpenWritersFiles(), distinct cells can be visualized when viewing VTK output of Potts model simulations.

Parameters
rDirectorypathname of the output directory, relative to where Chaste output is stored

Implements AbstractCellPopulation< DIM >.

Definition at line 521 of file PottsBasedCellPopulation.cpp.

References VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::AddPointData(), NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh(), SimulationTime::GetTimeStepsElapsed(), SimulationTime::Instance(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteVtkUsingMesh().

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<unsigned DIM>
friend class boost::serialization::access
friend

Definition at line 94 of file PottsBasedCellPopulation.hpp.

◆ TestPottsBasedCellPopulation

template<unsigned DIM>
friend class TestPottsBasedCellPopulation
friend

Definition at line 62 of file PottsBasedCellPopulation.hpp.

Member Data Documentation

◆ mNumSweepsPerTimestep

template<unsigned DIM>
unsigned PottsBasedCellPopulation< DIM >::mNumSweepsPerTimestep
private

The number of MonteCarlo sweeps of the mesh performed each timestep. Initialised to 1 in the constructor.

Definition at line 92 of file PottsBasedCellPopulation.hpp.

Referenced by PottsBasedCellPopulation< DIM >::serialize().

◆ mpElementTessellation

template<unsigned DIM>
VertexMesh<DIM,DIM>* PottsBasedCellPopulation< DIM >::mpElementTessellation
private

Pointer to a VertexMesh object that stores the Element tessellation that is used to visualize mrMesh. The tessellation is created by calling CreateElementTessellation() and can be accessed by calling GetElementTessellation().

Definition at line 71 of file PottsBasedCellPopulation.hpp.

Referenced by PottsBasedCellPopulation< DIM >::serialize().

◆ mpMutableMesh

template<unsigned DIM>
MutableMesh<DIM,DIM>* PottsBasedCellPopulation< DIM >::mpMutableMesh
private

Pointer to a MutableMesh that can be created from the nodes of the PottsMesh in order to solve PDEs on the population.

Definition at line 83 of file PottsBasedCellPopulation.hpp.

◆ mpPottsMesh

template<unsigned DIM>
PottsMesh<DIM>* PottsBasedCellPopulation< DIM >::mpPottsMesh
private

A static cast of the Abstract mesh from `AbstractCellPopulation` for use in this class

Definition at line 77 of file PottsBasedCellPopulation.hpp.

Referenced by PottsBasedCellPopulation< DIM >::PottsBasedCellPopulation(), and PottsBasedCellPopulation< DIM >::PottsBasedCellPopulation().

◆ mTemperature

template<unsigned DIM>
double PottsBasedCellPopulation< DIM >::mTemperature
private

The temperature of the system. Initialized to 0.1 in the constructor.

Definition at line 86 of file PottsBasedCellPopulation.hpp.

Referenced by PottsBasedCellPopulation< DIM >::serialize().


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