Chaste  Release::3.4
NodeBasedCellPopulationWithParticles< DIM > Class Template Reference

#include <NodeBasedCellPopulationWithParticles.hpp>

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

Public Member Functions

 NodeBasedCellPopulationWithParticles (NodesOnlyMesh< DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >(), bool deleteMesh=false)
 
 NodeBasedCellPopulationWithParticles (NodesOnlyMesh< DIM > &rMesh)
 
void UpdateParticlePositions (double dt)
 
void UpdateParticlesAfterReMesh (NodeMap &rMap)
 
void UpdateNodeLocations (double dt)
 
bool IsParticle (unsigned index)
 
std::set< unsignedGetParticleIndices ()
 
CellPtr AddCell (CellPtr pNewCell, const c_vector< double, DIM > &rCellDivisionVector, CellPtr pParentCell)
 
virtual void WriteVtkResultsToFile (const std::string &rDirectory)
 
void OutputCellPopulationParameters (out_stream &rParamsFile)
 
- Public Member Functions inherited from NodeBasedCellPopulation< DIM >
void SetNode (unsigned nodeIndex, ChastePoint< DIM > &rNewLocation)
 
 NodeBasedCellPopulation (NodesOnlyMesh< DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >(), bool deleteMesh=false, bool validate=true)
 
 NodeBasedCellPopulation (NodesOnlyMesh< DIM > &rMesh)
 
virtual ~NodeBasedCellPopulation ()
 
NodesOnlyMesh< DIM > & rGetMesh ()
 
const NodesOnlyMesh< DIM > & rGetMesh () const
 
unsigned GetNumNodes ()
 
virtual CellPtr GetCellUsingLocationIndex (unsigned index)
 
Node< DIM > * GetNode (unsigned index)
 
unsigned RemoveDeadCells ()
 
void Clear ()
 
void Update (bool hasHadBirthsOrDeaths=true)
 
std::vector< std::pair< Node
< DIM > *, Node< DIM > * > > & 
rGetNodePairs ()
 
virtual void AcceptPopulationWriter (boost::shared_ptr< AbstractCellPopulationWriter< DIM, DIM > > pPopulationWriter)
 
virtual void AcceptPopulationCountWriter (boost::shared_ptr< AbstractCellPopulationCountWriter< DIM, DIM > > pPopulationCountWriter)
 
virtual void AcceptCellWriter (boost::shared_ptr< AbstractCellWriter< DIM, DIM > > pCellWriter, CellPtr pCell)
 
double GetMechanicsCutOffLength ()
 
bool GetUseVariableRadii ()
 
void SetUseVariableRadii (bool useVariableRadii=true)
 
void SetLoadBalanceMesh (bool loadBalanceMesh)
 
void SetLoadBalanceFrequency (unsigned loadBalanceFrequency)
 
double GetWidth (const unsigned &rDimension)
 
c_vector< double, DIM > GetSizeOfCellPopulation ()
 
std::set< unsignedGetNodesWithinNeighbourhoodRadius (unsigned index, double neighbourhoodRadius)
 
std::set< unsignedGetNeighbouringNodeIndices (unsigned index)
 
double GetVolumeOfCell (CellPtr pCell)
 
void SendCellsToNeighbourProcesses ()
 
void NonBlockingSendCellsToNeighbourProcesses ()
 
void GetReceivedCells ()
 
std::pair< CellPtr, Node< DIM > * > GetCellNodePair (unsigned nodeIndex)
 
void AddReceivedCells ()
 
virtual void UpdateCellProcessLocation ()
 
- Public Member Functions inherited from AbstractCentreBasedCellPopulation< DIM >
 AbstractCentreBasedCellPopulation (AbstractMesh< ELEMENT_DIM, ELEMENT_DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >())
 
c_vector< double, ELEMENT_DIM > GetLocationOfCellCentre (CellPtr pCell)
 
Node< ELEMENT_DIM > * GetNodeCorrespondingToCell (CellPtr pCell)
 
CellPtr AddCell (CellPtr pNewCell, const c_vector< double, ELEMENT_DIM > &rCellDivisionVector, CellPtr pParentCell=CellPtr())
 
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 std::set< unsignedGetNeighbouringLocationIndices (CellPtr pCell)
 
virtual double GetDampingConstant (unsigned nodeIndex)
 
virtual bool IsGhostNode (unsigned index)
 
double GetMeinekeDivisionSeparation ()
 
void SetMeinekeDivisionSeparation (double divisionSeparation)
 
- Public Member Functions inherited from AbstractOffLatticeCellPopulation< ELEMENT_DIM, ELEMENT_DIM >
 AbstractOffLatticeCellPopulation (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >())
 
virtual unsigned AddNode (Node< SPACE_DIM > *pNewNode)=0
 
virtual void SetNode (unsigned nodeIndex, ChastePoint< SPACE_DIM > &rNewLocation)=0
 
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 ()
 
std::list< CellPtr > & rGetCells ()
 
virtual CellPtr AddCell (CellPtr pNewCell, const c_vector< double, SPACE_DIM > &rCellDivisionVector, CellPtr pParentCell=CellPtr())=0
 
std::vector< unsignedGetCellMutationStateCount ()
 
std::vector< unsignedGetCellProliferativeTypeCount ()
 
std::vector< unsignedGetCellCyclePhaseCount ()
 
unsigned GetNumRealCells ()
 
unsigned GetNumAllCells ()
 
void SetCellAncestorsToLocationIndices ()
 
std::set< unsignedGetCellAncestors ()
 
std::set< CellPtr > GetCellsUsingLocationIndex (unsigned index)
 
bool IsCellAttachedToLocationIndex (unsigned index)
 
void SetCellUsingLocationIndex (unsigned index, CellPtr pCell)
 
virtual void AddCellUsingLocationIndex (unsigned index, CellPtr pCell)
 
virtual void RemoveCellUsingLocationIndex (unsigned index, CellPtr pCell)
 
void MoveCellInLocationMap (CellPtr pCell, unsigned old_index, unsigned new_index)
 
unsigned GetLocationIndexUsingCell (CellPtr pCell)
 
boost::shared_ptr
< CellPropertyRegistry
GetCellPropertyRegistry ()
 
void SetDefaultCellMutationStateAndProliferativeTypeOrdering ()
 
c_vector< double, SPACE_DIM > GetCentroidOfCellPopulation ()
 
virtual void OpenWritersFiles (OutputFileHandler &rOutputFileHandler)
 
void CloseWritersFiles ()
 
virtual void WriteResultsToFiles (const std::string &rDirectory)
 
virtual void AcceptPopulationWriter (boost::shared_ptr< AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM > > pPopulationWriter)=0
 
virtual void AcceptPopulationCountWriter (boost::shared_ptr< AbstractCellPopulationCountWriter< ELEMENT_DIM, SPACE_DIM > > pPopulationCountWriter)=0
 
virtual void AcceptCellWriter (boost::shared_ptr< AbstractCellWriter< ELEMENT_DIM, SPACE_DIM > > pCellWriter, CellPtr pCell)=0
 
void OutputCellPopulationInfo (out_stream &rParamsFile)
 
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 ()
 
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)
 
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

void Validate ()
 
virtual void AcceptCellWritersAcrossPopulation ()
 
- Protected Member Functions inherited from AbstractCentreBasedCellPopulation< DIM >
 AbstractCentreBasedCellPopulation (AbstractMesh< ELEMENT_DIM, ELEMENT_DIM > &rMesh)
 
- Protected Member Functions inherited from AbstractOffLatticeCellPopulation< ELEMENT_DIM, ELEMENT_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

void SetParticles (const std::set< unsigned > &rParticleIndices)
 
template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 

Friends

class TestNodeBasedCellPopulationWithParticles
 
class boost::serialization::access
 

Additional Inherited Members

- Protected Attributes inherited from NodeBasedCellPopulation< DIM >
NodesOnlyMesh< DIM > * mpNodesOnlyMesh
 
- Protected Attributes inherited from AbstractCentreBasedCellPopulation< DIM >
double mMeinekeDivisionSeparation
 
std::set< std::pair< CellPtr,
CellPtr > > 
mMarkedSprings
 
- Protected Attributes inherited from AbstractOffLatticeCellPopulation< ELEMENT_DIM, ELEMENT_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
< CellPropertyRegistry
mpCellPropertyRegistry
 
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
 

Detailed Description

template<unsigned DIM>
class NodeBasedCellPopulationWithParticles< DIM >

A NodeBasedCellPopulationWithParticles is a NodeBasedCellPopulation with cells interacting with particles, such as ECM or fluid particles.

Definition at line 50 of file NodeBasedCellPopulationWithParticles.hpp.

Constructor & Destructor Documentation

template<unsigned DIM>
NodeBasedCellPopulationWithParticles< DIM >::NodeBasedCellPopulationWithParticles ( NodesOnlyMesh< DIM > &  rMesh,
std::vector< CellPtr > &  rCells,
const std::vector< unsigned locationIndices = std::vector<unsigned>(),
bool  deleteMesh = false 
)

Default constructor.

Note that the cell population will take responsibility for freeing the memory used by the nodes.

Parameters
rMesha mutable nodes-only mesh
rCellsa vector of cells
locationIndicesan optional vector of location indices that correspond to real cells
deleteMeshwhether to delete nodes-only mesh in destructor

Definition at line 46 of file NodeBasedCellPopulationWithParticles.cpp.

References EXCEPT_IF_NOT, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorBegin(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorEnd(), PetscTools::IsSequential(), NodeBasedCellPopulationWithParticles< DIM >::SetParticles(), and NodeBasedCellPopulationWithParticles< DIM >::Validate().

Constructor for use by the de-serializer.

Parameters
rMesha mutable nodes-only mesh

Definition at line 91 of file NodeBasedCellPopulationWithParticles.cpp.

Member Function Documentation

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

Overridden AcceptCellWritersAcrossPopulation() method.

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

Reimplemented from AbstractCentreBasedCellPopulation< DIM >.

Definition at line 233 of file NodeBasedCellPopulationWithParticles.cpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorEnd().

template<unsigned DIM>
CellPtr NodeBasedCellPopulationWithParticles< DIM >::AddCell ( CellPtr  pNewCell,
const c_vector< double, DIM > &  rCellDivisionVector,
CellPtr  pParentCell 
)
virtual

Overridden AddCell() method.

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

Parameters
pNewCellthe cell to add
rCellDivisionVectorthe position in space at which to put it
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 NodeBasedCellPopulation< DIM >.

Definition at line 170 of file NodeBasedCellPopulationWithParticles.cpp.

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

template<unsigned DIM>
std::set< unsigned > NodeBasedCellPopulationWithParticles< DIM >::GetParticleIndices ( )
Returns
the indices of those nodes that are particles.

Definition at line 103 of file NodeBasedCellPopulationWithParticles.cpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorBegin().

template<unsigned DIM>
bool NodeBasedCellPopulationWithParticles< DIM >::IsParticle ( unsigned  index)
virtual

IsParticle() method.

Find if a given node is a particle

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

Reimplemented from AbstractCentreBasedCellPopulation< DIM >.

Definition at line 97 of file NodeBasedCellPopulationWithParticles.cpp.

template<unsigned DIM>
void NodeBasedCellPopulationWithParticles< 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 NodeBasedCellPopulation< DIM >.

Definition at line 379 of file NodeBasedCellPopulationWithParticles.cpp.

References NodeBasedCellPopulation< DIM >::OutputCellPopulationParameters().

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

Serialize the object and its member variables.

Note that serialization of the nodes is handled by load/save_construct_data, so we don't actually have to do anything here except delegate to the base class.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 89 of file NodeBasedCellPopulationWithParticles.hpp.

template<unsigned DIM>
void NodeBasedCellPopulationWithParticles< DIM >::SetParticles ( const std::set< unsigned > &  rParticleIndices)
private

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

Parameters
rParticleIndicesset of node indices corresponding to particles

Definition at line 121 of file NodeBasedCellPopulationWithParticles.cpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorBegin(), and NodeBasedCellPopulationWithParticles< DIM >::Validate().

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

template<unsigned DIM>
void NodeBasedCellPopulationWithParticles< DIM >::UpdateNodeLocations ( double  dt)
virtual

Overridden UpdateNodeLocation() method.

Update the location of each node in the cell population given a two vectors of forces on cells and particles and a time step over which to integrate the equations of motion.

Parameters
dttime step

Reimplemented from AbstractCentreBasedCellPopulation< DIM >.

Definition at line 223 of file NodeBasedCellPopulationWithParticles.cpp.

References AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::UpdateNodeLocations().

template<unsigned DIM>
void NodeBasedCellPopulationWithParticles< DIM >::UpdateParticlePositions ( double  dt)

Update particle positions.

Parameters
dt

Definition at line 136 of file NodeBasedCellPopulationWithParticles.cpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorBegin().

template<unsigned DIM>
void NodeBasedCellPopulationWithParticles< DIM >::UpdateParticlesAfterReMesh ( NodeMap rMap)
virtual

Update mIsParticle if required by a remesh.

Parameters
rMapA map between node indices before and after remesh

Reimplemented from NodeBasedCellPopulation< DIM >.

Definition at line 165 of file NodeBasedCellPopulationWithParticles.cpp.

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

Friends And Related Function Documentation

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

Needed for serialization.

Definition at line 78 of file NodeBasedCellPopulationWithParticles.hpp.


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