Chaste Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
AbstractOnLatticeCellPopulation< DIM > Class Template Referenceabstract

#include <AbstractOnLatticeCellPopulation.hpp>

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

Public Member Functions

 AbstractOnLatticeCellPopulation (AbstractMesh< DIM, DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >(), bool deleteMesh=false)
 
virtual ~AbstractOnLatticeCellPopulation ()
 
virtual void UpdateCellLocations (double dt)=0
 
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 void OutputCellPopulationParameters (out_stream &rParamsFile)
 
virtual double GetDefaultTimeStep ()
 
virtual void AddUpdateRule (boost::shared_ptr< AbstractUpdateRule< DIM > > pUpdateRule)=0
 
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 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 void SetNode (unsigned nodeIndex, ChastePoint< SPACE_DIM > &rNewLocation)=0
 
virtual bool IsCellAssociatedWithADeletedLocation (CellPtr pCell)=0
 
virtual void WriteDataToVisualizerSetupFile (out_stream &pVizSetupFile)
 
virtual CellPtr AddCell (CellPtr pNewCell, CellPtr pParentCell=CellPtr())=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< 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 ()
 
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
 

Protected Member Functions

 AbstractOnLatticeCellPopulation (AbstractMesh< DIM, DIM > &rMesh)
 
- Protected Member Functions inherited from AbstractCellPopulation< 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

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
 

Private Member Functions

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

Friends

class boost::serialization::access
 

Detailed Description

template<unsigned DIM>
class AbstractOnLatticeCellPopulation< DIM >

An abstract class for on-lattice cell populations.

Definition at line 46 of file AbstractOnLatticeCellPopulation.hpp.

Constructor & Destructor Documentation

◆ AbstractOnLatticeCellPopulation() [1/2]

template<unsigned DIM>
AbstractOnLatticeCellPopulation< DIM >::AbstractOnLatticeCellPopulation ( AbstractMesh< DIM, DIM > &  rMesh)
protected

Constructor that just takes in a mesh.

Parameters
rMeshthe mesh for the cell population.

Definition at line 57 of file AbstractOnLatticeCellPopulation.cpp.

◆ AbstractOnLatticeCellPopulation() [2/2]

template<unsigned DIM>
AbstractOnLatticeCellPopulation< DIM >::AbstractOnLatticeCellPopulation ( AbstractMesh< DIM, DIM > &  rMesh,
std::vector< CellPtr > &  rCells,
const std::vector< unsigned locationIndices = std::vector<unsigned>(),
bool  deleteMesh = false 
)

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
deleteMeshset to true if you want the cell population to free the mesh memory on destruction (defaults to false)

Definition at line 39 of file AbstractOnLatticeCellPopulation.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::AddCellUsingLocationIndex(), and AbstractCellPopulation< DIM >::mCells.

◆ ~AbstractOnLatticeCellPopulation()

Destructor.

Definition at line 66 of file AbstractOnLatticeCellPopulation.cpp.

Member Function Documentation

◆ AddUpdateRule()

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

Add an update rule to be used with this population.

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

Parameters
pUpdateRulepointer to an update rule

Implemented in CaBasedCellPopulation< DIM >, and PottsBasedCellPopulation< DIM >.

Referenced by OnLatticeSimulation< DIM >::AddUpdateRule().

◆ GetDefaultTimeStep()

template<unsigned DIM>
double AbstractOnLatticeCellPopulation< DIM >::GetDefaultTimeStep ( )
virtual

Overridden GetDefaultTimeStep() method.

Returns
a default value for the time step to use when simulating the cell population.

A hard-coded value of 0.1 is returned. However, note that the time step can be reset by calling SetDt() on the simulation object used to simulate the cell population.

Implements AbstractCellPopulation< DIM >.

Definition at line 119 of file AbstractOnLatticeCellPopulation.cpp.

◆ GetIterateRandomlyOverUpdateRuleCollection()

template<unsigned DIM>
bool AbstractOnLatticeCellPopulation< DIM >::GetIterateRandomlyOverUpdateRuleCollection ( )
Returns
mIterateRandomlyOverUpdateRuleCollection.

Definition at line 89 of file AbstractOnLatticeCellPopulation.cpp.

◆ GetNeighbouringNodeIndices()

template<unsigned DIM>
std::set< unsigned > AbstractOnLatticeCellPopulation< DIM >::GetNeighbouringNodeIndices ( unsigned  index)
virtual

Overridden GetNeighbouringNodeIndices() method.

This method currently returns an exception as the two types of neighbourhood (Moore and Von Neumann) are defined in the PottsMesh.

Parameters
indexthe node index
Returns
the set of neighbouring node indices.

Implements AbstractCellPopulation< DIM >.

Definition at line 101 of file AbstractOnLatticeCellPopulation.cpp.

References EXCEPTION.

◆ GetUpdateNodesInRandomOrder()

template<unsigned DIM>
bool AbstractOnLatticeCellPopulation< DIM >::GetUpdateNodesInRandomOrder ( )

Get whether we update nodes in a random order.

Returns
mUpdateNodesInRandomOrder

Definition at line 71 of file AbstractOnLatticeCellPopulation.cpp.

◆ GetUpdateRuleCollection()

template<unsigned DIM>
const std::vector< boost::shared_ptr< AbstractUpdateRule< DIM > > > AbstractOnLatticeCellPopulation< DIM >::GetUpdateRuleCollection ( ) const
virtual

Get the collection of update rules to be used with this population.

Returns
the update rule collection

Reimplemented in CaBasedCellPopulation< DIM >.

Definition at line 125 of file AbstractOnLatticeCellPopulation.cpp.

Referenced by OnLatticeSimulation< DIM >::OutputAdditionalSimulationSetup().

◆ OutputCellPopulationParameters()

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

◆ RemoveAllUpdateRules()

template<unsigned DIM>
void AbstractOnLatticeCellPopulation< DIM >::RemoveAllUpdateRules ( )
virtual

Remove any update rules previously passed to this population.

Reimplemented in CaBasedCellPopulation< DIM >.

Definition at line 131 of file AbstractOnLatticeCellPopulation.cpp.

Referenced by CaBasedCellPopulation< DIM >::RemoveAllUpdateRules(), and OnLatticeSimulation< DIM >::RemoveAllUpdateRules().

◆ serialize()

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

Serialize the object and its member variables.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 59 of file AbstractOnLatticeCellPopulation.hpp.

References AbstractOnLatticeCellPopulation< DIM >::mIterateRandomlyOverUpdateRuleCollection, AbstractOnLatticeCellPopulation< DIM >::mUpdateNodesInRandomOrder, and AbstractOnLatticeCellPopulation< DIM >::mUpdateRuleCollection.

◆ SetIterateRandomlyOverUpdateRuleCollection()

template<unsigned DIM>
void AbstractOnLatticeCellPopulation< DIM >::SetIterateRandomlyOverUpdateRuleCollection ( bool  iterateRandomly)

Set mIterateRandomlyOverUpdateRuleCollection.

Parameters
iterateRandomlywhether to iterate randomly over mUpdateRuleCollection

Definition at line 83 of file AbstractOnLatticeCellPopulation.cpp.

◆ SetNode()

template<unsigned DIM>
void AbstractOnLatticeCellPopulation< DIM >::SetNode ( unsigned  index,
ChastePoint< DIM > &  rNewLocation 
)

Overridden SetNode() method.

This method throws an exception if called on a subclass of AbstractOnLatticeCellPopulation, since in such classes the lattice is assumed to be fixed.

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

Definition at line 95 of file AbstractOnLatticeCellPopulation.cpp.

References EXCEPTION.

◆ SetUpdateNodesInRandomOrder()

template<unsigned DIM>
void AbstractOnLatticeCellPopulation< DIM >::SetUpdateNodesInRandomOrder ( bool  updateNodesInRandomOrder)

Get whether we update nodes in a random order.

Parameters
updateNodesInRandomOrderWhether to update nodes in a random order.

Definition at line 77 of file AbstractOnLatticeCellPopulation.cpp.

◆ UpdateCellLocations()

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

Update cell locations over the course of a time step of specified length.

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

Parameters
dttime step

Implemented in CaBasedCellPopulation< DIM >, and PottsBasedCellPopulation< DIM >.

Referenced by OnLatticeSimulation< DIM >::UpdateCellLocationsAndTopology().

Friends And Related Symbol Documentation

◆ boost::serialization::access

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

Needed for serialization.

Definition at line 51 of file AbstractOnLatticeCellPopulation.hpp.

Member Data Documentation

◆ mDeleteMesh

template<unsigned DIM>
bool AbstractOnLatticeCellPopulation< DIM >::mDeleteMesh
protected

Whether to delete the mesh when we are destroyed. Needed if this cell population has been de-serialized.

Definition at line 79 of file AbstractOnLatticeCellPopulation.hpp.

◆ mIterateRandomlyOverUpdateRuleCollection

template<unsigned DIM>
bool AbstractOnLatticeCellPopulation< DIM >::mIterateRandomlyOverUpdateRuleCollection
protected

Whether to iterate randomly over mUpdateRuleCollection when updating cell locations. Initialized to false in the constructor.

Definition at line 91 of file AbstractOnLatticeCellPopulation.hpp.

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

◆ mUpdateNodesInRandomOrder

template<unsigned DIM>
bool AbstractOnLatticeCellPopulation< DIM >::mUpdateNodesInRandomOrder
protected

Whether to update nodes in random order. Initialized to true in the constructor.

Definition at line 85 of file AbstractOnLatticeCellPopulation.hpp.

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

◆ mUpdateRuleCollection

template<unsigned DIM>
std::vector<boost::shared_ptr<AbstractUpdateRule<DIM> > > AbstractOnLatticeCellPopulation< DIM >::mUpdateRuleCollection
protected

The update rules used to determine the new location of the cells. These rules specify how individual cells move into free spaces.

Definition at line 73 of file AbstractOnLatticeCellPopulation.hpp.

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


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