Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
MeshBasedCellPopulationWithGhostNodes< DIM > Class Template Reference

#include <MeshBasedCellPopulationWithGhostNodes.hpp>

+ Inheritance diagram for MeshBasedCellPopulationWithGhostNodes< DIM >:
+ Collaboration diagram for MeshBasedCellPopulationWithGhostNodes< DIM >:

Public Member Functions

 MeshBasedCellPopulationWithGhostNodes (MutableMesh< DIM, DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >(), bool deleteMesh=false, double ghostCellSpringStiffness=15.0, double ghostGhostSpringStiffness=15.0, double ghostSpringRestLength=1.0)
 
 MeshBasedCellPopulationWithGhostNodes (MutableMesh< DIM, DIM > &rMesh, double ghostCellSpringStiffness=15.0, double ghostGhostSpringStiffness=15.0, double ghostSpringRestLength=1.0)
 
virtual ~MeshBasedCellPopulationWithGhostNodes ()
 
virtual TetrahedralMesh< DIM, DIM > * GetTetrahedralMeshForPdeModifier ()
 
std::set< unsignedGetNeighbouringLocationIndices (CellPtr pCell)
 
void SetGhostNodes (const std::set< unsigned > &rGhostNodeIndices)
 
void ApplyGhostForces ()
 
std::vector< bool > & rGetGhostNodes ()
 
bool IsGhostNode (unsigned index)
 
std::set< unsignedGetGhostNodeIndices ()
 
void RemoveGhostNode (unsigned nodeIndex)
 
void UpdateGhostNodesAfterReMesh (NodeMap &rMap)
 
c_vector< double, DIM > CalculateForceBetweenGhostNodes (const unsigned &rNodeAGlobalIndex, const unsigned &rNodeBGlobalIndex)
 
CellPtr AddCell (CellPtr pNewCell, CellPtr pParentCell)
 
virtual void OpenWritersFiles (OutputFileHandler &rOutputFileHandler)
 
virtual void WriteVtkResultsToFile (const std::string &rDirectory)
 
void OutputCellPopulationParameters (out_stream &rParamsFile)
 
- Public Member Functions inherited from MeshBasedCellPopulation< DIM >
 MeshBasedCellPopulation (MutableMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices={}, 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 unsigned RemoveDeadCells ()
 
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 AcceptPopulationEventWriter (boost::shared_ptr< AbstractCellPopulationEventWriter< ELEMENT_DIM, SPACE_DIM > > pPopulationEventWriter)
 
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 ()
 
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)
 
virtual void WriteDataToVisualizerSetupFile (out_stream &pVizSetupFile)
 
SpringIterator SpringsBegin ()
 
SpringIterator SpringsEnd ()
 
void CheckCellPointers ()
 
double GetAreaBasedDampingConstantParameter ()
 
void SetAreaBasedDampingConstantParameter (double areaBasedDampingConstantParameter)
 
std::vector< std::pair< Node< SPACE_DIM > *, Node< SPACE_DIM > * > > & rGetNodePairs ()
 
void SetWriteVtkAsPoints (bool writeVtkAsPoints)
 
bool GetWriteVtkAsPoints ()
 
void SetBoundVoronoiTessellation (bool boundVoronoiTessellation)
 
bool GetBoundVoronoiTessellation ()
 
void SetScaleBoundByEdgeLength (bool scaleBoundByEdgeLength)
 
bool GetScaleBoundByEdgeLength ()
 
void SetBoundedVoroniTesselationLengthCutoff (double boundedVoroniTesselationLengthCutoff)
 
double GetBoundedVoroniTesselationLengthCutoff ()
 
void SetOffsetNewBoundaryNodes (bool offsetNewBoundaryNodes)
 
bool GetOffsetNewBoundaryNodes ()
 
std::set< unsignedGetNeighbouringNodeIndices (unsigned index)
 
void CalculateRestLengths ()
 
double GetRestLength (unsigned indexA, unsigned indexB)
 
void SetRestLength (unsigned indexA, unsigned indexB, double restLength)
 
- Public Member Functions inherited from AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >
 AbstractCentreBasedCellPopulation (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >())
 
c_vector< double, SPACE_DIM > GetLocationOfCellCentre (CellPtr pCell)
 
Node< SPACE_DIM > * GetNodeCorrespondingToCell (CellPtr pCell)
 
virtual double GetCellDataItemAtPdeNode (unsigned pdeNodeIndex, std::string &rVariableName, bool dirichletBoundaryConditionApplies=false, double dirichletBoundaryValue=0.0)
 
std::pair< CellPtr, CellPtr > CreateCellPair (CellPtr pCell1, CellPtr pCell2)
 
bool IsMarkedSpring (const std::pair< CellPtr, CellPtr > &rCellPair)
 
void MarkSpring (std::pair< CellPtr, CellPtr > &rCellPair)
 
void UnmarkSpring (std::pair< CellPtr, CellPtr > &rCellPair)
 
bool IsCellAssociatedWithADeletedLocation (CellPtr pCell)
 
virtual void CheckForStepSizeException (unsigned nodeIndex, c_vector< double, SPACE_DIM > &rDisplacement, double dt)
 
virtual bool IsParticle (unsigned index)
 
double GetMeinekeDivisionSeparation ()
 
void SetMeinekeDivisionSeparation (double divisionSeparation)
 
boost::shared_ptr< AbstractCentreBasedDivisionRule< ELEMENT_DIM, SPACE_DIM > > GetCentreBasedDivisionRule ()
 
void SetCentreBasedDivisionRule (boost::shared_ptr< AbstractCentreBasedDivisionRule< ELEMENT_DIM, SPACE_DIM > > pCentreBasedDivisionRule)
 
virtual double GetDefaultTimeStep ()
 
- Public Member Functions inherited from AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >
 AbstractOffLatticeCellPopulation (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >())
 
virtual void UpdateNodeLocations (double dt)
 
void SetDampingConstantNormal (double dampingConstantNormal)
 
void SetDampingConstantMutant (double dampingConstantMutant)
 
void SetAbsoluteMovementThreshold (double absoluteMovementThreshold)
 
double GetAbsoluteMovementThreshold ()
 
double GetDampingConstantNormal ()
 
double GetDampingConstantMutant ()
 
- Public Member Functions inherited from AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >
 AbstractCellPopulation (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >())
 
virtual ~AbstractCellPopulation ()
 
void InitialiseCells ()
 
void SetDataOnAllCells (const std::string &rDataName, double dataValue)
 
AbstractMesh< ELEMENT_DIM, SPACE_DIM > & rGetMesh ()
 
virtual bool IsPdeNodeAssociatedWithNonApoptoticCell (unsigned pdeNodeIndex)
 
std::list< CellPtr > & rGetCells ()
 
std::vector< unsignedGetCellMutationStateCount ()
 
std::vector< unsignedGetCellProliferativeTypeCount ()
 
std::vector< unsignedGetCellCyclePhaseCount ()
 
unsigned GetNumRealCells ()
 
unsigned GetNumAllCells ()
 
void SetCellAncestorsToLocationIndices ()
 
std::set< unsignedGetCellAncestors ()
 
virtual CellPtr GetCellUsingLocationIndex (unsigned index)
 
std::set< CellPtr > GetCellsUsingLocationIndex (unsigned index)
 
virtual bool IsCellAttachedToLocationIndex (unsigned index)
 
void SetCellUsingLocationIndex (unsigned index, CellPtr pCell)
 
virtual void AddCellUsingLocationIndex (unsigned index, CellPtr pCell)
 
virtual void RemoveCellUsingLocationIndex (unsigned index, CellPtr pCell)
 
void MoveCellInLocationMap (CellPtr pCell, unsigned old_index, unsigned new_index)
 
unsigned GetLocationIndexUsingCell (CellPtr pCell)
 
boost::shared_ptr< CellPropertyRegistryGetCellPropertyRegistry ()
 
void SetDefaultCellMutationStateAndProliferativeTypeOrdering ()
 
virtual std::set< std::pair< unsigned, unsigned > > GetNeighbouringEdgeIndices (CellPtr pCell, unsigned pEdgeIndex)
 
c_vector< double, SPACE_DIM > GetCentroidOfCellPopulation ()
 
virtual void UpdateCellProcessLocation ()
 
virtual void CloseWritersFiles ()
 
std::vector< std::string > GetDivisionsInformation ()
 
void AddDivisionInformation (std::string divisionInformation)
 
void ClearDivisionsInformation ()
 
std::vector< std::string > GetRemovalsInformation ()
 
void AddRemovalInformation (std::string removalInformation)
 
void ClearRemovalsInformation ()
 
void GenerateRemovalInformation (CellPtr pCell, std::string killerInfo)
 
void KillCell (CellPtr pCell, std::string killerInfo)
 
void StartApoptosisOnCell (CellPtr pCell, std::string killerInfo)
 
void OutputCellPopulationInfo (out_stream &rParamsFile)
 
virtual void SimulationSetupHook (AbstractCellBasedSimulation< ELEMENT_DIM, SPACE_DIM > *pSimulation)
 
bool GetOutputResultsForChasteVisualizer ()
 
template<template< unsigned, unsigned > class T>
void AddPopulationWriter ()
 
template<template< unsigned, unsigned > class T>
void AddCellWriter ()
 
template<template< unsigned, unsigned > class T>
void AddCellPopulationCountWriter ()
 
template<template< unsigned, unsigned > class T>
void AddCellPopulationEventWriter ()
 
void AddPopulationWriter (boost::shared_ptr< AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM > > pPopulationWriter)
 
void AddCellWriter (boost::shared_ptr< AbstractCellWriter< ELEMENT_DIM, SPACE_DIM > > pCellWriter)
 
void AddCellPopulationCountWriter (boost::shared_ptr< AbstractCellPopulationCountWriter< ELEMENT_DIM, SPACE_DIM > > pCellPopulationCountWriter)
 
void AddCellPopulationEventWriter (boost::shared_ptr< AbstractCellPopulationEventWriter< ELEMENT_DIM, SPACE_DIM > > pCellPopulationEventWriter)
 
template<template< unsigned, unsigned > class T>
bool HasWriter () const
 
void SetOutputResultsForChasteVisualizer (bool outputResultsForChasteVisualizer)
 
c_vector< double, SPACE_DIM > GetSizeOfCellPopulation ()
 
virtual bool IsRoomToDivide (CellPtr pCell)
 
std::pair< unsigned, unsignedCreateOrderedPair (unsigned index1, unsigned index2)
 
Iterator Begin ()
 
Iterator End ()
 
- Public Member Functions inherited from Identifiable
virtual ~Identifiable ()
 
std::string GetIdentifier () const
 

Protected Member Functions

virtual void AcceptCellWritersAcrossPopulation ()
 
- Protected Member Functions inherited from AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >
 AbstractCentreBasedCellPopulation (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh)
 
- Protected Member Functions inherited from AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >
 AbstractOffLatticeCellPopulation (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh)
 
- Protected Member Functions inherited from AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >
 AbstractCellPopulation (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh)
 

Private Member Functions

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

Private Attributes

std::vector< boolmIsGhostNode
 
double mGhostCellSpringStiffness
 
double mGhostGhostSpringStiffness
 
double mGhostSpringRestLength
 

Friends

class TestMeshBasedCellPopulationWithGhostNodes
 
class boost::serialization::access
 

Additional Inherited Members

- Protected Attributes inherited from MeshBasedCellPopulation< DIM >
VertexMesh< ELEMENT_DIM, SPACE_DIM > * mpVoronoiTessellation
 
MutableMesh< ELEMENT_DIM, SPACE_DIM > * mpMutableMesh
 
bool mDeleteMesh
 
std::map< std::pair< unsigned, unsigned >, doublemSpringRestLengths
 
bool mUseAreaBasedDampingConstant
 
double mAreaBasedDampingConstantParameter
 
bool mWriteVtkAsPoints
 
bool mBoundVoronoiTessellation
 
bool mScaleBoundByEdgeLength
 
double mBoundedVoroniTesselationLengthCutoff
 
bool mOffsetNewBoundaryNodes
 
bool mHasVariableRestLength
 
std::vector< std::pair< Node< SPACE_DIM > *, Node< SPACE_DIM > * > > mNodePairs
 
- Protected Attributes inherited from AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >
double mMeinekeDivisionSeparation
 
std::set< std::pair< CellPtr, CellPtr > > mMarkedSprings
 
boost::shared_ptr< AbstractCentreBasedDivisionRule< ELEMENT_DIM, SPACE_DIM > > mpCentreBasedDivisionRule
 
- Protected Attributes inherited from AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >
double mDampingConstantNormal
 
double mDampingConstantMutant
 
double mAbsoluteMovementThreshold
 
- Protected Attributes inherited from AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >
std::map< unsigned, std::set< CellPtr > > mLocationCellMap
 
std::map< Cell *, unsignedmCellLocationMap
 
AbstractMesh< ELEMENT_DIM, SPACE_DIM > & mrMesh
 
std::list< CellPtr > mCells
 
c_vector< double, SPACE_DIM > mCentroid
 
out_stream mpVtkMetaFile
 
boost::shared_ptr< CellPropertyRegistrympCellPropertyRegistry
 
bool mOutputResultsForChasteVisualizer
 
std::vector< boost::shared_ptr< AbstractCellWriter< ELEMENT_DIM, SPACE_DIM > > > mCellWriters
 
std::vector< boost::shared_ptr< AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM > > > mCellPopulationWriters
 
std::vector< boost::shared_ptr< AbstractCellPopulationCountWriter< ELEMENT_DIM, SPACE_DIM > > > mCellPopulationCountWriters
 
std::vector< boost::shared_ptr< AbstractCellPopulationEventWriter< ELEMENT_DIM, SPACE_DIM > > > mCellPopulationEventWriters
 
std::vector< std::string > mDivisionsInformation
 
std::vector< std::string > mRemovalsInformation
 

Detailed Description

template<unsigned DIM>
class MeshBasedCellPopulationWithGhostNodes< DIM >

A facade class encapsulating a mesh-based cell population with ghost nodes.

If simulating a crypt with a mesh-based cell population, the mesh should be surrounded by at least one layer of ghost nodes. These are nodes which do not correspond to a cell, but are necessary for remeshing (because the remesher tries to create a convex hull of the set of nodes) and visualization purposes. The MeshBasedCellPopulationWithGhostNodes class deals with these ghost nodes, hiding the 'ghost nodes' concept from the OffLatticeSimulation class, so the latter only ever deals with real cells.

Definition at line 56 of file MeshBasedCellPopulationWithGhostNodes.hpp.

Constructor & Destructor Documentation

◆ MeshBasedCellPopulationWithGhostNodes() [1/2]

template<unsigned DIM>
MeshBasedCellPopulationWithGhostNodes< DIM >::MeshBasedCellPopulationWithGhostNodes ( MutableMesh< DIM, DIM > &  rMesh,
std::vector< CellPtr > &  rCells,
const std::vector< unsigned locationIndices = std::vector<unsigned>(),
bool  deleteMesh = false,
double  ghostCellSpringStiffness = 15.0,
double  ghostGhostSpringStiffness = 15.0,
double  ghostSpringRestLength = 1.0 
)

Create a new cell population from a mesh and collection of cells.

Parameters
rMesha mutable tetrahedral mesh
rCellscells corresponding to the nodes of the mesh
locationIndicesan optional vector of location indices that correspond to real cells
deleteMeshset to true if you want the cell population to free the mesh memory on destruction
ghostCellSpringStiffnessspring stiffness used to move the ghost nodes when connected to cells defaults to 15.0.
ghostGhostSpringStiffnessspring stiffness used to move the ghost nodes defaults to 15.0.
ghostSpringRestLengthspring rest length used to move the ghost nodes defaults to 1.0.

Definition at line 41 of file MeshBasedCellPopulationWithGhostNodes.cpp.

References MeshBasedCellPopulation< DIM >::GetNode(), MeshBasedCellPopulation< DIM >::GetNumNodes(), MeshBasedCellPopulationWithGhostNodes< DIM >::mIsGhostNode, MeshBasedCellPopulationWithGhostNodes< DIM >::SetGhostNodes(), and MeshBasedCellPopulationWithGhostNodes< DIM >::Validate().

◆ MeshBasedCellPopulationWithGhostNodes() [2/2]

template<unsigned DIM>
MeshBasedCellPopulationWithGhostNodes< DIM >::MeshBasedCellPopulationWithGhostNodes ( MutableMesh< DIM, DIM > &  rMesh,
double  ghostCellSpringStiffness = 15.0,
double  ghostGhostSpringStiffness = 15.0,
double  ghostSpringRestLength = 1.0 
)

Constructor for use by the de-serializer.

Parameters
rMesha mutable tetrahedral mesh.
ghostCellSpringStiffnessspring stiffness used to move the ghost nodes when connected to cells defaults to 15.0.
ghostGhostSpringStiffnessspring stiffness used to move the ghost nodes defaults to 15.0.
ghostSpringRestLengthspring rest length used to move the ghost nodes defaults to 1.0.

Definition at line 85 of file MeshBasedCellPopulationWithGhostNodes.cpp.

◆ ~MeshBasedCellPopulationWithGhostNodes()

Empty destructor so archiving works with static libraries.

Definition at line 97 of file MeshBasedCellPopulationWithGhostNodes.cpp.

Member Function Documentation

◆ AcceptCellWritersAcrossPopulation()

template<unsigned DIM>
void MeshBasedCellPopulationWithGhostNodes< DIM >::AcceptCellWritersAcrossPopulation ( )
protectedvirtual

Overridden method

Calls AcceptCellWriter across the whole population, iterating in an appropriate way to skip ghost nodes.

Reimplemented from AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 276 of file MeshBasedCellPopulationWithGhostNodes.cpp.

◆ AddCell()

template<unsigned DIM>
CellPtr MeshBasedCellPopulationWithGhostNodes< DIM >::AddCell ( CellPtr  pNewCell,
CellPtr  pParentCell 
)
virtual

Overridden AddCell() method.

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

Parameters
pNewCellthe cell to add
pParentCellpointer 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 MeshBasedCellPopulation< DIM >.

Definition at line 175 of file MeshBasedCellPopulationWithGhostNodes.cpp.

References MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::AddCell().

◆ ApplyGhostForces()

template<unsigned DIM>
void MeshBasedCellPopulationWithGhostNodes< DIM >::ApplyGhostForces ( )

Applies the appropriate force to each ghost node in the population. Called by AbstractNumericalMethod.

Definition at line 297 of file MeshBasedCellPopulationWithGhostNodes.cpp.

References TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::EdgesEnd().

◆ CalculateForceBetweenGhostNodes()

template<unsigned DIM>
c_vector< double, DIM > MeshBasedCellPopulationWithGhostNodes< DIM >::CalculateForceBetweenGhostNodes ( const unsigned rNodeAGlobalIndex,
const unsigned rNodeBGlobalIndex 
)

This method is used to calculate the force between GHOST nodes.

Parameters
rNodeAGlobalIndex
rNodeBGlobalIndex
Returns
The force exerted on Node A by Node B.

Definition at line 150 of file MeshBasedCellPopulationWithGhostNodes.cpp.

◆ GetGhostNodeIndices()

template<unsigned DIM>
std::set< unsigned > MeshBasedCellPopulationWithGhostNodes< DIM >::GetGhostNodeIndices ( )
Returns
the indices of those nodes that are ghost nodes.

Definition at line 121 of file MeshBasedCellPopulationWithGhostNodes.cpp.

◆ GetNeighbouringLocationIndices()

template<unsigned DIM>
std::set< unsigned > MeshBasedCellPopulationWithGhostNodes< DIM >::GetNeighbouringLocationIndices ( CellPtr  pCell)
virtual

Overridden GetNeighbouringLocationIndices() method.

Given a cell, returns the set of location indices corresponding to neighbouring cells.

Parameters
pCella cell
Returns
the set of neighbouring location indices.

Reimplemented from AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 253 of file MeshBasedCellPopulationWithGhostNodes.cpp.

◆ GetTetrahedralMeshForPdeModifier()

template<unsigned DIM>
TetrahedralMesh< DIM, DIM > * MeshBasedCellPopulationWithGhostNodes< DIM >::GetTetrahedralMeshForPdeModifier ( )
virtual

Overridden GetTetrahedralMeshForPdeModifier() method.

Returns
a shared pointer to mrMesh.

This method is called by AbstractGrowingDomainPdeModifier.

Reimplemented from MeshBasedCellPopulation< DIM >.

Definition at line 102 of file MeshBasedCellPopulationWithGhostNodes.cpp.

References EXCEPTION.

◆ IsGhostNode()

template<unsigned DIM>
bool MeshBasedCellPopulationWithGhostNodes< DIM >::IsGhostNode ( unsigned  index)
virtual

Overridden IsGhostNode() method.

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

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

Reimplemented from AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 115 of file MeshBasedCellPopulationWithGhostNodes.cpp.

◆ OpenWritersFiles()

template<unsigned DIM>
void MeshBasedCellPopulationWithGhostNodes< DIM >::OpenWritersFiles ( OutputFileHandler rOutputFileHandler)
virtual

Overridden OpenWritersFiles() method.

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

Parameters
rOutputFileHandlerhandler for the directory in which to open this file.

Reimplemented from MeshBasedCellPopulation< DIM >.

Definition at line 345 of file MeshBasedCellPopulationWithGhostNodes.cpp.

References MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::OpenWritersFiles().

◆ OutputCellPopulationParameters()

template<unsigned DIM>
void MeshBasedCellPopulationWithGhostNodes< DIM >::OutputCellPopulationParameters ( out_stream &  rParamsFile)
virtual

Outputs CellPopulation parameters to file

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

Parameters
rParamsFilethe file stream to which the parameters are output

Reimplemented from MeshBasedCellPopulation< DIM >.

Definition at line 497 of file MeshBasedCellPopulationWithGhostNodes.cpp.

References MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::OutputCellPopulationParameters().

◆ RemoveGhostNode()

template<unsigned DIM>
void MeshBasedCellPopulationWithGhostNodes< DIM >::RemoveGhostNode ( unsigned  nodeIndex)
Parameters
nodeIndexthe index of the node to be removed.

Definition at line 224 of file MeshBasedCellPopulationWithGhostNodes.cpp.

References MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteNodePriorToReMesh().

◆ rGetGhostNodes()

template<unsigned DIM>
std::vector< bool > & MeshBasedCellPopulationWithGhostNodes< DIM >::rGetGhostNodes ( )
Returns
mIsGhostNode.

Definition at line 109 of file MeshBasedCellPopulationWithGhostNodes.cpp.

◆ serialize()

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

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
archivethe archive
versionthe current version of this class

Definition at line 95 of file MeshBasedCellPopulationWithGhostNodes.hpp.

References MeshBasedCellPopulationWithGhostNodes< DIM >::mGhostCellSpringStiffness, MeshBasedCellPopulationWithGhostNodes< DIM >::mGhostGhostSpringStiffness, MeshBasedCellPopulationWithGhostNodes< DIM >::mGhostSpringRestLength, and MeshBasedCellPopulationWithGhostNodes< DIM >::mIsGhostNode.

◆ SetGhostNodes()

template<unsigned DIM>
void MeshBasedCellPopulationWithGhostNodes< DIM >::SetGhostNodes ( const std::set< unsigned > &  rGhostNodeIndices)

Set the ghost nodes by taking in a set of which nodes indices are ghost nodes.

Parameters
rGhostNodeIndicesset of node indices corresponding to ghost nodes

Definition at line 135 of file MeshBasedCellPopulationWithGhostNodes.cpp.

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

◆ UpdateGhostNodesAfterReMesh()

template<unsigned DIM>
void MeshBasedCellPopulationWithGhostNodes< DIM >::UpdateGhostNodesAfterReMesh ( NodeMap rMap)
virtual

Update mIsGhostNode if required by a remesh.

Parameters
rMapA map between node indices before and after remesh

Reimplemented from MeshBasedCellPopulation< DIM >.

Definition at line 232 of file MeshBasedCellPopulationWithGhostNodes.cpp.

References NodeMap::GetNewIndex(), NodeMap::GetSize(), and NodeMap::IsDeleted().

◆ Validate()

template<unsigned DIM>
void MeshBasedCellPopulationWithGhostNodes< DIM >::Validate ( )
privatevirtual

This is called after a cell population has been constructed to check the user gave consistent instructions. Check consistency of our internal data structures: Each node must have a cell associated with it OR must be a ghost node.

It is called after cells are added or removed from MeshBasedCellPopulation as it is an overridden virtual method.

Reimplemented from MeshBasedCellPopulation< DIM >.

Definition at line 195 of file MeshBasedCellPopulationWithGhostNodes.cpp.

References EXCEPTION.

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

◆ WriteVtkResultsToFile()

template<unsigned DIM>
void MeshBasedCellPopulationWithGhostNodes< DIM >::WriteVtkResultsToFile ( const std::string &  rDirectory)
virtual

Overridden WriteVtkResultsToFile() method.

Parameters
rDirectorypathname of the output directory, relative to where Chaste output is stored
Todo:
#1975 - deal with possibility of information stored in CellData
Todo:
#1975 - deal with possibility of information stored in CellData

Reimplemented from MeshBasedCellPopulation< DIM >.

Definition at line 359 of file MeshBasedCellPopulationWithGhostNodes.cpp.

References VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::AddCellData(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::AddPointData(), SimulationTime::GetTimeStepsElapsed(), SimulationTime::Instance(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteVtkUsingMesh().

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<unsigned DIM>
friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 82 of file MeshBasedCellPopulationWithGhostNodes.hpp.

◆ TestMeshBasedCellPopulationWithGhostNodes

template<unsigned DIM>
friend class TestMeshBasedCellPopulationWithGhostNodes
friend

Just so that the test can test the private functions

Definition at line 61 of file MeshBasedCellPopulationWithGhostNodes.hpp.

Member Data Documentation

◆ mGhostCellSpringStiffness

template<unsigned DIM>
double MeshBasedCellPopulationWithGhostNodes< DIM >::mGhostCellSpringStiffness
private

Spring stiffness for springs between ghost nodes and cells.

Definition at line 69 of file MeshBasedCellPopulationWithGhostNodes.hpp.

Referenced by MeshBasedCellPopulationWithGhostNodes< DIM >::serialize().

◆ mGhostGhostSpringStiffness

template<unsigned DIM>
double MeshBasedCellPopulationWithGhostNodes< DIM >::mGhostGhostSpringStiffness
private

Spring stiffness for springs between ghost nodes.

Definition at line 74 of file MeshBasedCellPopulationWithGhostNodes.hpp.

Referenced by MeshBasedCellPopulationWithGhostNodes< DIM >::serialize().

◆ mGhostSpringRestLength

template<unsigned DIM>
double MeshBasedCellPopulationWithGhostNodes< DIM >::mGhostSpringRestLength
private

Rest length for springs between ghost nodes.

Definition at line 79 of file MeshBasedCellPopulationWithGhostNodes.hpp.

Referenced by MeshBasedCellPopulationWithGhostNodes< DIM >::serialize().

◆ mIsGhostNode

template<unsigned DIM>
std::vector<bool> MeshBasedCellPopulationWithGhostNodes< DIM >::mIsGhostNode
private

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