#include <NodeBasedCellPopulationWithParticles.hpp>
Inherits NodeBasedCellPopulation< 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< unsigned > | GetParticleIndices () |
CellPtr | AddCell (CellPtr pNewCell, const c_vector< double, DIM > &rCellDivisionVector, CellPtr pParentCell) |
virtual void | WriteVtkResultsToFile (const std::string &rDirectory) |
void | OutputCellPopulationParameters (out_stream &rParamsFile) |
Protected Member Functions | |
void | Validate () |
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 |
A NodeBasedCellPopulationWithParticles is a NodeBasedCellPopulation with cells interacting with particles, such as ECM or fluid particles.
Definition at line 50 of file NodeBasedCellPopulationWithParticles.hpp.
NodeBasedCellPopulationWithParticles< DIM >::NodeBasedCellPopulationWithParticles | ( | NodesOnlyMesh< DIM > & | rMesh, | |
std::vector< CellPtr > & | rCells, | |||
const std::vector< unsigned > | locationIndices = std::vector<unsigned>() , |
|||
bool | deleteMesh = false | |||
) | [inline] |
Default constructor.
Note that the cell population will take responsibility for freeing the memory used by the nodes.
rMesh | a mutable nodes-only mesh | |
rCells | a vector of cells | |
locationIndices | an optional vector of location indices that correspond to real cells | |
deleteMesh | whether 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().
NodeBasedCellPopulationWithParticles< DIM >::NodeBasedCellPopulationWithParticles | ( | NodesOnlyMesh< DIM > & | rMesh | ) | [inline] |
Constructor for use by the de-serializer.
rMesh | a mutable nodes-only mesh |
Definition at line 91 of file NodeBasedCellPopulationWithParticles.cpp.
CellPtr NodeBasedCellPopulationWithParticles< 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 mIsParticle.
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 NodeBasedCellPopulation< DIM >.
Definition at line 170 of file NodeBasedCellPopulationWithParticles.cpp.
References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationIndexUsingCell(), and NodeBasedCellPopulation< DIM >::GetNode().
std::set< unsigned > NodeBasedCellPopulationWithParticles< DIM >::GetParticleIndices | ( | ) | [inline] |
Definition at line 103 of file NodeBasedCellPopulationWithParticles.cpp.
References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mrMesh.
bool NodeBasedCellPopulationWithParticles< DIM >::IsParticle | ( | unsigned | index | ) | [inline, virtual] |
IsParticle() method.
Find if a given node is a particle
index | the global index of a specified node |
Reimplemented from AbstractCentreBasedCellPopulation< DIM >.
Definition at line 97 of file NodeBasedCellPopulationWithParticles.cpp.
References NodeBasedCellPopulation< DIM >::GetNode().
Referenced by NodeBasedCellPopulationWithParticles< DIM >::Validate(), and NodeBasedCellPopulationWithParticles< DIM >::WriteVtkResultsToFile().
void NodeBasedCellPopulationWithParticles< DIM >::OutputCellPopulationParameters | ( | out_stream & | rParamsFile | ) | [inline, virtual] |
Outputs CellPopulation parameters to file
As this method is pure virtual, it must be overridden in subclasses.
rParamsFile | the file stream to which the parameters are output |
Reimplemented from NodeBasedCellPopulation< DIM >.
Definition at line 357 of file NodeBasedCellPopulationWithParticles.cpp.
void NodeBasedCellPopulationWithParticles< DIM >::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
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.
archive | the archive | |
version | the current version of this class |
Reimplemented from NodeBasedCellPopulation< DIM >.
Definition at line 81 of file NodeBasedCellPopulationWithParticles.hpp.
void NodeBasedCellPopulationWithParticles< DIM >::SetParticles | ( | const std::set< unsigned > & | rParticleIndices | ) | [inline, private] |
Set the particles by taking in a set of which nodes indices are particles.
rParticleIndices | set of node indices corresponding to particles |
Definition at line 121 of file NodeBasedCellPopulationWithParticles.cpp.
References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mrMesh, and NodeBasedCellPopulationWithParticles< DIM >::Validate().
Referenced by NodeBasedCellPopulationWithParticles< DIM >::NodeBasedCellPopulationWithParticles().
void NodeBasedCellPopulationWithParticles< DIM >::UpdateNodeLocations | ( | double | dt | ) | [inline, 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.
dt | time step |
Reimplemented from AbstractCentreBasedCellPopulation< DIM >.
Definition at line 223 of file NodeBasedCellPopulationWithParticles.cpp.
References NodeBasedCellPopulationWithParticles< DIM >::UpdateParticlePositions().
void NodeBasedCellPopulationWithParticles< DIM >::UpdateParticlePositions | ( | double | dt | ) | [inline] |
Update particle positions.
dt |
Definition at line 136 of file NodeBasedCellPopulationWithParticles.cpp.
References AbstractOffLatticeCellPopulation< ELEMENT_DIM, ELEMENT_DIM >::GetDampingConstantNormal(), NodeBasedCellPopulation< DIM >::GetNode(), NodeBasedCellPopulation< DIM >::GetNumNodes(), and AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mrMesh.
Referenced by NodeBasedCellPopulationWithParticles< DIM >::UpdateNodeLocations().
void NodeBasedCellPopulationWithParticles< DIM >::UpdateParticlesAfterReMesh | ( | NodeMap & | rMap | ) | [inline, virtual] |
Update mIsParticle if required by a remesh.
rMap | A map between node indices before and after remesh |
Reimplemented from NodeBasedCellPopulation< DIM >.
Definition at line 165 of file NodeBasedCellPopulationWithParticles.cpp.
void NodeBasedCellPopulationWithParticles< DIM >::Validate | ( | ) | [inline, protected, virtual] |
Check consistency of our internal data structures.
Reimplemented from NodeBasedCellPopulation< DIM >.
Definition at line 188 of file NodeBasedCellPopulationWithParticles.cpp.
References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Begin(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::End(), EXCEPTION, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationIndexUsingCell(), NodeBasedCellPopulation< DIM >::GetNode(), NodeBasedCellPopulationWithParticles< DIM >::IsParticle(), and AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mrMesh.
Referenced by NodeBasedCellPopulationWithParticles< DIM >::NodeBasedCellPopulationWithParticles(), and NodeBasedCellPopulationWithParticles< DIM >::SetParticles().
void NodeBasedCellPopulationWithParticles< DIM >::WriteVtkResultsToFile | ( | const std::string & | rDirectory | ) | [inline, virtual] |
Overridden WriteVtkResultsToFile() method.
rDirectory | pathname of the output directory, relative to where Chaste output is stored |
Reimplemented from NodeBasedCellPopulation< DIM >.
Definition at line 233 of file NodeBasedCellPopulationWithParticles.cpp.
References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Begin(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::End(), EXCEPT_IF_NOT, NodeBasedCellPopulation< DIM >::GetCellUsingLocationIndex(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationIndexUsingCell(), NodesOnlyMesh< SPACE_DIM >::GetMaximumNodeIndex(), PetscTools::GetMyRank(), NodeBasedCellPopulation< DIM >::GetNumNodes(), SimulationTime::GetTimeStepsElapsed(), SimulationTime::Instance(), NodeBasedCellPopulationWithParticles< DIM >::IsParticle(), PetscTools::IsSequential(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mCellWriters, NodeBasedCellPopulation< DIM >::mpNodesOnlyMesh, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mpVtkMetaFile, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mrMesh, NodesOnlyMesh< SPACE_DIM >::ReMesh(), NodeBasedCellPopulation< DIM >::rGetMesh(), and NodesOnlyMesh< SPACE_DIM >::SolveNodeMapping().
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from NodeBasedCellPopulation< DIM >.
Definition at line 70 of file NodeBasedCellPopulationWithParticles.hpp.