#include <CaBasedCellPopulation.hpp>
Inherits AbstractOnLatticeCellPopulation< DIM >.
Public Member Functions | |
CaBasedCellPopulation (TetrahedralMesh< DIM, DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >(), bool deleteMesh=false, bool validate=true) | |
CaBasedCellPopulation (TetrahedralMesh< DIM, DIM > &rMesh) | |
~CaBasedCellPopulation () | |
TetrahedralMesh< DIM, DIM > & | rGetMesh () |
const TetrahedralMesh< DIM, DIM > & | rGetMesh () const |
void | UpdateCellLocations (double dt) |
void | SetOnlyUseNearestNeighboursForDivision (bool onlyUseNearestNeighboursForDivision) |
bool | GetOnlyUseNearestNeighboursForDivision () |
void | AddUpdateRule (boost::shared_ptr< AbstractCaUpdateRule< DIM > > pUpdateRule) |
const std::vector < boost::shared_ptr < AbstractCaUpdateRule< DIM > > > & | rGetUpdateRuleCollection () const |
void | SetUseVonNeumannNeighbourhoods (bool useVonNeumannNeighbourhoods) |
bool | GetUseVonNeumannNeighbourhoods () |
std::vector< bool > & | rGetEmptySites () |
bool | IsEmptySite (unsigned index) |
std::set< unsigned > | GetEmptySiteIndices () |
unsigned | GetNumNodes () |
virtual Node< DIM > * | GetNode (unsigned index) |
virtual CellPtr | AddCell (CellPtr pNewCell, const c_vector< double, DIM > &rCellDivisionVector, CellPtr pParentCell=CellPtr()) |
std::vector< unsigned > | GetNeighbouringNodeIndicesVector (unsigned nodeIndex) |
std::set< unsigned > | GetFreeNeighbouringNodeIndices (unsigned nodeIndex) |
std::vector< unsigned > | GetMaximumDegreeInEachDirection (unsigned nodeIndex) |
std::set< unsigned > | GetNthDegreeNeighbouringNodeIndices (unsigned nodeIndex, unsigned degree) |
unsigned | RemoveDeadCells () |
void | Update (bool hasHadBirthsOrDeaths=true) |
void | WriteCellVolumeResultsToFile () |
void | GenerateCellResults (unsigned locationIndex, std::vector< unsigned > &rCellProliferativeTypeCounter, std::vector< unsigned > &rCellCyclePhaseCounter) |
virtual void | GenerateCellResultsAndWriteToFiles () |
bool | IsCellAssociatedWithADeletedLocation (CellPtr pCell) |
void | MoveCell (CellPtr pCell, unsigned newLocationIndex) |
c_vector< double, DIM > | GetLocationOfCellCentre (CellPtr pCell) |
void | OutputCellPopulationParameters (out_stream &rParamsFile) |
double | GetWidth (const unsigned &rDimension) |
std::set< unsigned > | GetNeighbouringNodeIndices (unsigned index) |
Private Member Functions | |
void | SetEmptySites (const std::set< unsigned > &rEmptySiteIndices) |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
void | Validate () |
void | WriteVtkResultsToFile () |
Private Attributes | |
TetrahedralMesh< DIM, DIM > & | mrMesh |
std::vector< boost::shared_ptr < AbstractCaUpdateRule< DIM > > > | mUpdateRuleCollection |
std::vector< bool > | mIsEmptySite |
bool | mOnlyUseNearestNeighboursForDivision |
bool | mUseVonNeumannNeighbourhoods |
Friends | |
class | TestCaBasedCellPopulation |
class | boost::serialization::access |
A facade class encapsulating a lattice-based cell population.
Contains a group of cells and maintains the associations between cells and nodes in the mesh which correspond to lattice sites.
Definition at line 59 of file CaBasedCellPopulation.hpp.
CaBasedCellPopulation< DIM >::CaBasedCellPopulation | ( | TetrahedralMesh< DIM, DIM > & | rMesh, | |
std::vector< CellPtr > & | rCells, | |||
const std::vector< unsigned > | locationIndices = std::vector<unsigned>() , |
|||
bool | deleteMesh = false , |
|||
bool | validate = true | |||
) | [inline] |
Create a new cell population facade from a mesh and collection of cells.
There must be precisely 1 cell for each node of the mesh.
rMesh | a mutable tetrahedral mesh | |
rCells | CellPtrs corresponding to the nodes of the mesh | |
locationIndices | an optional vector of location indices that correspond to real cells | |
deleteMesh | set to true if you want the cell population to free the mesh memory on destruction (defaults to false) | |
validate | whether to validate the cell population (defaults to false) |
Definition at line 41 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::GetNode(), CaBasedCellPopulation< DIM >::GetNumNodes(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractCellPopulation< DIM >::mCells, CaBasedCellPopulation< DIM >::mIsEmptySite, CaBasedCellPopulation< DIM >::mrMesh, CaBasedCellPopulation< DIM >::SetEmptySites(), and CaBasedCellPopulation< DIM >::Validate().
CaBasedCellPopulation< DIM >::CaBasedCellPopulation | ( | TetrahedralMesh< DIM, DIM > & | rMesh | ) | [inline] |
Constructor for use by the de-serializer.
rMesh | a tetrahedral mesh. |
Definition at line 85 of file CaBasedCellPopulation.cpp.
CaBasedCellPopulation< DIM >::~CaBasedCellPopulation | ( | ) | [inline] |
Destructor.
Definition at line 94 of file CaBasedCellPopulation.cpp.
References AbstractOnLatticeCellPopulation< DIM >::mDeleteMesh, and CaBasedCellPopulation< DIM >::mrMesh.
CellPtr CaBasedCellPopulation< DIM >::AddCell | ( | CellPtr | pNewCell, | |
const c_vector< double, DIM > & | rCellDivisionVector, | |||
CellPtr | pParentCell = CellPtr() | |||
) | [inline, virtual] |
Overridden AddCell() method.
Add a new cell to the cell population and update mIsEmptySite.
This method finds the nearest empty site to move to in the admissable directions (see diagram below).
The bool mOnlyUseNearestNeighboursForDivision is defined in the cell population constructor and says whether to only search the immediate nearest neighbours when dividing.
If there is more than one empty site at the same distance (i.e. degree) from the parent cell, then the method chooses randomly between them.
If for a given degree there are not any empty sites, then it checks for empty sites at degree+1 (provided mOnlyUseNearestNeighboursForDivision = false.
This diagram indicates the possible directions and degrees of neighbouring sites from parent cell X:
3 o o 3 o o 3 o 2 o 2 o 2 o o o 1 1 1 o o 3 2 1 X 1 2 3 o o 1 1 1 o o o 2 o 2 o 2 o 3 o o 3 o o 3
Once it has located an empty site, neighbouring cells are pushed along in that direction until the 1st degree neighbouring site is free, and the new daughter cell is put there.
If there are no free sites in any direction, currently the code throws an exception.
pNewCell | the cell to add | |
rCellDivisionVector | the position in space at which to put it | |
pParentCell | pointer to a parent cell, if required (defaults to NULL) |
Implements AbstractCellPopulation< DIM >.
Definition at line 270 of file CaBasedCellPopulation.cpp.
References EXCEPTION, CaBasedCellPopulation< DIM >::GetMaximumDegreeInEachDirection(), CaBasedCellPopulation< DIM >::GetNthDegreeNeighbouringNodeIndices(), RandomNumberGenerator::Instance(), CaBasedCellPopulation< DIM >::IsEmptySite(), AbstractCellPopulation< DIM >::mCellLocationMap, AbstractCellPopulation< DIM >::mCells, AbstractCellPopulation< DIM >::mLocationCellMap, CaBasedCellPopulation< DIM >::mOnlyUseNearestNeighboursForDivision, CaBasedCellPopulation< DIM >::MoveCell(), and RandomNumberGenerator::randMod().
void CaBasedCellPopulation< DIM >::AddUpdateRule | ( | boost::shared_ptr< AbstractCaUpdateRule< DIM > > | pUpdateRule | ) | [inline] |
Add an update rule to be used in this simulation.
pUpdateRule | pointer to an update rule |
Definition at line 179 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::mUpdateRuleCollection.
void CaBasedCellPopulation< DIM >::GenerateCellResults | ( | unsigned | locationIndex, | |
std::vector< unsigned > & | rCellProliferativeTypeCounter, | |||
std::vector< unsigned > & | rCellCyclePhaseCounter | |||
) | [inline, virtual] |
Overridden GenerateCellResults() method. Generate results for a given cell in the current cell population state to output files.
locationIndex | location index of the cell | |
rCellProliferativeTypeCounter | cell type counter | |
rCellCyclePhaseCounter | cell cycle phase counter |
Reimplemented from AbstractCellPopulation< DIM >.
Definition at line 883 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::IsEmptySite(), and AbstractCellPopulation< DIM >::mpVizCellProliferativeTypesFile.
Referenced by CaBasedCellPopulation< DIM >::GenerateCellResultsAndWriteToFiles().
void CaBasedCellPopulation< DIM >::GenerateCellResultsAndWriteToFiles | ( | ) | [inline, virtual] |
Calls GenerateCellResults() on each cell then calls WriteCellResultsToFiles().
Implements AbstractCellPopulation< DIM >.
Definition at line 900 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::GenerateCellResults(), CaBasedCellPopulation< DIM >::GetNode(), CaBasedCellPopulation< DIM >::GetNumNodes(), AbstractCellPopulation< DIM >::mCellCyclePhaseCount, AbstractCellPopulation< DIM >::mCellProliferativeTypeCount, and AbstractCellPopulation< DIM >::WriteCellResultsToFiles().
std::set< unsigned > CaBasedCellPopulation< DIM >::GetEmptySiteIndices | ( | ) | [inline] |
Definition at line 215 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::mIsEmptySite.
std::set< unsigned > CaBasedCellPopulation< DIM >::GetFreeNeighbouringNodeIndices | ( | unsigned | nodeIndex | ) | [inline] |
Locate the sites neighbouring a site (this version is a Moore neighbourhood) which are free (i.e. are empty sites).
Note: This dictates the geometry of the cell population and the type of neighbourhood used and can be overridden to use different neighbourhoods or geometries.
nodeIndex | global index of the node of interest |
Definition at line 539 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::GetNeighbouringNodeIndices(), and CaBasedCellPopulation< DIM >::IsEmptySite().
Referenced by DiffusionCaUpdateRule< DIM >::GetNewLocationOfCell().
c_vector< double, DIM > CaBasedCellPopulation< DIM >::GetLocationOfCellCentre | ( | CellPtr | pCell | ) | [inline, virtual] |
Find where a given cell is in space.
pCell | the cell |
Implements AbstractCellPopulation< DIM >.
Definition at line 968 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::GetNode(), and AbstractCellPopulation< DIM >::mCellLocationMap.
std::vector< unsigned > CaBasedCellPopulation< DIM >::GetMaximumDegreeInEachDirection | ( | unsigned | nodeIndex | ) | [inline] |
Return the maximum degree that is permissable for a given node in each direction for which this maximum degree is non-zero.
The vector uses the ordering N, NW, W, SW, S, SE, E, NE (i.e. anticlockwise).
This degree corresponds to the number of nodes from the given node up to and including the boundary node in each direction.
nodeIndex | index of the node of interest |
Definition at line 461 of file CaBasedCellPopulation.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetWidth(), and CaBasedCellPopulation< DIM >::mrMesh.
Referenced by CaBasedCellPopulation< DIM >::AddCell(), and CaBasedCellPopulation< DIM >::GetNthDegreeNeighbouringNodeIndices().
std::set< unsigned > CaBasedCellPopulation< DIM >::GetNeighbouringNodeIndices | ( | unsigned | index | ) | [inline, virtual] |
Overridden GetNeighbouringNodeIndices() method.
Locate the sites neighbouring a site (this version is a Moore neighbourhood). Note: This dictates the geometry of the cell population and the type of neighbourhood used and can be overridden to use different neighbourhoods or geometries.
index | the node index |
Implements AbstractCellPopulation< DIM >.
Definition at line 560 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::GetNeighbouringNodeIndicesVector().
Referenced by CaBasedCellPopulation< DIM >::GetFreeNeighbouringNodeIndices().
std::vector< unsigned > CaBasedCellPopulation< DIM >::GetNeighbouringNodeIndicesVector | ( | unsigned | nodeIndex | ) | [inline] |
Same method as GetNeighbouringNodeIndices() above, but returns an ORDERED vector of neighbouring nodes, in the order N, NW, W, SW, S, SE, E, NE. This is needed to make GetNthDegreeNeighbouringNodeIndices work, as this exploits the ordering of the neighbours.
nodeIndex | global index of the node of interest |
Definition at line 576 of file CaBasedCellPopulation.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetWidth(), CaBasedCellPopulation< DIM >::mrMesh, CaBasedCellPopulation< DIM >::mUseVonNeumannNeighbourhoods, and NEVER_REACHED.
Referenced by CaBasedCellPopulation< DIM >::GetNeighbouringNodeIndices(), and CaBasedCellPopulation< DIM >::GetNthDegreeNeighbouringNodeIndices().
Node< DIM > * CaBasedCellPopulation< DIM >::GetNode | ( | unsigned | index | ) | [inline, virtual] |
Overridden GetNode() method.
index | global index of the specified Node |
Implements AbstractCellPopulation< DIM >.
Definition at line 258 of file CaBasedCellPopulation.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), and CaBasedCellPopulation< DIM >::mrMesh.
Referenced by CaBasedCellPopulation< DIM >::CaBasedCellPopulation(), CaBasedCellPopulation< DIM >::GenerateCellResultsAndWriteToFiles(), CaBasedCellPopulation< DIM >::GetLocationOfCellCentre(), and CaBasedCellPopulation< DIM >::WriteCellVolumeResultsToFile().
std::set< unsigned > CaBasedCellPopulation< DIM >::GetNthDegreeNeighbouringNodeIndices | ( | unsigned | nodeIndex, | |
unsigned | degree | |||
) | [inline] |
Locate the sites in n-th degree neighbouring sites (this version is a Moore neighbourhood). Note: This dictates the geometry of the cell population and the type of neighbourhood used and can be overridden to use cell population neighbourhoods or geometries.
nodeIndex | global index of the node of interest | |
degree | how far away to look for neighbours, i.e. 1 would be the nearest neighbours |
Definition at line 512 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::GetMaximumDegreeInEachDirection(), and CaBasedCellPopulation< DIM >::GetNeighbouringNodeIndicesVector().
Referenced by CaBasedCellPopulation< DIM >::AddCell().
unsigned CaBasedCellPopulation< DIM >::GetNumNodes | ( | ) | [inline, virtual] |
Overridden GetNumNodes() method.
Implements AbstractCellPopulation< DIM >.
Definition at line 264 of file CaBasedCellPopulation.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllNodes(), and CaBasedCellPopulation< DIM >::mrMesh.
Referenced by CaBasedCellPopulation< DIM >::CaBasedCellPopulation(), CaBasedCellPopulation< DIM >::GenerateCellResultsAndWriteToFiles(), and CaBasedCellPopulation< DIM >::Validate().
bool CaBasedCellPopulation< DIM >::GetOnlyUseNearestNeighboursForDivision | ( | ) | [inline] |
Get mOnlyUseNearestNeighboursForDivision.
Definition at line 173 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::mOnlyUseNearestNeighboursForDivision.
bool CaBasedCellPopulation< DIM >::GetUseVonNeumannNeighbourhoods | ( | ) | [inline] |
Definition at line 197 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::mUseVonNeumannNeighbourhoods.
double CaBasedCellPopulation< DIM >::GetWidth | ( | const unsigned & | rDimension | ) | [inline, virtual] |
Overridden GetWidth() method.
Calculate the 'width' of any dimension of the cell population by calling GetWidth() on the mesh.
rDimension | a dimension (0,1 or 2) |
Implements AbstractCellPopulation< DIM >.
Definition at line 986 of file CaBasedCellPopulation.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetWidth(), and CaBasedCellPopulation< DIM >::mrMesh.
bool CaBasedCellPopulation< DIM >::IsCellAssociatedWithADeletedLocation | ( | CellPtr | pCell | ) | [inline, virtual] |
Helper method for establishing if a cell is real.
As this method is pure virtual, it must be overridden in subclasses.
Here we don't allow deleted nodes so this always returns false.
pCell | the cell |
Implements AbstractCellPopulation< DIM >.
Definition at line 934 of file CaBasedCellPopulation.cpp.
bool CaBasedCellPopulation< DIM >::IsEmptySite | ( | unsigned | index | ) | [inline] |
Find if a given node is an empty site. The abstract method always returns false but is overridden in subclasses.
index | the global index of a specified node |
Definition at line 209 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::mIsEmptySite.
Referenced by CaBasedCellPopulation< DIM >::AddCell(), CaBasedCellPopulation< DIM >::GenerateCellResults(), CaBasedCellPopulation< DIM >::GetFreeNeighbouringNodeIndices(), DiffusionCaUpdateRule< DIM >::GetNewLocationOfCell(), AdvectionCaUpdateRule< DIM >::GetNewLocationOfCell(), CaBasedCellPopulation< DIM >::MoveCell(), and CaBasedCellPopulation< DIM >::UpdateCellLocations().
void CaBasedCellPopulation< DIM >::MoveCell | ( | CellPtr | pCell, | |
unsigned | newLocationIndex | |||
) | [inline] |
Method to update the location of a particular cell
pCell | the cell to move | |
newLocationIndex | the location to move the cell to |
Definition at line 940 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::IsEmptySite(), AbstractCellPopulation< DIM >::mCellLocationMap, CaBasedCellPopulation< DIM >::mIsEmptySite, and AbstractCellPopulation< DIM >::mLocationCellMap.
Referenced by CaBasedCellPopulation< DIM >::AddCell(), and CaBasedCellPopulation< DIM >::UpdateCellLocations().
void CaBasedCellPopulation< DIM >::OutputCellPopulationParameters | ( | out_stream & | rParamsFile | ) | [inline, virtual] |
Outputs CellPopulation parameters to file
As this method is pure virtual, it must be overridden in subclasses.
rParamsFile | the file stream to which the parameters are output |
Reimplemented from AbstractOnLatticeCellPopulation< DIM >.
Definition at line 976 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::mOnlyUseNearestNeighboursForDivision, and CaBasedCellPopulation< DIM >::mUseVonNeumannNeighbourhoods.
unsigned CaBasedCellPopulation< DIM >::RemoveDeadCells | ( | ) | [inline, virtual] |
Remove all cells that are labelled as dead.
Note that this now calls MutableMesh::DeleteNodePriorToReMesh() and therefore a ReMesh(map) must be called before any element information is used.
Note also that after calling this method the cell population will be in an inconsistent state until Update() is called! So don't try iterating over cells or anything like that.
Implements AbstractCellPopulation< DIM >.
Definition at line 783 of file CaBasedCellPopulation.cpp.
References AbstractCellPopulation< DIM >::GetLocationIndexUsingCell(), AbstractCellPopulation< DIM >::mCellLocationMap, AbstractCellPopulation< DIM >::mCells, CaBasedCellPopulation< DIM >::mIsEmptySite, and AbstractCellPopulation< DIM >::mLocationCellMap.
std::vector< bool > & CaBasedCellPopulation< DIM >::rGetEmptySites | ( | ) | [inline] |
Definition at line 203 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::mIsEmptySite.
const TetrahedralMesh< DIM, DIM > & CaBasedCellPopulation< DIM >::rGetMesh | ( | ) | const [inline] |
Definition at line 252 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::mrMesh.
TetrahedralMesh< DIM, DIM > & CaBasedCellPopulation< DIM >::rGetMesh | ( | ) | [inline] |
Definition at line 246 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::mrMesh.
Referenced by AdvectionCaUpdateRule< DIM >::GetNewLocationOfCell().
const std::vector< boost::shared_ptr< AbstractCaUpdateRule< DIM > > > & CaBasedCellPopulation< DIM >::rGetUpdateRuleCollection | ( | ) | const [inline] |
Get the collection of update rules to be used in this simulation.
Definition at line 185 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::mUpdateRuleCollection.
void CaBasedCellPopulation< DIM >::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
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.
archive | the archive | |
version | the current version of this class |
Reimplemented from AbstractOnLatticeCellPopulation< DIM >.
Definition at line 108 of file CaBasedCellPopulation.hpp.
References CaBasedCellPopulation< DIM >::mIsEmptySite, CaBasedCellPopulation< DIM >::mOnlyUseNearestNeighboursForDivision, CaBasedCellPopulation< DIM >::mUpdateRuleCollection, and CaBasedCellPopulation< DIM >::mUseVonNeumannNeighbourhoods.
void CaBasedCellPopulation< DIM >::SetEmptySites | ( | const std::set< unsigned > & | rEmptySiteIndices | ) | [inline, private] |
Set the empty sites by taking in a set of which nodes indices are empty sites.
rEmptySiteIndices | set of node indices corresponding to empty sites |
Definition at line 229 of file CaBasedCellPopulation.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), CaBasedCellPopulation< DIM >::mIsEmptySite, CaBasedCellPopulation< DIM >::mrMesh, and CaBasedCellPopulation< DIM >::Validate().
Referenced by CaBasedCellPopulation< DIM >::CaBasedCellPopulation().
void CaBasedCellPopulation< DIM >::SetOnlyUseNearestNeighboursForDivision | ( | bool | onlyUseNearestNeighboursForDivision | ) | [inline] |
Set mOnlyUseNearestNeighboursForDivision.
onlyUseNearestNeighboursForDivision | whether to only search the next nearest neighbours for an empty site when a cell is going to divide. |
Definition at line 167 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::mOnlyUseNearestNeighboursForDivision.
void CaBasedCellPopulation< DIM >::SetUseVonNeumannNeighbourhoods | ( | bool | useVonNeumannNeighbourhoods | ) | [inline] |
Set method for mUseVonNeumannNeighbourhoods.
useVonNeumannNeighbourhoods | whether to use von Neumann neighbourhoods |
Definition at line 191 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::mUseVonNeumannNeighbourhoods.
void CaBasedCellPopulation< DIM >::Update | ( | bool | hasHadBirthsOrDeaths = true |
) | [inline, virtual] |
Overridden Update(bool hasHadBirthsOrDeaths) method. Fixes up the mappings between cells and nodes.
hasHadBirthsOrDeaths | whether there has been any cell division or cell death prior to the update (defaults to true) |
Implements AbstractCellPopulation< DIM >.
Definition at line 811 of file CaBasedCellPopulation.cpp.
References CaBasedCellPopulation< DIM >::Validate().
void CaBasedCellPopulation< DIM >::UpdateCellLocations | ( | double | dt | ) | [inline, virtual] |
Overridden UpdateCellLocations() method.
dt | time step |
Implements AbstractOnLatticeCellPopulation< DIM >.
Definition at line 103 of file CaBasedCellPopulation.cpp.
References AbstractCellPopulation< DIM >::Begin(), AbstractCellPopulation< DIM >::End(), AbstractCellPopulation< DIM >::GetLocationIndexUsingCell(), CaBasedCellPopulation< DIM >::IsEmptySite(), AbstractOnLatticeCellPopulation< DIM >::mIterateRandomlyOverUpdateRuleCollection, CaBasedCellPopulation< DIM >::MoveCell(), AbstractOnLatticeCellPopulation< DIM >::mUpdateNodesInRandomOrder, and CaBasedCellPopulation< DIM >::mUpdateRuleCollection.
void CaBasedCellPopulation< DIM >::Validate | ( | ) | [inline, private, virtual] |
Check consistency of our internal data structures. Each node must have a cell associated with it.
Implements AbstractCellPopulation< DIM >.
Definition at line 817 of file CaBasedCellPopulation.cpp.
References AbstractCellPopulation< DIM >::Begin(), AbstractCellPopulation< DIM >::End(), EXCEPTION, CaBasedCellPopulation< DIM >::GetNumNodes(), AbstractCellPopulation< DIM >::mCellLocationMap, and CaBasedCellPopulation< DIM >::mIsEmptySite.
Referenced by CaBasedCellPopulation< DIM >::CaBasedCellPopulation(), CaBasedCellPopulation< DIM >::SetEmptySites(), and CaBasedCellPopulation< DIM >::Update().
void CaBasedCellPopulation< DIM >::WriteCellVolumeResultsToFile | ( | ) | [inline, virtual] |
Overridden WriteCellVolumeResultsToFile() method.
Implements AbstractCellPopulation< DIM >.
Definition at line 849 of file CaBasedCellPopulation.cpp.
References AbstractCellPopulation< DIM >::Begin(), AbstractCellPopulation< DIM >::End(), AbstractCellPopulation< DIM >::GetLocationIndexUsingCell(), CaBasedCellPopulation< DIM >::GetNode(), SimulationTime::GetTime(), SimulationTime::Instance(), and AbstractCellPopulation< DIM >::mpCellVolumesFile.
void CaBasedCellPopulation< DIM >::WriteVtkResultsToFile | ( | ) | [inline, private, virtual] |
Overridden WriteVtkResultsToFile() method.
Implements AbstractCellPopulation< DIM >.
Definition at line 381 of file CaBasedCellPopulation.cpp.
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from AbstractOnLatticeCellPopulation< DIM >.
Definition at line 95 of file CaBasedCellPopulation.hpp.
std::vector<bool> CaBasedCellPopulation< DIM >::mIsEmptySite [private] |
Records whether a node is an empty site or not.
Definition at line 72 of file CaBasedCellPopulation.hpp.
Referenced by CaBasedCellPopulation< DIM >::CaBasedCellPopulation(), CaBasedCellPopulation< DIM >::GetEmptySiteIndices(), CaBasedCellPopulation< DIM >::IsEmptySite(), CaBasedCellPopulation< DIM >::MoveCell(), CaBasedCellPopulation< DIM >::RemoveDeadCells(), CaBasedCellPopulation< DIM >::rGetEmptySites(), CaBasedCellPopulation< DIM >::serialize(), CaBasedCellPopulation< DIM >::SetEmptySites(), and CaBasedCellPopulation< DIM >::Validate().
bool CaBasedCellPopulation< DIM >::mOnlyUseNearestNeighboursForDivision [private] |
Whether to only search the next nearest neighbours for an empty site when a cell is going to divide. Defaults to false in the constructor.
Definition at line 79 of file CaBasedCellPopulation.hpp.
Referenced by CaBasedCellPopulation< DIM >::AddCell(), CaBasedCellPopulation< DIM >::GetOnlyUseNearestNeighboursForDivision(), CaBasedCellPopulation< DIM >::OutputCellPopulationParameters(), CaBasedCellPopulation< DIM >::serialize(), and CaBasedCellPopulation< DIM >::SetOnlyUseNearestNeighboursForDivision().
TetrahedralMesh<DIM, DIM>& CaBasedCellPopulation< DIM >::mrMesh [private] |
Reference to the mesh associated with the cell population.
Definition at line 66 of file CaBasedCellPopulation.hpp.
Referenced by CaBasedCellPopulation< DIM >::CaBasedCellPopulation(), CaBasedCellPopulation< DIM >::GetMaximumDegreeInEachDirection(), CaBasedCellPopulation< DIM >::GetNeighbouringNodeIndicesVector(), CaBasedCellPopulation< DIM >::GetNode(), CaBasedCellPopulation< DIM >::GetNumNodes(), CaBasedCellPopulation< DIM >::GetWidth(), CaBasedCellPopulation< DIM >::rGetMesh(), CaBasedCellPopulation< DIM >::SetEmptySites(), and CaBasedCellPopulation< DIM >::~CaBasedCellPopulation().
std::vector<boost::shared_ptr<AbstractCaUpdateRule<DIM> > > CaBasedCellPopulation< DIM >::mUpdateRuleCollection [private] |
The update rules used to determine the new location of the cells.
Definition at line 69 of file CaBasedCellPopulation.hpp.
Referenced by CaBasedCellPopulation< DIM >::AddUpdateRule(), CaBasedCellPopulation< DIM >::rGetUpdateRuleCollection(), CaBasedCellPopulation< DIM >::serialize(), and CaBasedCellPopulation< DIM >::UpdateCellLocations().
bool CaBasedCellPopulation< DIM >::mUseVonNeumannNeighbourhoods [private] |
Whether to implement von Neumann neighbourhoods for dividing and moving cells. These neighbourhoods only correspond to the N, S, E, W neighbours. Defaults to false in the constructor.
Definition at line 86 of file CaBasedCellPopulation.hpp.
Referenced by CaBasedCellPopulation< DIM >::GetNeighbouringNodeIndicesVector(), CaBasedCellPopulation< DIM >::GetUseVonNeumannNeighbourhoods(), CaBasedCellPopulation< DIM >::OutputCellPopulationParameters(), CaBasedCellPopulation< DIM >::serialize(), and CaBasedCellPopulation< DIM >::SetUseVonNeumannNeighbourhoods().