Chaste Commit::f2ff7ee04e70ac9d06c57344df8d017dbb12b97b
AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM > Class Template Referenceabstract

#include <AbstractOffLatticeCellPopulation.hpp>

+ Inheritance diagram for AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >:
+ Collaboration diagram for AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >:

Public Member Functions

 AbstractOffLatticeCellPopulation (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >())
 
virtual unsigned AddNode (Node< SPACE_DIM > *pNewNode)=0
 
virtual void SetNode (unsigned nodeIndex, ChastePoint< SPACE_DIM > &rNewLocation)=0
 
virtual void UpdateNodeLocations (double dt)
 
virtual void CheckForStepSizeException (unsigned nodeIndex, c_vector< double, SPACE_DIM > &rDisplacement, double dt)=0
 
virtual double GetDampingConstant (unsigned nodeIndex)=0
 
void SetDampingConstantNormal (double dampingConstantNormal)
 
void SetDampingConstantMutant (double dampingConstantMutant)
 
void SetAbsoluteMovementThreshold (double absoluteMovementThreshold)
 
double GetAbsoluteMovementThreshold ()
 
double GetDampingConstantNormal ()
 
double GetDampingConstantMutant ()
 
virtual void OutputCellPopulationParameters (out_stream &rParamsFile)
 
- Public Member Functions inherited from AbstractCellPopulation< ELEMENT_DIM, SPACE_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 TetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * GetTetrahedralMeshForPdeModifier ()=0
 
virtual bool IsPdeNodeAssociatedWithNonApoptoticCell (unsigned pdeNodeIndex)
 
virtual double GetCellDataItemAtPdeNode (unsigned pdeNodeIndex, std::string &rVariableName, bool dirichletBoundaryConditionApplies=false, double dirichletBoundaryValue=0.0)=0
 
std::list< CellPtr > & rGetCells ()
 
virtual unsigned GetNumNodes ()=0
 
virtual c_vector< double, SPACE_DIM > GetLocationOfCellCentre (CellPtr pCell)=0
 
virtual Node< SPACE_DIM > * GetNode (unsigned index)=0
 
virtual bool IsCellAssociatedWithADeletedLocation (CellPtr pCell)=0
 
virtual void WriteDataToVisualizerSetupFile (out_stream &pVizSetupFile)
 
virtual CellPtr AddCell (CellPtr pNewCell, CellPtr pParentCell=CellPtr())=0
 
virtual double GetDefaultTimeStep ()=0
 
virtual unsigned RemoveDeadCells ()=0
 
virtual void Update (bool hasHadBirthsOrDeaths=true)=0
 
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 double GetWidth (const unsigned &rDimension)=0
 
virtual double GetVolumeOfCell (CellPtr pCell)=0
 
virtual std::set< unsignedGetNeighbouringNodeIndices (unsigned index)=0
 
virtual std::set< unsignedGetNeighbouringLocationIndices (CellPtr pCell)=0
 
virtual std::set< std::pair< unsigned, unsigned > > GetNeighbouringEdgeIndices (CellPtr pCell, unsigned pEdgeIndex)
 
c_vector< double, SPACE_DIM > GetCentroidOfCellPopulation ()
 
virtual void UpdateCellProcessLocation ()
 
virtual void OpenWritersFiles (OutputFileHandler &rOutputFileHandler)
 
virtual void CloseWritersFiles ()
 
virtual void WriteResultsToFiles (const std::string &rDirectory)
 
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 ()
 
template<template< unsigned, unsigned > class T>
void AddPopulationWriter ()
 
template<template< unsigned, unsigned > class T>
void AddCellWriter ()
 
template<template< unsigned, unsigned > class T>
void AddCellPopulationCountWriter ()
 
template<template< unsigned, unsigned > class T>
void AddCellPopulationEventWriter ()
 
void AddPopulationWriter (boost::shared_ptr< AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM > > pPopulationWriter)
 
void AddCellWriter (boost::shared_ptr< AbstractCellWriter< ELEMENT_DIM, SPACE_DIM > > pCellWriter)
 
void AddCellPopulationCountWriter (boost::shared_ptr< AbstractCellPopulationCountWriter< ELEMENT_DIM, SPACE_DIM > > pCellPopulationCountWriter)
 
void AddCellPopulationEventWriter (boost::shared_ptr< AbstractCellPopulationEventWriter< ELEMENT_DIM, SPACE_DIM > > pCellPopulationEventWriter)
 
template<template< unsigned, unsigned > class T>
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
 

Protected Member Functions

 AbstractOffLatticeCellPopulation (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh)
 
- Protected Member Functions inherited from AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >
virtual void Validate ()=0
 
virtual void WriteVtkResultsToFile (const std::string &rDirectory)=0
 
 AbstractCellPopulation (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh)
 
virtual void AcceptCellWritersAcrossPopulation ()
 

Protected Attributes

double mDampingConstantNormal
 
double mDampingConstantMutant
 
double mAbsoluteMovementThreshold
 
- Protected Attributes inherited from AbstractCellPopulation< ELEMENT_DIM, SPACE_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
 

Private Member Functions

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

Friends

class boost::serialization::access
 

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >

An abstract facade class encapsulating an off-lattice (centre- or vertex-based) cell population.

Template Parameters
ELEMENT_DIMDimension of the elements.
SPACE_DIMDimension of the space. If not specified, it defaults to ELEMENT_DIM.

Definition at line 53 of file AbstractOffLatticeCellPopulation.hpp.

Constructor & Destructor Documentation

◆ AbstractOffLatticeCellPopulation() [1/2]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::AbstractOffLatticeCellPopulation ( AbstractMesh< ELEMENT_DIM, SPACE_DIM > &  rMesh)
protected

Constructor that just takes in a mesh.

Parameters
rMeshthe mesh for the cell population.

Definition at line 50 of file AbstractOffLatticeCellPopulation.cpp.

◆ AbstractOffLatticeCellPopulation() [2/2]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::AbstractOffLatticeCellPopulation ( AbstractMesh< ELEMENT_DIM, SPACE_DIM > &  rMesh,
std::vector< CellPtr > &  rCells,
const std::vector< unsigned locationIndices = std::vector<unsigned>() 
)

Default constructor.

Parameters
rMesha refernce to the mesh underlying the cell population
rCellsa vector of cells
locationIndicesan optional vector of location indices that correspond to real cells

Definition at line 39 of file AbstractOffLatticeCellPopulation.cpp.

Member Function Documentation

◆ AddNode()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
virtual unsigned AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::AddNode ( Node< SPACE_DIM > *  pNewNode)
pure virtual

Add a new node to the cell population.

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

Parameters
pNewNodepointer to the new node
Returns
global index of new node in cell population.

Implemented in MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >, MeshBasedCellPopulation< 1 >, MeshBasedCellPopulation< 2 >, and MeshBasedCellPopulation< DIM >.

◆ CheckForStepSizeException()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
virtual void AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::CheckForStepSizeException ( unsigned  nodeIndex,
c_vector< double, SPACE_DIM > &  rDisplacement,
double  dt 
)
pure virtual

Checks whether a given node displacement violates the movement threshold for this population. If so, a stepSizeException is generated that contains a warning/error message and a suggested smaller dt that should avoid the problem.

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

Parameters
nodeIndexIndex of the node in question (allows us to check whether this is a ghost or particle)
rDisplacementMovement vector of the node at this time step
dtCurrent time step size

Implemented in AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >, and AbstractCentreBasedCellPopulation< DIM >.

◆ GetAbsoluteMovementThreshold()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetAbsoluteMovementThreshold ( )
Returns
mAbsoluteMovementThreshold

Definition at line 97 of file AbstractOffLatticeCellPopulation.cpp.

◆ GetDampingConstant()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
virtual double AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetDampingConstant ( unsigned  nodeIndex)
pure virtual

Get the damping constant for this node - ie d in drdt = F/d.

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

Parameters
nodeIndexthe global index of this node
Returns
the damping constant at the node.

Implemented in AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >, AbstractCentreBasedCellPopulation< DIM >, ImmersedBoundaryCellPopulation< DIM >, MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >, MeshBasedCellPopulation< 1 >, MeshBasedCellPopulation< 2 >, MeshBasedCellPopulation< DIM >, and VertexBasedCellPopulation< DIM >.

◆ GetDampingConstantMutant()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetDampingConstantMutant ( )
Returns
mDampingConstantMutant

Definition at line 91 of file AbstractOffLatticeCellPopulation.cpp.

◆ GetDampingConstantNormal()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetDampingConstantNormal ( )
Returns
mDampingConstantNormal

Definition at line 85 of file AbstractOffLatticeCellPopulation.cpp.

◆ OutputCellPopulationParameters()

◆ serialize()

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

◆ SetAbsoluteMovementThreshold()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetAbsoluteMovementThreshold ( double  absoluteMovementThreshold)

Set mAbsoluteMovementThreshold.

Parameters
absoluteMovementThresholdthe new value of mAbsoluteMovementThreshold

Definition at line 79 of file AbstractOffLatticeCellPopulation.cpp.

◆ SetDampingConstantMutant()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetDampingConstantMutant ( double  dampingConstantMutant)

Set mDampingConstantMutant.

Parameters
dampingConstantMutantthe new value of mDampingConstantMutant

Definition at line 72 of file AbstractOffLatticeCellPopulation.cpp.

◆ SetDampingConstantNormal()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetDampingConstantNormal ( double  dampingConstantNormal)

Set mDampingConstantNormal.

Parameters
dampingConstantNormalthe new value of mDampingConstantNormal

Definition at line 65 of file AbstractOffLatticeCellPopulation.cpp.

◆ SetNode()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
virtual void AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetNode ( unsigned  nodeIndex,
ChastePoint< SPACE_DIM > &  rNewLocation 
)
pure virtual

Move the node with a given index to a new point in space.

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

Parameters
nodeIndexthe index of the node to be moved
rNewLocationthe new target location of the node

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Implemented in MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >, MeshBasedCellPopulation< 1 >, MeshBasedCellPopulation< 2 >, and MeshBasedCellPopulation< DIM >.

◆ UpdateNodeLocations()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::UpdateNodeLocations ( double  dt)
virtual

This is a deprecated method and only used in NodesOnlyCellPopulationWithBuskeUpdate.

Update the location of each node in the cell population given a vector of forces on nodes and a time step over which to integrate the equations of motion.

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

Parameters
dttime step

Reimplemented in ImmersedBoundaryCellPopulation< DIM >, and NodeBasedCellPopulationWithBuskeUpdate< DIM >.

Definition at line 57 of file AbstractOffLatticeCellPopulation.cpp.

References NEVER_REACHED.

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 58 of file AbstractOffLatticeCellPopulation.hpp.

Member Data Documentation

◆ mAbsoluteMovementThreshold

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::mAbsoluteMovementThreshold
protected

The absolute distance which a cell is permitted to move in one time-step. Movement beyond this threshold will trigger UpdateNodeLocations to throw an exception

Definition at line 93 of file AbstractOffLatticeCellPopulation.hpp.

Referenced by AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::serialize().

◆ mDampingConstantMutant

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::mDampingConstantMutant
protected

Damping constant for mutant cells has units of kg s^-1.

Definition at line 86 of file AbstractOffLatticeCellPopulation.hpp.

Referenced by AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::serialize().

◆ mDampingConstantNormal

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::mDampingConstantNormal
protected

Damping constant for normal cells has units of kg s^-1 Represented by the parameter eta in the model by Meineke et al (2001) in their off-lattice model of the intestinal crypt (doi:10.1046/j.0960-7722.2001.00216.x).

Definition at line 81 of file AbstractOffLatticeCellPopulation.hpp.

Referenced by AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::serialize().


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