Chaste Release::3.1
AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <AbstractCentreBasedCellPopulation.hpp>

Inheritance diagram for AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >:
Collaboration diagram for AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >:

List of all members.

Public Member Functions

 AbstractCentreBasedCellPopulation (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >())
c_vector< double, SPACE_DIM > GetLocationOfCellCentre (CellPtr pCell)
Node< SPACE_DIM > * GetNodeCorrespondingToCell (CellPtr pCell)
CellPtr AddCell (CellPtr pNewCell, const c_vector< double, SPACE_DIM > &rCellDivisionVector, CellPtr pParentCell=CellPtr())
std::pair< CellPtr, CellPtr > CreateCellPair (CellPtr pCell1, CellPtr pCell2)
bool IsMarkedSpring (const std::pair< CellPtr, CellPtr > &rCellPair)
void MarkSpring (std::pair< CellPtr, CellPtr > &rCellPair)
void UnmarkSpring (std::pair< CellPtr, CellPtr > &rCellPair)
bool IsCellAssociatedWithADeletedLocation (CellPtr pCell)
virtual void UpdateNodeLocations (const std::vector< c_vector< double, SPACE_DIM > > &rNodeForces, double dt)
virtual double GetDampingConstant (unsigned nodeIndex)
virtual void GenerateCellResultsAndWriteToFiles ()
virtual void WriteTimeAndNodeResultsToFiles ()
virtual bool IsGhostNode (unsigned index)
virtual bool IsParticle (unsigned index)
virtual std::set< std::pair
< Node< SPACE_DIM > *, Node
< SPACE_DIM > * > > & 
rGetNodePairs ()=0
double GetMeinekeDivisionSeparation ()
void SetMeinekeDivisionSeparation (double divisionSeparation)
virtual void OutputCellPopulationParameters (out_stream &rParamsFile)

Protected Member Functions

 AbstractCentreBasedCellPopulation (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh)
virtual void WriteVtkResultsToFile ()=0

Protected Attributes

double mMeinekeDivisionSeparation
std::set< std::pair< CellPtr,
CellPtr > > 
mMarkedSprings

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 = ELEMENT_DIM>
class AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >

An abstract facade class encapsulating a centre-based cell population, in which each cell corresponds to a Node.

Definition at line 49 of file AbstractCentreBasedCellPopulation.hpp.


Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::AbstractCentreBasedCellPopulation ( AbstractMesh< ELEMENT_DIM, SPACE_DIM > &  rMesh) [protected]

Constructor that just takes in a mesh.

Parameters:
rMeshthe mesh for the cell population.

Definition at line 48 of file AbstractCentreBasedCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::AbstractCentreBasedCellPopulation ( 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 AbstractCentreBasedCellPopulation.cpp.


Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
CellPtr AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::AddCell ( CellPtr  pNewCell,
const c_vector< double, SPACE_DIM > &  rCellDivisionVector,
CellPtr  pParentCell = CellPtr() 
) [virtual]

Add a new cell to the cell population.

Parameters:
pNewCellthe cell to add
rCellDivisionVectorthe position in space at which to put it
pParentCellpointer to a parent cell (if required)
Returns:
address of cell as it appears in the cell list

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Reimplemented in MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 69 of file AbstractCentreBasedCellPopulation.cpp.

Referenced by NodeBasedCellPopulationWithParticles< DIM >::AddCell(), NodeBasedCellPopulation< DIM >::AddCell(), and MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::AddCell().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::pair< CellPtr, CellPtr > AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::CreateCellPair ( CellPtr  pCell1,
CellPtr  pCell2 
)

Helper method that returns a set of pointers to two given Cells. Used by the spring marking routines. Elements in the returned pair are ordered by cell ID number - the cell in the pair will have a smaller ID.

Parameters:
pCell1a Cell
pCell2a Cell

Definition at line 86 of file AbstractCentreBasedCellPopulation.cpp.

Referenced by CryptProjectionForce::CalculateForceBetweenNodes(), and GeneralisedLinearSpringForce< ELEMENT_DIM, SPACE_DIM >::CalculateForceBetweenNodes().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GenerateCellResultsAndWriteToFiles ( ) [virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetDampingConstant ( unsigned  nodeIndex) [virtual]

Overridden GetDampingConstant() method.

Get the damping constant for the cell associated with this node, i.e. d in drdt = F/d.

If the cell is wild-type, then the normal damping constant is returned. If the cell has a mutation, then the mutant damping constant is returned.

Note that by default, the normal and mutant damping constants are the same. To alter the damping constant for mutant cells, call the method SetDampingConstantMutant() on the CellPopulation.

Parameters:
nodeIndexthe global index of this node
Returns:
the damping constant at the Cell associated with this node

Implements AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >.

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

Definition at line 177 of file AbstractCentreBasedCellPopulation.cpp.

Referenced by MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetDampingConstant().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
c_vector< double, SPACE_DIM > AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationOfCellCentre ( CellPtr  pCell) [virtual]

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

Parameters:
pCellthe cell
Returns:
the location of the node corresponding to this cell.

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 56 of file AbstractCentreBasedCellPopulation.cpp.

Referenced by CryptSimulation1d::CalculateCellDivisionVector(), CryptStatistics::GetCryptSection(), and CryptProjectionStatistics::GetCryptSection().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetMeinekeDivisionSeparation ( )
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
Node< SPACE_DIM > * AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetNodeCorrespondingToCell ( CellPtr  pCell)

Get a pointer to the node corresponding to a given cell.

Parameters:
pCellthe cell
Returns:
address of the node

Definition at line 62 of file AbstractCentreBasedCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::IsCellAssociatedWithADeletedLocation ( CellPtr  pCell) [virtual]

Overridden IsCellAssociatedWithADeletedLocation() method.

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

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 134 of file AbstractCentreBasedCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::IsGhostNode ( unsigned  index) [virtual]

Find if a given node is a ghost node. The method always returns false but is overridden in MeshBasedCellPopulationWithGhostNodes.

Parameters:
indexthe global index of a specified node
Returns:
whether the node is a ghost node

Reimplemented in MeshBasedCellPopulationWithGhostNodes< DIM >.

Definition at line 191 of file AbstractCentreBasedCellPopulation.cpp.

Referenced by MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::SpringIterator::operator++(), CellwiseDataGradient< DIM >::SetupGradients(), and OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::UpdateNodePositions().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::IsMarkedSpring ( const std::pair< CellPtr, CellPtr > &  rCellPair)
Parameters:
rCellPaira set of pointers to Cells
Returns:
whether the spring between two given cells is marked.

Definition at line 107 of file AbstractCentreBasedCellPopulation.cpp.

Referenced by CryptProjectionForce::CalculateForceBetweenNodes(), and GeneralisedLinearSpringForce< ELEMENT_DIM, SPACE_DIM >::CalculateForceBetweenNodes().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::IsParticle ( unsigned  index) [virtual]

Find if a given node is a particle. The method always returns false but is overridden in NodeBasedCellPopulationWithParticles.

Parameters:
indexthe global index of a specified node
Returns:
whether the node is a particle

Reimplemented in NodeBasedCellPopulationWithParticles< DIM >.

Definition at line 197 of file AbstractCentreBasedCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::MarkSpring ( std::pair< CellPtr, CellPtr > &  rCellPair)

Mark the spring between the given cells.

Parameters:
rCellPaira set of pointers to Cells

Definition at line 116 of file AbstractCentreBasedCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
virtual std::set< std::pair<Node<SPACE_DIM>*, Node<SPACE_DIM>* > >& AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::rGetNodePairs ( ) [pure virtual]

Method to return the connected nodes in a centre based simulation.

Overridden in sub classes to have correct functionality.

Returns:
Node pairs for force calculation.

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

Referenced by AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >::AddForceContribution().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
template<class Archive >
void AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetMeinekeDivisionSeparation ( double  divisionSeparation)

Set mMeinekeDivisionSeparation.

Parameters:
divisionSeparationthe new value of mMeinekeDivisionSeparation

Definition at line 322 of file AbstractCentreBasedCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::UnmarkSpring ( std::pair< CellPtr, CellPtr > &  rCellPair)

Stop marking the spring between the given cells.

Parameters:
rCellPaira set of pointers to Cells

Definition at line 125 of file AbstractCentreBasedCellPopulation.cpp.

Referenced by CryptProjectionForce::CalculateForceBetweenNodes(), and GeneralisedLinearSpringForce< ELEMENT_DIM, SPACE_DIM >::CalculateForceBetweenNodes().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::UpdateNodeLocations ( const std::vector< c_vector< double, SPACE_DIM > > &  rNodeForces,
double  dt 
) [virtual]

Overridden UpdateNodeLocations() method.

Parameters:
rNodeForcesa vector containing the force on each node in the cell population
dtthe time step

Implements AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 140 of file AbstractCentreBasedCellPopulation.cpp.

References EXCEPTION.

Referenced by NodeBasedCellPopulationWithParticles< DIM >::UpdateNodeLocations(), and MeshBasedCellPopulationWithGhostNodes< DIM >::UpdateNodeLocations().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::WriteTimeAndNodeResultsToFiles ( ) [virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
virtual void AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::WriteVtkResultsToFile ( ) [protected, pure virtual]

Friends And Related Function Documentation


Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
std::set<std::pair<CellPtr,CellPtr> > AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mMarkedSprings [protected]

Special springs that we want to keep track of for some reason. Currently used to track cells in the process of dividing (which are represented as two cells joined by a shorter spring).

Definition at line 80 of file AbstractCentreBasedCellPopulation.hpp.

Referenced by MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::CheckCellPointers(), and AbstractCentreBasedCellPopulation< ELEMENT_DIM, ELEMENT_DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
double AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mMeinekeDivisionSeparation [protected]

Initial separation placement of mother/daughter cells at birth. Has units of cell size at equilibrium rest length

Definition at line 73 of file AbstractCentreBasedCellPopulation.hpp.

Referenced by AbstractCentreBasedCellPopulation< ELEMENT_DIM, ELEMENT_DIM >::serialize().


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