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

#include <AbstractCellPopulation.hpp>

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

List of all members.

Classes

class  Iterator

Public Member Functions

 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 &dataName, double dataValue)
AbstractMesh< ELEMENT_DIM,
SPACE_DIM > & 
rGetMesh ()
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 CellPtr AddCell (CellPtr pNewCell, const c_vector< double, SPACE_DIM > &rCellDivisionVector, CellPtr pParentCell=CellPtr())=0
virtual unsigned RemoveDeadCells ()=0
virtual void Update (bool hasHadBirthsOrDeaths=true)=0
std::vector< unsignedGetCellMutationStateCount ()
const std::vector< unsigned > & rGetCellProliferativeTypeCount () const
const std::vector< unsigned > & rGetCellCyclePhaseCount () const
unsigned GetNumRealCells ()
void SetCellAncestorsToLocationIndices ()
void WriteCellIdDataToFile ()
std::set< unsignedGetCellAncestors ()
CellPtr GetCellUsingLocationIndex (unsigned index)
std::set< CellPtr > GetCellsUsingLocationIndex (unsigned index)
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
< CellPropertyRegistry
GetCellPropertyRegistry ()
void SetDefaultMutationStateOrdering ()
virtual double GetWidth (const unsigned &rDimension)=0
virtual double GetVolumeOfCell (CellPtr pCell)=0
virtual std::set< unsignedGetNeighbouringNodeIndices (unsigned index)=0
c_vector< double, SPACE_DIM > GetCentroidOfCellPopulation ()
virtual void CreateOutputFiles (const std::string &rDirectory, bool cleanOutputDirectory)
virtual void WriteResultsToFiles ()
virtual void WriteTimeAndNodeResultsToFiles ()
virtual void GenerateCellResultsAndWriteToFiles ()=0
virtual void GenerateCellResults (CellPtr pCell, std::vector< unsigned > &rCellProliferativeTypeCounter, std::vector< unsigned > &rCellCyclePhaseCounter)
virtual void WriteCellVolumeResultsToFile ()=0
void WriteCellResultsToFiles (std::vector< unsigned > &rCellProliferativeTypeCounter, std::vector< unsigned > &rCellCyclePhaseCounter)
virtual void CloseOutputFiles ()
void OutputCellPopulationInfo (out_stream &rParamsFile)
virtual void OutputCellPopulationParameters (out_stream &rParamsFile)=0
bool GetOutputCellIdData ()
bool GetOutputCellMutationStates ()
bool GetOutputCellAncestors ()
bool GetOutputCellProliferativeTypes ()
bool GetOutputCellVariables ()
bool GetOutputCellCyclePhases ()
bool GetOutputCellAges ()
bool GetOutputCellVolumes ()
void SetOutputCellIdData (bool outputCellIdData)
void SetOutputCellMutationStates (bool outputCellMutationStates)
void SetOutputCellAncestors (bool outputCellAncestors)
void SetOutputCellProliferativeTypes (bool outputCellProliferativeTypes)
void SetOutputCellVariables (bool outputCellVariables)
void SetOutputCellCyclePhases (bool outputCellCyclePhases)
void SetOutputCellAges (bool outputCellAges)
void SetOutputCellVolumes (bool outputCellVolumes)
c_vector< double, SPACE_DIM > GetSizeOfCellPopulation ()
Iterator Begin ()
Iterator End ()

Protected Member Functions

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

Protected Attributes

std::map< unsigned, std::set
< CellPtr > > 
mLocationCellMap
std::map< Cell *, unsignedmCellLocationMap
AbstractMesh< ELEMENT_DIM,
SPACE_DIM > & 
mrMesh
std::list< CellPtr > mCells
std::vector< unsignedmCellProliferativeTypeCount
std::vector< unsignedmCellCyclePhaseCount
c_vector< double, SPACE_DIM > mCentroid
out_stream mpVizNodesFile
out_stream mpVizCellProliferativeTypesFile
out_stream mpVizCellProliferativePhasesFile
out_stream mpCellMutationStatesFile
out_stream mpVizCellAncestorsFile
out_stream mpCellProliferativeTypesFile
out_stream mpCellCyclePhasesFile
out_stream mpCellVariablesFile
out_stream mpCellAgesFile
out_stream mpCellIdFile
out_stream mpCellVolumesFile
out_stream mpVizBoundaryNodesFile
std::string mDirPath
out_stream mpVtkMetaFile
boost::shared_ptr
< CellPropertyRegistry
mpCellPropertyRegistry
bool mOutputCellIdData
bool mOutputCellMutationStates
bool mOutputCellAncestors
bool mOutputCellProliferativeTypes
bool mOutputCellVariables
bool mOutputCellCyclePhases
bool mOutputCellAges
bool mOutputCellVolumes

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 AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >

An abstract facade class encapsulating a cell population.

Contains a group of cells and associated methods.

Definition at line 75 of file AbstractCellPopulation.hpp.


Constructor & Destructor Documentation

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

Constructor that just takes in a mesh.

Parameters:
rMeshthe mesh for the population.

Definition at line 111 of file AbstractCellPopulation.cpp.

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

AbstractCellPopulation Constructor.

Note:
Warning: the passed-in vector of cells will be emptied, even if the constructor throws an exception!
Parameters:
rMesha refernce to the mesh underlying the cell population
rCellsa vector of cells. Copies of the cells will be stored in the cell population, and the passed-in vector cleared.
locationIndicesan optional vector of location indices that correspond to real cells

Definition at line 42 of file AbstractCellPopulation.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::AddCellUsingLocationIndex(), EXCEPTION, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mCellCyclePhaseCount, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mCellLocationMap, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mCellProliferativeTypeCount, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mCells, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mLocationCellMap, and AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpCellPropertyRegistry.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::~AbstractCellPopulation ( ) [virtual]

Base class with virtual methods needs a virtual destructor.

Definition at line 117 of file AbstractCellPopulation.cpp.


Member Function Documentation

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

Add a new cell to the cell population.

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

Parameters:
pNewCellthe cell to add
rCellDivisionVectora vector providing information regarding how the cell division should occur (for cell-centre cell populations, this vector is the position of the daughter cell; for vertex cell populations it can be used by any subclass of CellBasedSimulation to as a means of dictating the axis along which the parent cell divides)
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).

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::AddCellUsingLocationIndex ( unsigned  index,
CellPtr  pCell 
) [virtual]

Adds a cell to a given location index.

Parameters:
indexthe location index
pCellthe cell.

Reimplemented in MultipleCaBasedCellPopulation< DIM >.

Definition at line 291 of file AbstractCellPopulation.cpp.

Referenced by AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::AbstractCellPopulation(), and MultipleCaBasedCellPopulation< DIM >::AddCellUsingLocationIndex().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Begin ( )
Returns:
iterator pointing to the first cell in the cell population

Definition at line 878 of file AbstractCellPopulation.hpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mCells.

Referenced by CryptProjectionForce::AddForceContribution(), DiffusionForce< DIM >::AddForceContribution(), ChemotacticForce< DIM >::AddForceContribution(), BuskeCompressionForce< DIM >::AddForceContribution(), SloughingCellKiller< DIM >::CheckAndLabelCellsForApoptosisOrDeath(), RadialSloughingCellKiller::CheckAndLabelCellsForApoptosisOrDeath(), RandomCellKiller< DIM >::CheckAndLabelCellsForApoptosisOrDeath(), PlaneBasedCellKiller< DIM >::CheckAndLabelCellsForApoptosisOrDeath(), ApoptoticCellKiller< SPACE_DIM >::CheckAndLabelCellsForApoptosisOrDeath(), CryptStatistics::GetCryptSection(), CryptProjectionStatistics::GetCryptSection(), CryptSimulationBoundaryCondition< DIM >::ImposeBoundaryCondition(), SphereGeometryBoundaryCondition< DIM >::ImposeBoundaryCondition(), PlaneBoundaryCondition< DIM >::ImposeBoundaryCondition(), CellBasedPdeHandler< DIM >::InitialiseCellPdeElementMap(), AbstractCryptStatistics::LabelAllCellsAsHealthy(), AbstractCryptStatistics::LabelSPhaseCells(), CellwiseDataGradient< DIM >::SetupGradients(), VolumeDependentAveragedSourcePde< DIM >::SetupSourceTerms(), AveragedSourcePde< DIM >::SetupSourceTerms(), CellBasedPdeHandler< DIM >::SolvePdeAndWriteResultsToFile(), VolumeTrackedOffLatticeSimulation< DIM >::UpdateCellData(), DeltaNotchOffLatticeSimulation< DIM >::UpdateCellData(), OnLatticeSimulation< DIM >::UpdateCellLocationsAndTopology(), CellBasedPdeHandler< DIM >::UpdateCellPdeElementMap(), CryptProjectionForce::UpdateNode3dLocationMap(), CryptSimulationBoundaryCondition< DIM >::VerifyBoundaryCondition(), SphereGeometryBoundaryCondition< DIM >::VerifyBoundaryCondition(), PlaneBoundaryCondition< DIM >::VerifyBoundaryCondition(), CellBasedPdeHandler< DIM >::WriteAverageRadialPdeSolution(), and CellBasedPdeHandler< DIM >::WritePdeSolution().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::CreateOutputFiles ( const std::string &  rDirectory,
bool  cleanOutputDirectory 
) [virtual]

Use an output file handler to create output files for visualizer and post-processing.

Parameters:
rDirectorypathname of the output directory, relative to where Chaste output is stored
cleanOutputDirectorywhether to delete the contents of the output directory prior to output file creation

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

Definition at line 374 of file AbstractCellPopulation.cpp.

References PetscTools::AmMaster(), and OutputFileHandler::OpenOutputFile().

Referenced by VertexBasedCellPopulation< DIM >::CreateOutputFiles(), PottsBasedCellPopulation< DIM >::CreateOutputFiles(), MultipleCaBasedCellPopulation< DIM >::CreateOutputFiles(), and MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::CreateOutputFiles().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GenerateCellResults ( CellPtr  pCell,
std::vector< unsigned > &  rCellProliferativeTypeCounter,
std::vector< unsigned > &  rCellCyclePhaseCounter 
) [virtual]

Generate results for a given cell in the current cell population state to output files.

Parameters:
pCellpointer to the cell
rCellProliferativeTypeCountercell type counter
rCellCyclePhaseCountercell cycle phase counter

Definition at line 499 of file AbstractCellPopulation.cpp.

References CellPropertyCollection::GetProperties(), CellPropertyCollection::GetProperty(), NEVER_REACHED, and UNSIGNED_UNSET.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
virtual void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GenerateCellResultsAndWriteToFiles ( ) [pure virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::set< unsigned > AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetCellAncestors ( )

Loops over cells and makes a list of the ancestors that are part of the cell population.

Returns:
remaining_ancestors The size of this set tells you how many clonal populations remain.

Definition at line 175 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< unsigned > AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetCellMutationStateCount ( )

Find out how many cells of each mutation state there are

Returns:
The number of cells of each mutation state (evaluated at each visualizer output) [0] = healthy count [1] = APC one hit [2] = APC two hit [3] = beta catenin one hit

Definition at line 186 of file AbstractCellPopulation.cpp.

References EXCEPTION.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
boost::shared_ptr< CellPropertyRegistry > AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetCellPropertyRegistry ( )
Returns:
registry of cell properties used in this cell population.

Definition at line 333 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::set< CellPtr > AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetCellsUsingLocationIndex ( unsigned  index)

Get the set of cells corresponding to a given location index.

Note the set may be empty.

Parameters:
indexthe location index
Returns:
the set of cells.

Definition at line 253 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
CellPtr AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetCellUsingLocationIndex ( unsigned  index)
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
c_vector< double, SPACE_DIM > AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetCentroidOfCellPopulation ( )

Returns the centroid of the cell population.

Definition at line 354 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationIndexUsingCell ( CellPtr  pCell)
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
virtual c_vector<double, SPACE_DIM> AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationOfCellCentre ( CellPtr  pCell) [pure virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
virtual std::set<unsigned> AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetNeighbouringNodeIndices ( unsigned  index) [pure virtual]

Given a node index, returns the set of neighbouring node indices.

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

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

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
virtual Node<SPACE_DIM>* AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetNode ( unsigned  index) [pure virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
virtual unsigned AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetNumNodes ( ) [pure virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetNumRealCells ( )

Get the number of real cells.

Definition at line 154 of file AbstractCellPopulation.cpp.

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetOutputCellAges ( )
Returns:
mOutputCellAges

Definition at line 908 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetOutputCellAncestors ( )
Returns:
mOutputCellAncestors

Definition at line 884 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetOutputCellCyclePhases ( )
Returns:
mOutputCellCyclePhases

Definition at line 902 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetOutputCellIdData ( )
Returns:
mOutputCellIdData

Definition at line 872 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetOutputCellMutationStates ( )
Returns:
mOutputCellMutationStates

Definition at line 878 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetOutputCellProliferativeTypes ( )
Returns:
mOutputCellProliferativeTypes

Definition at line 890 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetOutputCellVariables ( )
Returns:
mOutputCellVariables

Definition at line 896 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetOutputCellVolumes ( )
Returns:
mOutputCellVolumes

Definition at line 914 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
c_vector< double, SPACE_DIM > AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetSizeOfCellPopulation ( )
Returns:
The width (maximum distance to centroid) of the cell population in each dimension

Definition at line 972 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
virtual double AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetVolumeOfCell ( CellPtr  pCell) [pure virtual]

Get the volume (or area in 2D, or length in 1D) of a given cell.

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

Parameters:
pCellboost shared pointer to a cell

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
virtual double AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetWidth ( const unsigned rDimension) [pure virtual]

Calculate the 'width' of any dimension of the cell population.

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

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

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::InitialiseCells ( )

Initialise each cell's cell-cycle model.

Definition at line 122 of file AbstractCellPopulation.cpp.

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

Helper method for establishing if a cell is real.

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

Parameters:
pCellthe cell
Returns:
whether a given cell is associated with a deleted node (cell-centre models) or element (vertex models).

Implemented in AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >, MultipleCaBasedCellPopulation< DIM >, PottsBasedCellPopulation< DIM >, VertexBasedCellPopulation< DIM >, AbstractCentreBasedCellPopulation< DIM >, and AbstractCentreBasedCellPopulation< ELEMENT_DIM, ELEMENT_DIM >.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::IsCellAttachedToLocationIndex ( unsigned  index)

Returns whether or not a cell is associated with a location index

Parameters:
indexthe location index
Returns:
the cell.

Definition at line 260 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::MoveCellInLocationMap ( CellPtr  pCell,
unsigned  old_index,
unsigned  new_index 
)

Change the location index of a cell in mLocationCellMap and mCellLocationMap

Parameters:
pCellthe cell to move
old_indexthe old location index
new_indexthe new location index

Definition at line 314 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::OutputCellPopulationInfo ( out_stream &  rParamsFile)

Outputs CellPopulation used in the simulation to file and then calls OutputCellPopulationParameters to output all relevant parameters.

Parameters:
rParamsFilethe file stream to which the parameters are output

Definition at line 814 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::RemoveCellUsingLocationIndex ( unsigned  index,
CellPtr  pCell 
) [virtual]

Removes a cell from a given location index.

Parameters:
indexthe location index
pCellthe cell.

Reimplemented in MultipleCaBasedCellPopulation< DIM >.

Definition at line 298 of file AbstractCellPopulation.cpp.

References EXCEPTION.

Referenced by MultipleCaBasedCellPopulation< DIM >::RemoveCellUsingLocationIndex().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
virtual unsigned AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::RemoveDeadCells ( ) [pure virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
const std::vector< unsigned > & AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::rGetCellCyclePhaseCount ( ) const

Find out how many cells in each cell cycle phase there are

Returns:
The number of cells of each phase (evaluated at each visualizer output) [0] = G_ZERO_PHASE [1] = G_ONE_PHASE [2] = S_PHASE [3] = G_TWO_PHASE [4] = M_PHASE

Definition at line 222 of file AbstractCellPopulation.cpp.

References EXCEPTION.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
const std::vector< unsigned > & AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::rGetCellProliferativeTypeCount ( ) const

Find out how many cells of each type there are

Returns:
The number of cells of each type (evaluated at each visualizer output) [0] = STEM [1] = TRANSIT [2] = DIFFERENTIATED

Definition at line 212 of file AbstractCellPopulation.cpp.

References EXCEPTION.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::list< CellPtr > & AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::rGetCells ( )
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractMesh< ELEMENT_DIM, SPACE_DIM > & AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::rGetMesh ( )
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetCellAncestorsToLocationIndices ( )

Sets the Ancestor index of all the cells at this time to be the same as their location index, can be used to trace clonal populations.

Definition at line 165 of file AbstractCellPopulation.cpp.

References MAKE_PTR_ARGS.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetCellUsingLocationIndex ( unsigned  index,
CellPtr  pCell 
)

Set the cell corresponding to a given location index.

Assumes there is one cell for each location index and replaces any existing cell attached to the location index. If you wish to attach an additional cell to a location index use AddCellUsingLocaitonIndex as SetCellUsingLocation Index will overwrite cells attached to this index.

Parameters:
indexthe location index
pCellthe cell.

Definition at line 277 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetDataOnAllCells ( const std::string &  dataName,
double  dataValue 
)

Add an item of cell data to every cell in the population

Parameters:
dataNameis the name associated with the data
dataValueis the value of the data, initially the same for each cell

Definition at line 131 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetDefaultMutationStateOrdering ( )

Set a default ordering on mutation states, so that existing tests don't need to specify the old ordering explicitly.

Definition at line 339 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
virtual void AbstractCellPopulation< 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

Implemented in AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >, MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >, and AbstractOffLatticeCellPopulation< ELEMENT_DIM, ELEMENT_DIM >.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetOutputCellAges ( bool  outputCellAges)

Set mOutputCellAges.

Parameters:
outputCellAgesthe new value of mOutputCellAges

Definition at line 960 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetOutputCellAncestors ( bool  outputCellAncestors)

Set mOutputCellAncestors.

Parameters:
outputCellAncestorsthe new value of mOutputCellAncestors

Definition at line 936 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetOutputCellCyclePhases ( bool  outputCellCyclePhases)

Set mOutputCellCyclePhases.

Parameters:
outputCellCyclePhasesthe new value of mOutputCellCyclePhases

Definition at line 954 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetOutputCellIdData ( bool  outputCellIdData)

Set mOutputCellIdData.

Parameters:
outputCellIdDatathe new value of mOutputCellIdData

Definition at line 924 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetOutputCellMutationStates ( bool  outputCellMutationStates)

Set mOutputCellMutationStates.

Parameters:
outputCellMutationStatesthe new value of mOutputCellMutationStates

Definition at line 930 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetOutputCellProliferativeTypes ( bool  outputCellProliferativeTypes)

Set mOutputCellProliferativeTypes.

Parameters:
outputCellProliferativeTypesthe new value of mOutputCellProliferativeTypes

Definition at line 942 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetOutputCellVariables ( bool  outputCellVariables)

Set mOutputCellVariables.

Parameters:
outputCellVariablesthe new value of mOutputCellVariables

Definition at line 948 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetOutputCellVolumes ( bool  outputCellVolumes)

Set mOutputCellVolumes.

Parameters:
outputCellVolumesthe new value of mOutputCellVolumes

Definition at line 966 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
virtual void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Update ( bool  hasHadBirthsOrDeaths = true) [pure virtual]

Remove the Nodes (for cell-centre) or VertexElements (for cell-vertex) which have been marked as deleted and update the correspondence with Cells.

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

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
virtual void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Validate ( ) [protected, pure virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::WriteCellIdDataToFile ( )

Write cell ID data to mpCellIdFile.

Definition at line 791 of file AbstractCellPopulation.cpp.

References SimulationTime::GetTime(), and SimulationTime::Instance().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::WriteCellResultsToFiles ( std::vector< unsigned > &  rCellProliferativeTypeCounter,
std::vector< unsigned > &  rCellCyclePhaseCounter 
)

Write the current state of each cell to output files.

Parameters:
rCellProliferativeTypeCountercell type counter
rCellCyclePhaseCountercell cycle phase counter

Definition at line 632 of file AbstractCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
virtual void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::WriteCellVolumeResultsToFile ( ) [pure virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::WriteTimeAndNodeResultsToFiles ( ) [virtual]

Friends And Related Function Documentation


Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
std::vector<unsigned> AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mCellCyclePhaseCount [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
std::map<Cell*, unsigned> AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mCellLocationMap [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
std::vector<unsigned> AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mCellProliferativeTypeCount [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
c_vector<double, SPACE_DIM> AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mCentroid [protected]

Population centroid

Definition at line 128 of file AbstractCellPopulation.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
std::string AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mDirPath [protected]

A cache of where the results are going (used for VTK writer).

Definition at line 167 of file AbstractCellPopulation.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
std::map<unsigned, std::set<CellPtr> > AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mLocationCellMap [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mOutputCellAges [protected]

Whether to write the cell ages to a file.

Definition at line 194 of file AbstractCellPopulation.hpp.

Referenced by AbstractCellPopulation< SPACE_DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mOutputCellAncestors [protected]

Whether to output the ancestor of each cell to a visualizer file.

Definition at line 182 of file AbstractCellPopulation.hpp.

Referenced by AbstractCellPopulation< SPACE_DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mOutputCellCyclePhases [protected]

Whether to write the cell cycle phases to a file.

Definition at line 191 of file AbstractCellPopulation.hpp.

Referenced by AbstractCellPopulation< SPACE_DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mOutputCellIdData [protected]

Whether to write cell ID data to file.

Definition at line 176 of file AbstractCellPopulation.hpp.

Referenced by AbstractCellPopulation< SPACE_DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mOutputCellMutationStates [protected]

Whether to count the number of each cell mutation state and output to file.

Definition at line 179 of file AbstractCellPopulation.hpp.

Referenced by AbstractCellPopulation< SPACE_DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mOutputCellProliferativeTypes [protected]

Whether to count the number of each cell type and output to file.

Definition at line 185 of file AbstractCellPopulation.hpp.

Referenced by AbstractCellPopulation< SPACE_DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mOutputCellVariables [protected]

Whether to write the cell variables to a file.

Definition at line 188 of file AbstractCellPopulation.hpp.

Referenced by AbstractCellPopulation< SPACE_DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mOutputCellVolumes [protected]

Whether to write the cell volumes (in 3D) or areas (in 2D) to a file.

Definition at line 197 of file AbstractCellPopulation.hpp.

Referenced by AbstractCellPopulation< SPACE_DIM >::serialize().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
out_stream AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpCellAgesFile [protected]

Results file for cell ages

Definition at line 155 of file AbstractCellPopulation.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
out_stream AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpCellCyclePhasesFile [protected]

Results file for cell cycle phases

Definition at line 149 of file AbstractCellPopulation.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
out_stream AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpCellIdFile [protected]

Results file for logged cell data.

Definition at line 158 of file AbstractCellPopulation.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
out_stream AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpCellMutationStatesFile [protected]

Results file for cell mutation states

Definition at line 140 of file AbstractCellPopulation.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
out_stream AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpCellProliferativeTypesFile [protected]

Results file for cell types

Definition at line 146 of file AbstractCellPopulation.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
boost::shared_ptr<CellPropertyRegistry> AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpCellPropertyRegistry [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
out_stream AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpCellVariablesFile [protected]

Results file for cell variables

Definition at line 152 of file AbstractCellPopulation.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
out_stream AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpCellVolumesFile [protected]

Results file for cell volume (in 3D) or area (in 2D) data.

Definition at line 161 of file AbstractCellPopulation.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
out_stream AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpVizBoundaryNodesFile [protected]

Results file for boundary nodes.

Definition at line 164 of file AbstractCellPopulation.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
out_stream AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpVizCellAncestorsFile [protected]

Results file for cell ancestors

Definition at line 143 of file AbstractCellPopulation.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
out_stream AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpVizCellProliferativePhasesFile [protected]

Results file for cell visualization

Definition at line 137 of file AbstractCellPopulation.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
out_stream AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpVizCellProliferativeTypesFile [protected]

Results file for cell visualization

Definition at line 134 of file AbstractCellPopulation.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
out_stream AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpVizNodesFile [protected]

Results file for node visualization

Definition at line 131 of file AbstractCellPopulation.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
out_stream AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpVtkMetaFile [protected]

Meta results file for VTK.

Definition at line 170 of file AbstractCellPopulation.hpp.


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