#include <MeshBasedCellPopulation.hpp>
Inherits AbstractCentreBasedCellPopulation< DIM >.
Inherited by MeshBasedCellPopulationWithGhostNodes< DIM >.
A facade class encapsulating a mesh-based 'cell population'
Contains a group of cells and maintains the associations between cells and nodes in the mesh.
Definition at line 52 of file MeshBasedCellPopulation.hpp.
MeshBasedCellPopulation< DIM >::MeshBasedCellPopulation | ( | MutableMesh< 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 | cells 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 | |
validate | whether to validate the cell population |
Definition at line 40 of file MeshBasedCellPopulation.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractCellPopulation< DIM >::mCells, MeshBasedCellPopulation< DIM >::mrMesh, and MeshBasedCellPopulation< DIM >::Validate().
MeshBasedCellPopulation< DIM >::MeshBasedCellPopulation | ( | MutableMesh< DIM, DIM > & | rMesh | ) | [inline] |
Constructor for use by the de-serializer.
rMesh | a mutable tetrahedral mesh. |
Definition at line 65 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mDeleteMesh, and MeshBasedCellPopulation< DIM >::mpVoronoiTessellation.
MeshBasedCellPopulation< DIM >::~MeshBasedCellPopulation | ( | ) | [inline] |
Destructor.
Definition at line 73 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mDeleteMesh, MeshBasedCellPopulation< DIM >::mpVoronoiTessellation, and MeshBasedCellPopulation< DIM >::mrMesh.
CellPtr MeshBasedCellPopulation< DIM >::AddCell | ( | CellPtr | pNewCell, | |
const c_vector< double, DIM > & | rCellDivisionVector, | |||
CellPtr | pParentCell | |||
) | [inline, virtual] |
Overridden AddCell() method.
Add a new cell to the cell population and update mIsGhostNode.
pNewCell | the cell to add | |
rCellDivisionVector | the position in space at which to put it | |
pParentCell | pointer to a parent cell - this is required for mesh-based cell populations |
Reimplemented from AbstractCentreBasedCellPopulation< DIM >.
Reimplemented in MeshBasedCellPopulationWithGhostNodes< DIM >.
Definition at line 359 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::CreateCellPair(), and MeshBasedCellPopulation< DIM >::MarkSpring().
unsigned MeshBasedCellPopulation< DIM >::AddNode | ( | Node< DIM > * | pNewNode | ) | [inline, virtual] |
Overridden AddNode() method.
Add a new node to the cell population.
pNewNode | pointer to the new node |
Implements AbstractOffLatticeCellPopulation< DIM >.
Definition at line 97 of file MeshBasedCellPopulation.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::AddNode(), and MeshBasedCellPopulation< DIM >::mrMesh.
void MeshBasedCellPopulation< DIM >::CheckCellPointers | ( | ) | [inline] |
Helper method for use in debugging.
Definition at line 1015 of file MeshBasedCellPopulation.cpp.
References AbstractCellCycleModel::GetCell(), AbstractCellPopulation< DIM >::GetCellUsingLocationIndex(), AbstractCellPopulation< DIM >::mCellLocationMap, AbstractCellPopulation< DIM >::mCells, and MeshBasedCellPopulation< DIM >::mMarkedSprings.
void MeshBasedCellPopulation< DIM >::CloseOutputFiles | ( | ) | [inline, virtual] |
Overridden CloseOutputFiles() method.
Reimplemented from AbstractCellPopulation< DIM >.
Definition at line 399 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mOutputCellPopulationVolumes, MeshBasedCellPopulation< DIM >::mOutputVoronoiData, MeshBasedCellPopulation< DIM >::mpCellPopulationVolumesFile, MeshBasedCellPopulation< DIM >::mpVizElementsFile, and MeshBasedCellPopulation< DIM >::mpVoronoiFile.
std::pair< CellPtr, CellPtr > MeshBasedCellPopulation< DIM >::CreateCellPair | ( | CellPtr | pCell1, | |
CellPtr | pCell2 | |||
) | [inline] |
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.
Definition at line 1094 of file MeshBasedCellPopulation.cpp.
Referenced by MeshBasedCellPopulation< DIM >::AddCell(), CryptProjectionForce::CalculateForceBetweenNodes(), and GeneralisedLinearSpringForce< DIM >::CalculateForceBetweenNodes().
void MeshBasedCellPopulation< DIM >::CreateOutputFiles | ( | const std::string & | rDirectory, | |
bool | cleanOutputDirectory | |||
) | [inline, virtual] |
Overridden CreateOutputFiles() method.
rDirectory | pathname of the output directory, relative to where Chaste output is stored | |
cleanOutputDirectory | whether to delete the contents of the output directory prior to output file creation |
Reimplemented from AbstractCellPopulation< DIM >.
Definition at line 381 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mOutputCellPopulationVolumes, MeshBasedCellPopulation< DIM >::mOutputVoronoiData, MeshBasedCellPopulation< DIM >::mpCellPopulationVolumesFile, MeshBasedCellPopulation< DIM >::mpVizElementsFile, MeshBasedCellPopulation< DIM >::mpVoronoiFile, and OutputFileHandler::OpenOutputFile().
void MeshBasedCellPopulation< 3 >::CreateVoronoiTessellation | ( | ) | [inline] |
The cylindrical mesh is only defined in 2D, hence there is a separate definition for this method in 3D, which doesn't have the capability of dealing with periodic boundaries in 3D. This is /todo #1374.
Definition at line 957 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mpVoronoiTessellation, and MeshBasedCellPopulation< DIM >::mrMesh.
void MeshBasedCellPopulation< DIM >::CreateVoronoiTessellation | ( | ) |
Create a Voronoi tessellation of the mesh.
Referenced by VolumeTrackedOffLatticeSimulation< DIM >::PostSolve(), and MeshBasedCellPopulation< DIM >::TessellateIfNeeded().
double MeshBasedCellPopulation< DIM >::GetAreaBasedDampingConstantParameter | ( | ) | [inline] |
Definition at line 1142 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mAreaBasedDampingConstantParameter.
double MeshBasedCellPopulation< DIM >::GetDampingConstant | ( | unsigned | nodeIndex | ) | [inline, virtual] |
Overridden GetDampingConstant() method that includes the case of a cell-area-based damping constant.
nodeIndex | the global index of this node |
We use a linear dependence of the form
new_damping_const = old_damping_const * (d0+d1*A)
where d0, d1 are parameters, A is the cell's area, and old_damping_const is the damping constant if not using mUseAreaBasedDampingConstant
Compute the parameter d1 such that d0+A*d1=1, where A is the equilibrium area of a cell (this is equal to sqrt(3)/4, which is a third of the area of a regular hexagon of edge length 1)
The cell area should not be too large - the next assertion is to avoid getting an infinite cell area, which may occur if area-based viscosity is chosen in the absence of ghost nodes.
Reimplemented from AbstractCentreBasedCellPopulation< DIM >.
Definition at line 109 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::GetVolumeOfVoronoiElement(), MeshBasedCellPopulation< DIM >::mAreaBasedDampingConstantParameter, and MeshBasedCellPopulation< DIM >::mUseAreaBasedDampingConstant.
std::set< unsigned > MeshBasedCellPopulation< DIM >::GetNeighbouringNodeIndices | ( | unsigned | index | ) | [inline, virtual] |
Overridden GetNeighbouringNodeIndices() method.
index | the node index |
Implements AbstractCellPopulation< DIM >.
Definition at line 1199 of file MeshBasedCellPopulation.cpp.
References Node< SPACE_DIM >::ContainingElementsBegin(), Node< SPACE_DIM >::ContainingElementsEnd(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), and MeshBasedCellPopulation< DIM >::mrMesh.
Referenced by DiscreteSystemForceCalculator::CalculateFtAndFn(), and DiscreteSystemForceCalculator::GetSamplingAngles().
Node< DIM > * MeshBasedCellPopulation< DIM >::GetNode | ( | unsigned | index | ) | [inline, virtual] |
Overridden GetNode() method.
index | global index of the specified Node |
Implements AbstractCellPopulation< DIM >.
Definition at line 342 of file MeshBasedCellPopulation.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), and MeshBasedCellPopulation< DIM >::mrMesh.
Referenced by MeshBasedCellPopulationWithGhostNodes< DIM >::CalculateForceBetweenGhostNodes(), MeshBasedCellPopulationWithGhostNodes< DIM >::MeshBasedCellPopulationWithGhostNodes(), MeshBasedCellPopulation< DIM >::WriteCellVolumeResultsToFile(), MeshBasedCellPopulation< DIM >::WriteResultsToFiles(), and MeshBasedCellPopulation< DIM >::WriteVoronoiResultsToFile().
unsigned MeshBasedCellPopulation< DIM >::GetNumNodes | ( | ) | [inline, virtual] |
Overridden GetNumNodes() method.
Implements AbstractCellPopulation< DIM >.
Definition at line 348 of file MeshBasedCellPopulation.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllNodes(), and MeshBasedCellPopulation< DIM >::mrMesh.
Referenced by MeshBasedCellPopulationWithGhostNodes< DIM >::AddCell(), DiscreteSystemForceCalculator::CalculateExtremalNormalForces(), MeshBasedCellPopulationWithGhostNodes< DIM >::MeshBasedCellPopulationWithGhostNodes(), CellwiseDataGradient< DIM >::SetupGradients(), MeshBasedCellPopulationWithGhostNodes< DIM >::UpdateGhostNodesAfterReMesh(), MeshBasedCellPopulationWithGhostNodes< DIM >::UpdateGhostPositions(), MeshBasedCellPopulationWithGhostNodes< DIM >::Validate(), MeshBasedCellPopulation< DIM >::Validate(), and MeshBasedCellPopulation< DIM >::WriteVtkResultsToFile().
bool MeshBasedCellPopulation< DIM >::GetOutputCellPopulationVolumes | ( | ) | [inline] |
Definition at line 1167 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mOutputCellPopulationVolumes.
bool MeshBasedCellPopulation< DIM >::GetOutputVoronoiData | ( | ) | [inline] |
Definition at line 1155 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mOutputVoronoiData.
double MeshBasedCellPopulation< DIM >::GetSurfaceAreaOfVoronoiElement | ( | unsigned | index | ) | [inline] |
Get the surface area of the element of mpVoronoiTessellation associated with the node with this global index in the Delaunay mesh.
This method should be called instead of calling GetVoronoiTessellation()->GetSurfaceAreaOfElement() because the global indices of Delaunay nodes and Voronoi elements may not match, e.g. if a node is a ghost node or corresponds to a Voronoi face.
index | a node global index |
Definition at line 990 of file MeshBasedCellPopulation.cpp.
References VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetSurfaceAreaOfElement(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetVoronoiElementIndexCorrespondingToDelaunayNodeIndex(), and MeshBasedCellPopulation< DIM >::mpVoronoiTessellation.
Referenced by LinearSpringWithVariableSpringConstantsForce< DIM >::VariableSpringConstantMultiplicationFactor().
double MeshBasedCellPopulation< DIM >::GetVolumeOfVoronoiElement | ( | unsigned | index | ) | [inline] |
Get the volume (or area in 2D, or length in 1D) of the element of mpVoronoiTessellation associated with the node with this global index in the Delaunay mesh.
This method should be called instead of calling GetVoronoiTessellation()->GetVolumeOfElement() because the global indices of Delaunay nodes and Voronoi elements may not match, e.g. if a node is a ghost node or corresponds to a Voronoi face.
index | a node global index |
Definition at line 982 of file MeshBasedCellPopulation.cpp.
References VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetVolumeOfElement(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetVoronoiElementIndexCorrespondingToDelaunayNodeIndex(), and MeshBasedCellPopulation< DIM >::mpVoronoiTessellation.
Referenced by MeshBasedCellPopulation< DIM >::GetDampingConstant(), and VolumeTrackedOffLatticeSimulation< DIM >::PostSolve().
double MeshBasedCellPopulation< DIM >::GetVoronoiEdgeLength | ( | unsigned | index1, | |
unsigned | index2 | |||
) | [inline] |
Get the length of the edge of mpVoronoiTessellation associated with the two nodes with these global indices in the Delaunay mesh.
This method should be called instead of calling GetVoronoiTessellation()->GetEdgeLength() because the global indices of Delaunay nodes and Voronoi elements may not match, e.g. if a node is a ghost node or corresponds to a Voronoi face.
index1 | a node global index | |
index2 | a node global index |
Definition at line 998 of file MeshBasedCellPopulation.cpp.
References EXCEPTION, VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetEdgeLength(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetVoronoiElementIndexCorrespondingToDelaunayNodeIndex(), and MeshBasedCellPopulation< DIM >::mpVoronoiTessellation.
Referenced by LinearSpringWithVariableSpringConstantsForce< DIM >::VariableSpringConstantMultiplicationFactor().
VertexMesh< DIM, DIM > * MeshBasedCellPopulation< DIM >::GetVoronoiTessellation | ( | ) | [inline] |
Get a reference to mpVoronoiTessellation.
Definition at line 975 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mpVoronoiTessellation.
double MeshBasedCellPopulation< 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 1191 of file MeshBasedCellPopulation.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetWidth(), and MeshBasedCellPopulation< DIM >::mrMesh.
bool MeshBasedCellPopulation< DIM >::GetWriteVtkAsPoints | ( | ) | [inline] |
Definition at line 840 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mWriteVtkAsPoints.
bool MeshBasedCellPopulation< DIM >::IsMarkedSpring | ( | const std::pair< CellPtr, CellPtr > & | rCellPair | ) | [inline] |
rCellPair | a set of pointers to Cells |
Definition at line 1115 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mMarkedSprings.
Referenced by CryptProjectionForce::CalculateForceBetweenNodes(), and GeneralisedLinearSpringForce< DIM >::CalculateForceBetweenNodes().
void MeshBasedCellPopulation< DIM >::MarkSpring | ( | std::pair< CellPtr, CellPtr > & | rCellPair | ) | [inline] |
Mark the spring between the given cells.
rCellPair | a set of pointers to Cells |
Definition at line 1124 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mMarkedSprings.
Referenced by MeshBasedCellPopulation< DIM >::AddCell().
void MeshBasedCellPopulation< DIM >::OutputCellPopulationParameters | ( | out_stream & | rParamsFile | ) | [inline, virtual] |
Outputs CellPopulation parameters to file
rParamsFile | the file stream to which the parameters are output |
Reimplemented from AbstractCentreBasedCellPopulation< DIM >.
Reimplemented in MeshBasedCellPopulationWithGhostNodes< DIM >.
Definition at line 1179 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mAreaBasedDampingConstantParameter, MeshBasedCellPopulation< DIM >::mOutputCellPopulationVolumes, MeshBasedCellPopulation< DIM >::mOutputVoronoiData, and MeshBasedCellPopulation< DIM >::mUseAreaBasedDampingConstant.
unsigned MeshBasedCellPopulation< 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 184 of file MeshBasedCellPopulation.cpp.
References MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteNodePriorToReMesh(), AbstractCellPopulation< DIM >::mCellLocationMap, AbstractCellPopulation< DIM >::mCells, AbstractCellPopulation< DIM >::mLocationCellMap, MeshBasedCellPopulation< DIM >::mMarkedSprings, and MeshBasedCellPopulation< DIM >::mrMesh.
const MutableMesh< DIM, DIM > & MeshBasedCellPopulation< DIM >::rGetMesh | ( | ) | const [inline] |
Definition at line 178 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mrMesh.
MutableMesh< DIM, DIM > & MeshBasedCellPopulation< DIM >::rGetMesh | ( | ) | [inline] |
Definition at line 172 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mrMesh.
Referenced by DiscreteSystemForceCalculator::CalculateFtAndFn(), CryptStatistics::CellIsInSection(), CryptStatistics::CellIsInSectionPeriodic(), CryptStatistics::GetCryptSection(), DiscreteSystemForceCalculator::GetSamplingAngles(), CellwiseDataGradient< DIM >::SetupGradients(), and DiscreteSystemForceCalculator::WriteResultsToFile().
void MeshBasedCellPopulation< 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 AbstractCentreBasedCellPopulation< DIM >.
Reimplemented in MeshBasedCellPopulationWithGhostNodes< DIM >.
Definition at line 70 of file MeshBasedCellPopulation.hpp.
void MeshBasedCellPopulation< DIM >::SetAreaBasedDampingConstant | ( | bool | useAreaBasedDampingConstant | ) | [inline] |
Set method for mUseAreaBasedDampingConstant.
useAreaBasedDampingConstant | whether to use a viscosity that is linear in the cell area, rather than constant |
Definition at line 90 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mUseAreaBasedDampingConstant.
void MeshBasedCellPopulation< DIM >::SetAreaBasedDampingConstantParameter | ( | double | areaBasedDampingConstantParameter | ) | [inline] |
Set mAreaBasedDampingConstantParameter.
areaBasedDampingConstantParameter | the new value of mAreaBasedDampingConstantParameter |
Definition at line 1148 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mAreaBasedDampingConstantParameter.
void MeshBasedCellPopulation< DIM >::SetNode | ( | unsigned | nodeIndex, | |
ChastePoint< DIM > & | rNewLocation | |||
) | [inline, virtual] |
Overridden SetNode() method.
Move the node with a given index to a new point in space.
nodeIndex | the index of the node to be moved | |
rNewLocation | the new target location of the node |
Implements AbstractOffLatticeCellPopulation< DIM >.
Definition at line 103 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mrMesh, and MutableMesh< ELEMENT_DIM, SPACE_DIM >::SetNode().
void MeshBasedCellPopulation< DIM >::SetOutputCellPopulationVolumes | ( | bool | outputCellPopulationVolumes | ) | [inline] |
Set mOutputCellPopulationVolumes.
outputCellPopulationVolumes | the new value of mOutputCellPopulationVolumes |
Definition at line 1173 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mOutputCellPopulationVolumes.
void MeshBasedCellPopulation< DIM >::SetOutputVoronoiData | ( | bool | outputVoronoiData | ) | [inline] |
Set method for mOutputVoronoiData.
outputVoronoiData | whether to output cell area and perimeter information |
Definition at line 1161 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mOutputVoronoiData.
void MeshBasedCellPopulation< DIM >::SetWriteVtkAsPoints | ( | bool | writeVtkAsPoints | ) | [inline] |
Set mWriteVtkAsPoints.
writeVtkAsPoints | whether to write cells as points in VTK |
Definition at line 834 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mWriteVtkAsPoints.
MeshBasedCellPopulation< DIM >::SpringIterator MeshBasedCellPopulation< DIM >::SpringsBegin | ( | ) | [inline] |
Definition at line 922 of file MeshBasedCellPopulation.cpp.
References TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::EdgesBegin(), and MeshBasedCellPopulation< DIM >::mrMesh.
Referenced by LinearSpringWithVariableSpringConstantsForce< DIM >::AddForceContribution(), CryptProjectionForce::AddForceContribution(), AbstractTwoBodyInteractionForce< DIM >::AddForceContribution(), and DeltaNotchOffLatticeSimulation< DIM >::PostSolve().
MeshBasedCellPopulation< DIM >::SpringIterator MeshBasedCellPopulation< DIM >::SpringsEnd | ( | ) | [inline] |
Definition at line 928 of file MeshBasedCellPopulation.cpp.
References TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::EdgesEnd(), and MeshBasedCellPopulation< DIM >::mrMesh.
Referenced by LinearSpringWithVariableSpringConstantsForce< DIM >::AddForceContribution(), CryptProjectionForce::AddForceContribution(), AbstractTwoBodyInteractionForce< DIM >::AddForceContribution(), and DeltaNotchOffLatticeSimulation< DIM >::PostSolve().
void MeshBasedCellPopulation< DIM >::TessellateIfNeeded | ( | ) | [inline] |
Tessellates when required If areas or volumes are needed for mUseAreaBasedDampingConstant or mOutputCellPopulationVolumes or mOutputCellVolumes If Voronoi data is to be output
Definition at line 328 of file MeshBasedCellPopulation.cpp.
References GenericEventHandler< 10, CellBasedEventHandler >::BeginEvent(), MeshBasedCellPopulation< DIM >::CreateVoronoiTessellation(), GenericEventHandler< 10, CellBasedEventHandler >::EndEvent(), MeshBasedCellPopulation< DIM >::mOutputCellPopulationVolumes, AbstractCellPopulation< DIM >::mOutputCellVolumes, MeshBasedCellPopulation< DIM >::mOutputVoronoiData, and MeshBasedCellPopulation< DIM >::mUseAreaBasedDampingConstant.
Referenced by MeshBasedCellPopulation< DIM >::Update(), and MeshBasedCellPopulation< DIM >::WriteResultsToFiles().
void MeshBasedCellPopulation< DIM >::UnmarkSpring | ( | std::pair< CellPtr, CellPtr > & | rCellPair | ) | [inline] |
Stop marking the spring between the given cells.
rCellPair | a set of pointers to Cells |
Definition at line 1133 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mMarkedSprings.
Referenced by CryptProjectionForce::CalculateForceBetweenNodes(), and GeneralisedLinearSpringForce< DIM >::CalculateForceBetweenNodes().
void MeshBasedCellPopulation< DIM >::Update | ( | bool | hasHadBirthsOrDeaths = true |
) | [inline, virtual] |
Overridden Update(bool hasHadBirthsOrDeaths) method. Fixes up the mappings between cells and nodes.
hasHadBirthsOrDeaths | - a bool saying whether cell population has had Births Or Deaths not needed in this cell population class |
Implements AbstractCellPopulation< DIM >.
Definition at line 241 of file MeshBasedCellPopulation.cpp.
References Node< SPACE_DIM >::ContainingElementsBegin(), Node< SPACE_DIM >::ContainingElementsEnd(), EXCEPTION, AbstractCentreBasedCellPopulation< DIM >::GetNodeCorrespondingToCell(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllNodes(), AbstractCellPopulation< DIM >::mCellLocationMap, AbstractCellPopulation< DIM >::mCells, AbstractCellPopulation< DIM >::mLocationCellMap, MeshBasedCellPopulation< DIM >::mMarkedSprings, MeshBasedCellPopulation< DIM >::mrMesh, MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh(), Node< SPACE_DIM >::rGetContainingElementIndices(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::SetMeshHasChangedSinceLoading(), MeshBasedCellPopulation< DIM >::TessellateIfNeeded(), MeshBasedCellPopulation< DIM >::UpdateGhostNodesAfterReMesh(), and MeshBasedCellPopulation< DIM >::Validate().
void MeshBasedCellPopulation< DIM >::UpdateGhostNodesAfterReMesh | ( | NodeMap & | rMap | ) | [inline, protected, virtual] |
Update mIsGhostNode if required by a remesh.
rMap | A map between node indices before and after remesh |
Reimplemented in MeshBasedCellPopulationWithGhostNodes< DIM >.
Definition at line 354 of file MeshBasedCellPopulation.cpp.
Referenced by MeshBasedCellPopulation< DIM >::Update().
bool MeshBasedCellPopulation< DIM >::UseAreaBasedDampingConstant | ( | ) | [inline] |
Definition at line 84 of file MeshBasedCellPopulation.cpp.
References MeshBasedCellPopulation< DIM >::mUseAreaBasedDampingConstant.
void MeshBasedCellPopulation< DIM >::Validate | ( | ) | [inline, protected, virtual] |
Check consistency of our internal data structures. Each node must have a cell associated with it.
Implements AbstractCellPopulation< DIM >.
Reimplemented in MeshBasedCellPopulationWithGhostNodes< DIM >.
Definition at line 152 of file MeshBasedCellPopulation.cpp.
References AbstractCellPopulation< DIM >::Begin(), AbstractCellPopulation< DIM >::End(), EXCEPTION, AbstractCellPopulation< DIM >::GetLocationIndexUsingCell(), and MeshBasedCellPopulation< DIM >::GetNumNodes().
Referenced by MeshBasedCellPopulation< DIM >::MeshBasedCellPopulation(), MeshBasedCellPopulation< 2 >::serialize(), and MeshBasedCellPopulation< DIM >::Update().
void MeshBasedCellPopulation< DIM >::WriteCellPopulationVolumeResultsToFile | ( | ) | [inline] |
Write the current total area (in 2D) or volume (in 3D) of mrMesh, and of the set of apoptotic cells in the cell population (using mpVoronoiTessellation), to mpCellPopulationVolumesFile.
Definition at line 743 of file MeshBasedCellPopulation.cpp.
References VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetDelaunayNodeIndexCorrespondingToVoronoiElementIndex(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), SimulationTime::GetTime(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetVolume(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetVolumeOfElement(), SimulationTime::Instance(), AbstractCentreBasedCellPopulation< DIM >::IsGhostNode(), AbstractCellPopulation< DIM >::mLocationCellMap, MeshBasedCellPopulation< DIM >::mpCellPopulationVolumesFile, MeshBasedCellPopulation< DIM >::mpVoronoiTessellation, and MeshBasedCellPopulation< DIM >::mrMesh.
Referenced by MeshBasedCellPopulation< DIM >::WriteResultsToFiles().
void MeshBasedCellPopulation< DIM >::WriteCellVolumeResultsToFile | ( | ) | [inline, virtual] |
Overridden WriteCellVolumeResultsToFile() method.
Implements AbstractCellPopulation< DIM >.
Definition at line 785 of file MeshBasedCellPopulation.cpp.
References VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetDelaunayNodeIndexCorrespondingToVoronoiElementIndex(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), MeshBasedCellPopulation< DIM >::GetNode(), SimulationTime::GetTime(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetVolumeOfElement(), SimulationTime::Instance(), AbstractCentreBasedCellPopulation< DIM >::IsGhostNode(), AbstractCellPopulation< DIM >::mLocationCellMap, AbstractCellPopulation< DIM >::mpCellVolumesFile, and MeshBasedCellPopulation< DIM >::mpVoronoiTessellation.
void MeshBasedCellPopulation< DIM >::WriteResultsToFiles | ( | ) | [inline, virtual] |
Overridden WriteResultsToFiles() method.
Reimplemented from AbstractCellPopulation< DIM >.
Definition at line 416 of file MeshBasedCellPopulation.cpp.
References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), MeshBasedCellPopulation< DIM >::GetNode(), SimulationTime::GetTime(), SimulationTime::Instance(), AbstractCellPopulation< DIM >::mLocationCellMap, MeshBasedCellPopulation< DIM >::mOutputCellPopulationVolumes, MeshBasedCellPopulation< DIM >::mOutputVoronoiData, MeshBasedCellPopulation< DIM >::mpVizElementsFile, MeshBasedCellPopulation< DIM >::mpVoronoiTessellation, MeshBasedCellPopulation< DIM >::mrMesh, MeshBasedCellPopulation< DIM >::TessellateIfNeeded(), MeshBasedCellPopulation< DIM >::WriteCellPopulationVolumeResultsToFile(), and MeshBasedCellPopulation< DIM >::WriteVoronoiResultsToFile().
void MeshBasedCellPopulation< DIM >::WriteVoronoiResultsToFile | ( | ) | [inline] |
Write the current index and location of each node in mrMesh (including ghost nodes), as well as the area and perimeter (in 2D) or volume and surface area (in 3D) of its corresponding element in mpVoronoiTessellation, to mpVoronoiFile.
Definition at line 709 of file MeshBasedCellPopulation.cpp.
References VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetDelaunayNodeIndexCorrespondingToVoronoiElementIndex(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), MeshBasedCellPopulation< DIM >::GetNode(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetSurfaceAreaOfElement(), SimulationTime::GetTime(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetVolumeOfElement(), SimulationTime::Instance(), MeshBasedCellPopulation< DIM >::mpVoronoiFile, and MeshBasedCellPopulation< DIM >::mpVoronoiTessellation.
Referenced by MeshBasedCellPopulation< DIM >::WriteResultsToFiles().
void MeshBasedCellPopulation< DIM >::WriteVtkResultsToFile | ( | ) | [inline, virtual] |
Overridden WriteVtkResultsToFile() method.
Implements AbstractCentreBasedCellPopulation< DIM >.
Reimplemented in MeshBasedCellPopulationWithGhostNodes< DIM >.
Definition at line 476 of file MeshBasedCellPopulation.cpp.
References VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::AddCellData(), AbstractCellPopulation< DIM >::Begin(), NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh(), AbstractCellPopulation< DIM >::End(), AbstractCellCycleModel::GetCellProliferativeType(), AbstractCellCycleModel::GetCurrentCellCyclePhase(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetDelaunayNodeIndexCorrespondingToVoronoiElementIndex(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), AbstractCellPopulation< DIM >::GetLocationIndexUsingCell(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), MeshBasedCellPopulation< DIM >::GetNumNodes(), CellwiseData< DIM >::GetNumVariables(), SimulationTime::GetTimeStepsElapsed(), CellwiseData< DIM >::GetValue(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetVolumeOfElement(), SimulationTime::Instance(), AbstractCentreBasedCellPopulation< DIM >::IsGhostNode(), AbstractCellPopulation< DIM >::mDirPath, AbstractCellPopulation< DIM >::mLocationCellMap, AbstractCellPopulation< DIM >::mOutputCellAges, AbstractCellPopulation< DIM >::mOutputCellAncestors, AbstractCellPopulation< DIM >::mOutputCellCyclePhases, AbstractCellPopulation< DIM >::mOutputCellMutationStates, AbstractCellPopulation< DIM >::mOutputCellProliferativeTypes, AbstractCellPopulation< DIM >::mOutputCellVolumes, MeshBasedCellPopulation< DIM >::mpVoronoiTessellation, AbstractCellPopulation< DIM >::mpVtkMetaFile, MeshBasedCellPopulation< DIM >::mrMesh, MeshBasedCellPopulation< DIM >::mWriteVtkAsPoints, UNSIGNED_UNSET, and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteVtkUsingMesh().
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from AbstractCentreBasedCellPopulation< DIM >.
Reimplemented in MeshBasedCellPopulationWithGhostNodes< DIM >.
Definition at line 57 of file MeshBasedCellPopulation.hpp.
double MeshBasedCellPopulation< DIM >::mAreaBasedDampingConstantParameter [protected] |
Non-dimensional parameter d0 for use in area-based damping constant calculations.
Definition at line 139 of file MeshBasedCellPopulation.hpp.
Referenced by MeshBasedCellPopulation< DIM >::GetAreaBasedDampingConstantParameter(), MeshBasedCellPopulation< DIM >::GetDampingConstant(), MeshBasedCellPopulation< DIM >::OutputCellPopulationParameters(), MeshBasedCellPopulation< 2 >::serialize(), and MeshBasedCellPopulation< DIM >::SetAreaBasedDampingConstantParameter().
bool MeshBasedCellPopulation< DIM >::mDeleteMesh [protected] |
Whether to delete the mesh when we are destroyed. Needed if this cell population has been de-serialized.
Definition at line 117 of file MeshBasedCellPopulation.hpp.
Referenced by MeshBasedCellPopulation< DIM >::MeshBasedCellPopulation(), and MeshBasedCellPopulation< DIM >::~MeshBasedCellPopulation().
std::set<std::pair<CellPtr,CellPtr> > MeshBasedCellPopulation< 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 124 of file MeshBasedCellPopulation.hpp.
Referenced by MeshBasedCellPopulation< DIM >::CheckCellPointers(), MeshBasedCellPopulation< DIM >::IsMarkedSpring(), MeshBasedCellPopulation< DIM >::MarkSpring(), MeshBasedCellPopulation< DIM >::RemoveDeadCells(), MeshBasedCellPopulation< 2 >::serialize(), MeshBasedCellPopulation< DIM >::UnmarkSpring(), and MeshBasedCellPopulation< DIM >::Update().
bool MeshBasedCellPopulation< DIM >::mOutputCellPopulationVolumes [protected] |
Whether to write the cell population volumes (in 3D) or areas (in 2D) to file.
Definition at line 145 of file MeshBasedCellPopulation.hpp.
Referenced by MeshBasedCellPopulation< DIM >::CloseOutputFiles(), MeshBasedCellPopulation< DIM >::CreateOutputFiles(), MeshBasedCellPopulation< DIM >::GetOutputCellPopulationVolumes(), MeshBasedCellPopulation< DIM >::OutputCellPopulationParameters(), MeshBasedCellPopulation< 2 >::serialize(), MeshBasedCellPopulation< DIM >::SetOutputCellPopulationVolumes(), MeshBasedCellPopulation< DIM >::TessellateIfNeeded(), and MeshBasedCellPopulation< DIM >::WriteResultsToFiles().
bool MeshBasedCellPopulation< DIM >::mOutputVoronoiData [protected] |
Whether to write cell volume and surface area (in 3D) or area and perimeter (in 2D) information to file.
Definition at line 142 of file MeshBasedCellPopulation.hpp.
Referenced by MeshBasedCellPopulation< DIM >::CloseOutputFiles(), MeshBasedCellPopulation< DIM >::CreateOutputFiles(), MeshBasedCellPopulation< DIM >::GetOutputVoronoiData(), MeshBasedCellPopulation< DIM >::OutputCellPopulationParameters(), MeshBasedCellPopulation< 2 >::serialize(), MeshBasedCellPopulation< DIM >::SetOutputVoronoiData(), MeshBasedCellPopulation< DIM >::TessellateIfNeeded(), and MeshBasedCellPopulation< DIM >::WriteResultsToFiles().
out_stream MeshBasedCellPopulation< DIM >::mpCellPopulationVolumesFile [protected] |
Results file for cell population volume (in 3D) or area (in 2D) data.
Definition at line 133 of file MeshBasedCellPopulation.hpp.
Referenced by MeshBasedCellPopulation< DIM >::CloseOutputFiles(), MeshBasedCellPopulation< DIM >::CreateOutputFiles(), and MeshBasedCellPopulation< DIM >::WriteCellPopulationVolumeResultsToFile().
out_stream MeshBasedCellPopulation< DIM >::mpVizElementsFile [protected] |
Results file for elements.
Definition at line 127 of file MeshBasedCellPopulation.hpp.
Referenced by MeshBasedCellPopulation< DIM >::CloseOutputFiles(), MeshBasedCellPopulation< DIM >::CreateOutputFiles(), and MeshBasedCellPopulation< DIM >::WriteResultsToFiles().
out_stream MeshBasedCellPopulation< DIM >::mpVoronoiFile [protected] |
Results file for Voronoi data.
Definition at line 130 of file MeshBasedCellPopulation.hpp.
Referenced by MeshBasedCellPopulation< DIM >::CloseOutputFiles(), MeshBasedCellPopulation< DIM >::CreateOutputFiles(), and MeshBasedCellPopulation< DIM >::WriteVoronoiResultsToFile().
VertexMesh<DIM, DIM>* MeshBasedCellPopulation< DIM >::mpVoronoiTessellation [protected] |
Pointer to a VertexMesh object that stores the Voronoi tessellation that is dual to mrMesh. The tessellation is created by calling CreateVoronoiTessellation() and can be accessed by calling GetVoronoiTessellation().
The tessellation can be used to compute the area and perimeter (in 2D) or volume and surface area (in 3D) of the Voronoi element corresponding to each node in the Delaunay mesh (including ghost nodes) by calling the methods GetVolumeOfVoronoiElement() and GetSurfaceAreaOfVoronoiElement() respectively. Each of these methods should be called rather than the relevant method on the VertexMesh. This is because the index of a given Node in mrMesh may not equal the index of the corresponding VertexElement in mpVoronoiTessellation; a map between these indices may be accessed by calling the methods GetDelaunayNodeIndexCorrespondingToVoronoiElementIndex() and GetVoronoiElementIndexCorrespondingToDelaunayNodeIndex() on mpVoronoiTessellation.
Definition at line 111 of file MeshBasedCellPopulation.hpp.
Referenced by MeshBasedCellPopulation< DIM >::CreateVoronoiTessellation(), MeshBasedCellPopulation< 2 >::CreateVoronoiTessellation(), MeshBasedCellPopulation< DIM >::GetSurfaceAreaOfVoronoiElement(), MeshBasedCellPopulation< DIM >::GetVolumeOfVoronoiElement(), MeshBasedCellPopulation< DIM >::GetVoronoiEdgeLength(), MeshBasedCellPopulation< DIM >::GetVoronoiTessellation(), MeshBasedCellPopulation< DIM >::MeshBasedCellPopulation(), MeshBasedCellPopulation< 2 >::serialize(), MeshBasedCellPopulation< DIM >::WriteCellPopulationVolumeResultsToFile(), MeshBasedCellPopulation< DIM >::WriteCellVolumeResultsToFile(), MeshBasedCellPopulation< DIM >::WriteResultsToFiles(), MeshBasedCellPopulation< DIM >::WriteVoronoiResultsToFile(), MeshBasedCellPopulationWithGhostNodes< DIM >::WriteVtkResultsToFile(), MeshBasedCellPopulation< DIM >::WriteVtkResultsToFile(), and MeshBasedCellPopulation< DIM >::~MeshBasedCellPopulation().
MutableMesh<DIM, DIM>& MeshBasedCellPopulation< DIM >::mrMesh [protected] |
Reference to the mesh.
Definition at line 94 of file MeshBasedCellPopulation.hpp.
Referenced by MeshBasedCellPopulation< DIM >::AddNode(), MeshBasedCellPopulationWithGhostNodes< DIM >::CalculateForceBetweenGhostNodes(), MeshBasedCellPopulation< DIM >::CreateVoronoiTessellation(), MeshBasedCellPopulation< 2 >::CreateVoronoiTessellation(), MeshBasedCellPopulation< DIM >::GetNeighbouringNodeIndices(), MeshBasedCellPopulation< DIM >::GetNode(), MeshBasedCellPopulation< DIM >::GetNumNodes(), MeshBasedCellPopulation< DIM >::GetWidth(), MeshBasedCellPopulation< DIM >::MeshBasedCellPopulation(), MeshBasedCellPopulation< DIM >::RemoveDeadCells(), MeshBasedCellPopulation< DIM >::rGetMesh(), MeshBasedCellPopulationWithGhostNodes< DIM >::SetGhostNodes(), MeshBasedCellPopulation< DIM >::SetNode(), MeshBasedCellPopulation< DIM >::SpringsBegin(), MeshBasedCellPopulation< DIM >::SpringsEnd(), MeshBasedCellPopulation< DIM >::Update(), MeshBasedCellPopulationWithGhostNodes< DIM >::UpdateGhostPositions(), MeshBasedCellPopulation< DIM >::WriteCellPopulationVolumeResultsToFile(), MeshBasedCellPopulation< DIM >::WriteResultsToFiles(), MeshBasedCellPopulation< DIM >::WriteVtkResultsToFile(), and MeshBasedCellPopulation< DIM >::~MeshBasedCellPopulation().
bool MeshBasedCellPopulation< DIM >::mUseAreaBasedDampingConstant [protected] |
Whether to use a viscosity that is linear in the cell area, rather than constant.
Definition at line 136 of file MeshBasedCellPopulation.hpp.
Referenced by MeshBasedCellPopulation< DIM >::GetDampingConstant(), MeshBasedCellPopulation< DIM >::OutputCellPopulationParameters(), MeshBasedCellPopulation< 2 >::serialize(), MeshBasedCellPopulation< DIM >::SetAreaBasedDampingConstant(), MeshBasedCellPopulation< DIM >::TessellateIfNeeded(), and MeshBasedCellPopulation< DIM >::UseAreaBasedDampingConstant().
bool MeshBasedCellPopulation< DIM >::mWriteVtkAsPoints [protected] |
Whether to write cells as points in VTK.
Definition at line 148 of file MeshBasedCellPopulation.hpp.
Referenced by MeshBasedCellPopulation< DIM >::GetWriteVtkAsPoints(), MeshBasedCellPopulation< 2 >::serialize(), MeshBasedCellPopulation< DIM >::SetWriteVtkAsPoints(), and MeshBasedCellPopulation< DIM >::WriteVtkResultsToFile().