Chaste Release::3.1
|
#include <NodeBasedCellPopulationWithParticles.hpp>
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 (const std::vector< c_vector< double, DIM > > &rNodeForces, double dt) |
void | UpdateParticlesAfterReMesh (NodeMap &rMap) |
void | UpdateNodeLocations (const std::vector< c_vector< double, DIM > > &rNodeForces, double dt) |
std::vector< bool > & | rGetParticles () |
bool | IsParticle (unsigned index) |
std::set< unsigned > | GetParticleIndices () |
CellPtr | AddCell (CellPtr pNewCell, const c_vector< double, DIM > &rCellDivisionVector, CellPtr pParentCell) |
void | WriteVtkResultsToFile () |
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) |
Private Attributes | |
std::vector< bool > | mIsParticle |
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 |
||
) |
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 40 of file NodeBasedCellPopulationWithParticles.cpp.
References NodeBasedCellPopulation< DIM >::GetNode(), NodeBasedCellPopulation< DIM >::GetNumNodes(), NodeBasedCellPopulationWithParticles< DIM >::mIsParticle, NodeBasedCellPopulationWithParticles< DIM >::SetParticles(), and NodeBasedCellPopulationWithParticles< DIM >::Validate().
NodeBasedCellPopulationWithParticles< DIM >::NodeBasedCellPopulationWithParticles | ( | NodesOnlyMesh< DIM > & | rMesh | ) |
Constructor for use by the de-serializer.
rMesh | a mutable nodes-only mesh |
Definition at line 77 of file NodeBasedCellPopulationWithParticles.cpp.
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.
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 177 of file NodeBasedCellPopulationWithParticles.cpp.
References AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::AddCell(), and NodesOnlyMesh< SPACE_DIM >::SetCellRadius().
std::set< unsigned > NodeBasedCellPopulationWithParticles< DIM >::GetParticleIndices | ( | ) |
Definition at line 96 of file NodeBasedCellPopulationWithParticles.cpp.
bool NodeBasedCellPopulationWithParticles< DIM >::IsParticle | ( | unsigned | index | ) | [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 90 of file NodeBasedCellPopulationWithParticles.cpp.
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.
rParamsFile | the file stream to which the parameters are output |
Reimplemented from NodeBasedCellPopulation< DIM >.
Definition at line 387 of file NodeBasedCellPopulationWithParticles.cpp.
References NodeBasedCellPopulation< DIM >::OutputCellPopulationParameters().
std::vector< bool > & NodeBasedCellPopulationWithParticles< DIM >::rGetParticles | ( | ) |
Definition at line 84 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 84 of file NodeBasedCellPopulationWithParticles.hpp.
References NodeBasedCellPopulationWithParticles< DIM >::mIsParticle.
void NodeBasedCellPopulationWithParticles< DIM >::SetParticles | ( | const std::set< unsigned > & | rParticleIndices | ) | [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 110 of file NodeBasedCellPopulationWithParticles.cpp.
References NodeBasedCellPopulationWithParticles< DIM >::Validate().
Referenced by NodeBasedCellPopulationWithParticles< DIM >::NodeBasedCellPopulationWithParticles().
void NodeBasedCellPopulationWithParticles< DIM >::UpdateNodeLocations | ( | const std::vector< c_vector< double, DIM > > & | rNodeForces, |
double | dt | ||
) |
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.
rNodeForces | forces on cells |
dt | time step |
Definition at line 231 of file NodeBasedCellPopulationWithParticles.cpp.
References AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::UpdateNodeLocations().
void NodeBasedCellPopulationWithParticles< DIM >::UpdateParticlePositions | ( | const std::vector< c_vector< double, DIM > > & | rNodeForces, |
double | dt | ||
) |
Update particle positions.
rNodeForces | |
dt |
Definition at line 125 of file NodeBasedCellPopulationWithParticles.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorBegin(), and MutableMesh< ELEMENT_DIM, SPACE_DIM >::SetNode().
void NodeBasedCellPopulationWithParticles< DIM >::UpdateParticlesAfterReMesh | ( | NodeMap & | rMap | ) | [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 156 of file NodeBasedCellPopulationWithParticles.cpp.
References NodeMap::GetNewIndex(), NodeMap::IsDeleted(), and NodeMap::Size().
void NodeBasedCellPopulationWithParticles< DIM >::Validate | ( | ) | [protected, virtual] |
Check consistency of our internal data structures.
Reimplemented from NodeBasedCellPopulation< DIM >.
Definition at line 201 of file NodeBasedCellPopulationWithParticles.cpp.
References EXCEPTION.
Referenced by NodeBasedCellPopulationWithParticles< DIM >::NodeBasedCellPopulationWithParticles(), and NodeBasedCellPopulationWithParticles< DIM >::SetParticles().
void NodeBasedCellPopulationWithParticles< DIM >::WriteVtkResultsToFile | ( | ) | [virtual] |
Overridden WriteVtkResultsToFile method.
Reimplemented from NodeBasedCellPopulation< DIM >.
Definition at line 240 of file NodeBasedCellPopulationWithParticles.cpp.
References NodesOnlyMesh< SPACE_DIM >::GetCellRadius(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorBegin(), SimulationTime::GetTimeStepsElapsed(), SimulationTime::Instance(), and UNSIGNED_UNSET.
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from NodeBasedCellPopulation< DIM >.
Definition at line 73 of file NodeBasedCellPopulationWithParticles.hpp.
std::vector<bool> NodeBasedCellPopulationWithParticles< DIM >::mIsParticle [private] |
Records whether a node is a particle or not
Definition at line 63 of file NodeBasedCellPopulationWithParticles.hpp.
Referenced by NodeBasedCellPopulationWithParticles< DIM >::NodeBasedCellPopulationWithParticles(), and NodeBasedCellPopulationWithParticles< DIM >::serialize().