NodeBasedCellPopulationWithParticles< DIM > Class Template Reference

#include <NodeBasedCellPopulationWithParticles.hpp>

Inherits NodeBasedCellPopulation< DIM >.

Collaboration diagram for NodeBasedCellPopulationWithParticles< DIM >:
Collaboration graph
[legend]

List of all members.

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)

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

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 
) [inline]

Default constructor.

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

Parameters:
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().

template<unsigned DIM>
NodeBasedCellPopulationWithParticles< DIM >::NodeBasedCellPopulationWithParticles ( NodesOnlyMesh< DIM > &  rMesh  )  [inline]

Constructor for use by the de-serializer.

Parameters:
rMesh a mutable nodes-only mesh

Definition at line 91 of file NodeBasedCellPopulationWithParticles.cpp.


Member Function Documentation

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

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 NodeBasedCellPopulation< DIM >.

Definition at line 170 of file NodeBasedCellPopulationWithParticles.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationIndexUsingCell(), and NodeBasedCellPopulation< DIM >::GetNode().

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

Definition at line 103 of file NodeBasedCellPopulationWithParticles.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mrMesh.

template<unsigned DIM>
bool NodeBasedCellPopulationWithParticles< DIM >::IsParticle ( unsigned  index  )  [inline, virtual]

IsParticle() method.

Find if a given node is a particle

Parameters:
index the 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.

References NodeBasedCellPopulation< DIM >::GetNode().

Referenced by NodeBasedCellPopulationWithParticles< DIM >::Validate(), and NodeBasedCellPopulationWithParticles< DIM >::WriteVtkResultsToFile().

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

Parameters:
rParamsFile the file stream to which the parameters are output

Reimplemented from NodeBasedCellPopulation< DIM >.

Definition at line 357 of file NodeBasedCellPopulationWithParticles.cpp.

template<unsigned DIM>
template<class Archive >
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.

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

Reimplemented from NodeBasedCellPopulation< DIM >.

Definition at line 81 of file NodeBasedCellPopulationWithParticles.hpp.

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

Parameters:
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().

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

Parameters:
dt time step

Reimplemented from AbstractCentreBasedCellPopulation< DIM >.

Definition at line 223 of file NodeBasedCellPopulationWithParticles.cpp.

References NodeBasedCellPopulationWithParticles< DIM >::UpdateParticlePositions().

template<unsigned DIM>
void NodeBasedCellPopulationWithParticles< DIM >::UpdateParticlePositions ( double  dt  )  [inline]
template<unsigned DIM>
void NodeBasedCellPopulationWithParticles< DIM >::UpdateParticlesAfterReMesh ( NodeMap rMap  )  [inline, virtual]

Update mIsParticle if required by a remesh.

Parameters:
rMap A 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 >::Validate (  )  [inline, protected, virtual]
template<unsigned DIM>
void NodeBasedCellPopulationWithParticles< DIM >::WriteVtkResultsToFile ( const std::string &  rDirectory  )  [inline, virtual]

Friends And Related Function Documentation

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

Needed for serialization.

Reimplemented from NodeBasedCellPopulation< DIM >.

Definition at line 70 of file NodeBasedCellPopulationWithParticles.hpp.


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

Generated by  doxygen 1.6.2