MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <MeshBasedCellPopulation.hpp>

Inherits AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Collaboration diagram for MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >:
Collaboration graph
[legend]

List of all members.

Classes

class  SpringIterator

Public Member Functions

 MeshBasedCellPopulation (MutableMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >(), bool deleteMesh=false, bool validate=true)
 MeshBasedCellPopulation (MutableMesh< ELEMENT_DIM, SPACE_DIM > &rMesh)
virtual ~MeshBasedCellPopulation ()
MutableMesh< ELEMENT_DIM,
SPACE_DIM > & 
rGetMesh ()
const MutableMesh< ELEMENT_DIM,
SPACE_DIM > & 
rGetMesh () const
bool UseAreaBasedDampingConstant ()
unsigned AddNode (Node< SPACE_DIM > *pNewNode)
void SetNode (unsigned nodeIndex, ChastePoint< SPACE_DIM > &rNewLocation)
double GetDampingConstant (unsigned nodeIndex)
void SetAreaBasedDampingConstant (bool useAreaBasedDampingConstant)
virtual void OpenWritersFiles (OutputFileHandler &rOutputFileHandler)
virtual unsigned RemoveDeadCells ()
virtual CellPtr AddCell (CellPtr pNewCell, const c_vector< double, SPACE_DIM > &rCellDivisionVector, CellPtr pParentCell)
virtual void WriteResultsToFiles (const std::string &rDirectory)
virtual void AcceptPopulationWriter (boost::shared_ptr< AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM > > pPopulationWriter)
virtual void AcceptPopulationCountWriter (boost::shared_ptr< AbstractCellPopulationCountWriter< ELEMENT_DIM, SPACE_DIM > > pPopulationCountWriter)
virtual void AcceptCellWriter (boost::shared_ptr< AbstractCellWriter< ELEMENT_DIM, SPACE_DIM > > pCellWriter, CellPtr pCell)
virtual void Update (bool hasHadBirthsOrDeaths=true)
void TessellateIfNeeded ()
void DivideLongSprings (double springDivisionThreshold)
Node< SPACE_DIM > * GetNode (unsigned index)
unsigned GetNumNodes ()
virtual void WriteVtkResultsToFile (const std::string &rDirectory)
double GetVolumeOfCell (CellPtr pCell)
void CreateVoronoiTessellation ()
VertexMesh< ELEMENT_DIM,
SPACE_DIM > * 
GetVoronoiTessellation ()
double GetVolumeOfVoronoiElement (unsigned index)
double GetSurfaceAreaOfVoronoiElement (unsigned index)
double GetVoronoiEdgeLength (unsigned index1, unsigned index2)
double GetWidth (const unsigned &rDimension)
SpringIterator SpringsBegin ()
SpringIterator SpringsEnd ()
void CheckCellPointers ()
double GetAreaBasedDampingConstantParameter ()
void SetAreaBasedDampingConstantParameter (double areaBasedDampingConstantParameter)
std::vector< std::pair< Node
< SPACE_DIM > *, Node
< SPACE_DIM > * > > & 
rGetNodePairs ()
void OutputCellPopulationParameters (out_stream &rParamsFile)
void SetWriteVtkAsPoints (bool writeVtkAsPoints)
bool GetWriteVtkAsPoints ()
void SetOutputMeshInVtk (bool outputMeshInVtk)
bool GetOutputMeshInVtk ()
std::set< unsignedGetNeighbouringNodeIndices (unsigned index)
void CalculateRestLengths ()
double GetRestLength (unsigned indexA, unsigned indexB)
void SetRestLength (unsigned indexA, unsigned indexB, double restLength)
template<>
void CreateVoronoiTessellation ()
template<>
void CreateVoronoiTessellation ()
template<>
void CreateVoronoiTessellation ()
template<>
void CreateVoronoiTessellation ()
template<>
void CreateVoronoiTessellation ()

Protected Member Functions

virtual void UpdateGhostNodesAfterReMesh (NodeMap &rMap)
virtual void Validate ()

Protected Attributes

VertexMesh< ELEMENT_DIM,
SPACE_DIM > * 
mpVoronoiTessellation
MutableMesh< ELEMENT_DIM,
SPACE_DIM > * 
mpMutableMesh
bool mDeleteMesh
std::map< std::pair< unsigned,
unsigned >, double
mSpringRestLengths
bool mUseAreaBasedDampingConstant
double mAreaBasedDampingConstantParameter
bool mWriteVtkAsPoints
bool mOutputMeshInVtk
bool mHasVariableRestLength
std::vector< std::pair< Node
< SPACE_DIM > *, Node
< SPACE_DIM > * > > 
mNodePairs

Private Member Functions

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

Friends

class TestMeshBasedCellPopulation
class boost::serialization::access

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
class MeshBasedCellPopulation< ELEMENT_DIM, SPACE_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 57 of file MeshBasedCellPopulation.hpp.


Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::MeshBasedCellPopulation ( MutableMesh< ELEMENT_DIM, SPACE_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.

Parameters:
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 60 of file MeshBasedCellPopulation.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mCells, MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpMutableMesh, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mrMesh, MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::rGetMesh(), and MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::Validate().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::MeshBasedCellPopulation ( MutableMesh< ELEMENT_DIM, SPACE_DIM > &  rMesh  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::~MeshBasedCellPopulation (  )  [inline, virtual]

Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::AcceptCellWriter ( boost::shared_ptr< AbstractCellWriter< ELEMENT_DIM, SPACE_DIM > >  pCellWriter,
CellPtr  pCell 
) [inline, virtual]

A virtual method to accept a cell writer so it can write data from this object to file.

Parameters:
pCellWriter the population writer.
pCell the cell whose data is being written.

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 549 of file MeshBasedCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::AcceptPopulationCountWriter ( boost::shared_ptr< AbstractCellPopulationCountWriter< ELEMENT_DIM, SPACE_DIM > >  pPopulationCountWriter  )  [inline, virtual]

A virtual method to accept a cell population count writer so it can write data from this object to file.

Parameters:
pPopulationCountWriter the population count writer.

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 543 of file MeshBasedCellPopulation.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::AcceptPopulationWriter ( boost::shared_ptr< AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM > >  pPopulationWriter  )  [inline, virtual]

A virtual method to accept a cell population writer so it can write data from this object to file.

Parameters:
pPopulationWriter the population writer.

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 537 of file MeshBasedCellPopulation.cpp.

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

Overridden AddCell() method.

Add a new cell to the cell population and update mIsGhostNode.

Parameters:
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
Returns:
address of cell as it appears in the cell list (internal of this method uses a copy constructor along the way)

Reimplemented from AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 490 of file MeshBasedCellPopulation.cpp.

References AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::CreateCellPair(), and AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::MarkSpring().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::AddNode ( Node< SPACE_DIM > *  pNewNode  )  [inline, virtual]

Overridden AddNode() method.

Add a new node to the cell population.

Parameters:
pNewNode pointer to the new node
Returns:
global index of new node in cell population

Implements AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 126 of file MeshBasedCellPopulation.cpp.

References MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpMutableMesh.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::CalculateRestLengths (  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::CheckCellPointers (  )  [inline]
template<>
void MeshBasedCellPopulation< 1, 3 >::CreateVoronoiTessellation (  )  [inline]

The VoronoiTessellation class is only defined in 2D or 3D, hence there are two definitions to this method (one templated and one not).

Definition at line 965 of file MeshBasedCellPopulation.cpp.

References NEVER_REACHED.

template<>
void MeshBasedCellPopulation< 1, 2 >::CreateVoronoiTessellation (  )  [inline]

The VoronoiTessellation class is only defined in 2D or 3D, hence there are two definitions to this method (one templated and one not).

Definition at line 954 of file MeshBasedCellPopulation.cpp.

References NEVER_REACHED.

template<>
void MeshBasedCellPopulation< 1, 1 >::CreateVoronoiTessellation (  )  [inline]

The VoronoiTessellation class is only defined in 2D or 3D, hence there are two definitions to this method (one templated and one not).

Definition at line 943 of file MeshBasedCellPopulation.cpp.

References NEVER_REACHED.

template<>
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 932 of file MeshBasedCellPopulation.cpp.

References MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpVoronoiTessellation, and AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mrMesh.

template<>
void MeshBasedCellPopulation< 2, 3 >::CreateVoronoiTessellation (  )  [inline]

Can't tessellate 2d meshes in 3d space yet.

Definition at line 920 of file MeshBasedCellPopulation.cpp.

References NEVER_REACHED.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::CreateVoronoiTessellation (  ) 
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::DivideLongSprings ( double  springDivisionThreshold  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetAreaBasedDampingConstantParameter (  )  [inline]
Returns:
mAreaBasedDampingConstantParameter

Definition at line 1092 of file MeshBasedCellPopulation.cpp.

References MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mAreaBasedDampingConstantParameter.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetDampingConstant ( unsigned  nodeIndex  )  [inline, virtual]

Overridden GetDampingConstant() method that includes the case of a cell-area-based damping constant.

Parameters:
nodeIndex the global index of this node
Returns:
the damping constant for the given Cell.

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.0)/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< ELEMENT_DIM, SPACE_DIM >.

Definition at line 138 of file MeshBasedCellPopulation.cpp.

References MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetVolumeOfVoronoiElement(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mAreaBasedDampingConstantParameter, and MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mUseAreaBasedDampingConstant.

Referenced by NodeVelocityWriter< ELEMENT_DIM, SPACE_DIM >::Visit().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::set< unsigned > MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetNeighbouringNodeIndices ( unsigned  index  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
Node< SPACE_DIM > * MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetNode ( unsigned  index  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetNumNodes (  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetOutputMeshInVtk (  )  [inline]
Returns:
mOutputMeshInVtk.

Definition at line 805 of file MeshBasedCellPopulation.cpp.

References MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mOutputMeshInVtk.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetRestLength ( unsigned  indexA,
unsigned  indexB 
) [inline]
Returns:
the rest length for a given spring
Parameters:
indexA index of first node in pair
indexB index of second node in pair

Definition at line 1191 of file MeshBasedCellPopulation.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::CreateOrderedPair(), EXCEPTION, MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mHasVariableRestLength, and MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mSpringRestLengths.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetSurfaceAreaOfVoronoiElement ( unsigned  index  )  [inline]
Returns:
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.

Parameters:
index a node global index

Definition at line 987 of file MeshBasedCellPopulation.cpp.

References MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpVoronoiTessellation.

Referenced by LinearSpringWithVariableSpringConstantsForce< DIM >::VariableSpringConstantMultiplicationFactor().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetVolumeOfCell ( CellPtr  pCell  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetVolumeOfVoronoiElement ( unsigned  index  )  [inline]
Returns:
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.

Todo:
This method is somewhat redundant following the introduction of the method GetVolumeOfCell() (see #1985).
Parameters:
index a node global index

Definition at line 979 of file MeshBasedCellPopulation.cpp.

References MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpVoronoiTessellation.

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetVoronoiEdgeLength ( unsigned  index1,
unsigned  index2 
) [inline]
Returns:
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.

Parameters:
index1 a node global index
index2 a node global index

Definition at line 995 of file MeshBasedCellPopulation.cpp.

References EXCEPTION, and MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpVoronoiTessellation.

Referenced by LinearSpringWithVariableSpringConstantsForce< DIM >::VariableSpringConstantMultiplicationFactor(), and HeterotypicBoundaryLengthWriter< ELEMENT_DIM, SPACE_DIM >::Visit().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
VertexMesh< ELEMENT_DIM, SPACE_DIM > * MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetVoronoiTessellation (  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double MeshBasedCellPopulation< ELEMENT_DIM, SPACE_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.

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

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 1126 of file MeshBasedCellPopulation.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mrMesh.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetWriteVtkAsPoints (  )  [inline]
Returns:
mWriteVtkAsPoints.

Definition at line 793 of file MeshBasedCellPopulation.cpp.

References MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mWriteVtkAsPoints.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::OpenWritersFiles ( OutputFileHandler rOutputFileHandler  )  [inline, virtual]

Overridden OpenWritersFiles() method.

Open all files in mCellPopulationWriters and mCellWriters for writing (not appending).

Parameters:
rOutputFileHandler handler for the directory in which to open this file.

Reimplemented from AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Reimplemented in MeshBasedCellPopulationWithGhostNodes< DIM >.

Definition at line 512 of file MeshBasedCellPopulation.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mOutputResultsForChasteVisualizer.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::OutputCellPopulationParameters ( out_stream &  rParamsFile  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned MeshBasedCellPopulation< ELEMENT_DIM, SPACE_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.

Returns:
number of cells removed.

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 218 of file MeshBasedCellPopulation.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationIndexUsingCell(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mCells, AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mMarkedSprings, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mrMesh, and AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::RemoveCellUsingLocationIndex().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
const MutableMesh< ELEMENT_DIM, SPACE_DIM > & MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::rGetMesh (  )  const [inline]
Returns:
const reference to mrMesh (used in archiving).

Definition at line 212 of file MeshBasedCellPopulation.cpp.

References MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpMutableMesh.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
MutableMesh< ELEMENT_DIM, SPACE_DIM > & MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::rGetMesh (  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< std::pair< Node< SPACE_DIM > *, Node< SPACE_DIM > * > > & MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::rGetNodePairs (  )  [inline, virtual]

Overridden rGetNodePairs method which uses the Delaunay triangulatiuon

Returns:
Node pairs for force calculation.

Implements AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 1105 of file MeshBasedCellPopulation.cpp.

References MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mNodePairs, and NEVER_REACHED.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
template<class Archive >
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_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.

Parameters:
archive the archive
version the current version of this class

Reimplemented from AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Reimplemented in MeshBasedCellPopulationWithGhostNodes< DIM >.

Definition at line 75 of file MeshBasedCellPopulation.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetAreaBasedDampingConstant ( bool  useAreaBasedDampingConstant  )  [inline]

Set method for mUseAreaBasedDampingConstant.

Parameters:
useAreaBasedDampingConstant whether to use a viscosity that is linear in the cell area, rather than constant

Definition at line 119 of file MeshBasedCellPopulation.cpp.

References MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mUseAreaBasedDampingConstant.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetAreaBasedDampingConstantParameter ( double  areaBasedDampingConstantParameter  )  [inline]

Set mAreaBasedDampingConstantParameter.

Parameters:
areaBasedDampingConstantParameter the new value of mAreaBasedDampingConstantParameter

Definition at line 1098 of file MeshBasedCellPopulation.cpp.

References MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mAreaBasedDampingConstantParameter.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetNode ( unsigned  nodeIndex,
ChastePoint< SPACE_DIM > &  rNewLocation 
) [inline, virtual]

Overridden SetNode() method.

Move the node with a given index to a new point in space.

Parameters:
nodeIndex the index of the node to be moved
rNewLocation the new target location of the node

Implements AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 132 of file MeshBasedCellPopulation.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mrMesh.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetOutputMeshInVtk ( bool  outputMeshInVtk  )  [inline]

Set mOutputMeshInVtk.

Parameters:
outputMeshInVtk whether to write cells as points in VTK

Definition at line 799 of file MeshBasedCellPopulation.cpp.

References MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mOutputMeshInVtk.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetRestLength ( unsigned  indexA,
unsigned  indexB,
double  restLength 
) [inline]

Helper method to modify the rest length of a given spring

Parameters:
indexA index of first node in pair
indexB index of second node in pair
restLength the new rest length

Definition at line 1215 of file MeshBasedCellPopulation.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::CreateOrderedPair(), EXCEPTION, MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mHasVariableRestLength, and MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mSpringRestLengths.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::SetWriteVtkAsPoints ( bool  writeVtkAsPoints  )  [inline]

Set mWriteVtkAsPoints.

Parameters:
writeVtkAsPoints whether to write cells as points in VTK

Definition at line 787 of file MeshBasedCellPopulation.cpp.

References MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mWriteVtkAsPoints.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::SpringIterator MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::SpringsBegin (  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::SpringIterator MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::SpringsEnd (  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::TessellateIfNeeded (  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::Update ( bool  hasHadBirthsOrDeaths = true  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::UpdateGhostNodesAfterReMesh ( NodeMap rMap  )  [inline, protected, virtual]

Update mIsGhostNode if required by a remesh.

Parameters:
rMap A map between node indices before and after remesh

Reimplemented in MeshBasedCellPopulationWithGhostNodes< DIM >.

Definition at line 485 of file MeshBasedCellPopulation.cpp.

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::UseAreaBasedDampingConstant (  )  [inline]
Returns:
mUseAreaBasedDampingConstant.

Definition at line 113 of file MeshBasedCellPopulation.cpp.

References MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mUseAreaBasedDampingConstant.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::Validate (  )  [inline, protected, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::WriteResultsToFiles ( const std::string &  rDirectory  )  [inline, virtual]

Overridden WriteResultsToFiles() method.

Parameters:
rDirectory pathname of the output directory, relative to where Chaste output is stored

Reimplemented from AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 526 of file MeshBasedCellPopulation.cpp.

References SimulationTime::Instance(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpVoronoiTessellation, and MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::TessellateIfNeeded().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::WriteVtkResultsToFile ( const std::string &  rDirectory  )  [inline, virtual]

Friends And Related Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
friend class boost::serialization::access [friend]

Needed for serialization.

Reimplemented from AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Reimplemented in MeshBasedCellPopulationWithGhostNodes< DIM >.

Definition at line 62 of file MeshBasedCellPopulation.hpp.


Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
double MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mAreaBasedDampingConstantParameter [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
bool MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mDeleteMesh [protected]

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

Definition at line 123 of file MeshBasedCellPopulation.hpp.

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
bool MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mHasVariableRestLength [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
std::vector< std::pair<Node<SPACE_DIM>*, Node<SPACE_DIM>* > > MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mNodePairs [protected]

Node pairs for force calculations.

Definition at line 146 of file MeshBasedCellPopulation.hpp.

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
bool MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mOutputMeshInVtk [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
MutableMesh<ELEMENT_DIM, SPACE_DIM>* MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpMutableMesh [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
VertexMesh<ELEMENT_DIM, SPACE_DIM>* MeshBasedCellPopulation< ELEMENT_DIM, SPACE_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 114 of file MeshBasedCellPopulation.hpp.

Referenced by MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::CreateVoronoiTessellation(), MeshBasedCellPopulation< 2 >::CreateVoronoiTessellation(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetSurfaceAreaOfVoronoiElement(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetVolumeOfCell(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetVolumeOfVoronoiElement(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetVoronoiEdgeLength(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetVoronoiTessellation(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::MeshBasedCellPopulation(), MeshBasedCellPopulation< 2 >::serialize(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::WriteResultsToFiles(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::WriteVtkResultsToFile(), and MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::~MeshBasedCellPopulation().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
std::map<std::pair<unsigned,unsigned>, double> MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mSpringRestLengths [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
bool MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mUseAreaBasedDampingConstant [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
bool MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::mWriteVtkAsPoints [protected]

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

Generated by  doxygen 1.6.2