MeshBasedTissueWithGhostNodes< DIM > Class Template Reference

#include <MeshBasedTissueWithGhostNodes.hpp>

Inheritance diagram for MeshBasedTissueWithGhostNodes< DIM >:

Inheritance graph
[legend]
Collaboration diagram for MeshBasedTissueWithGhostNodes< DIM >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 MeshBasedTissueWithGhostNodes (MutableMesh< DIM, DIM > &rMesh, const std::vector< TissueCell > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >(), bool deleteMesh=false)
 MeshBasedTissueWithGhostNodes (MutableMesh< DIM, DIM > &rMesh)
void UpdateNodeLocations (const std::vector< c_vector< double, DIM > > &rNodeForces, double dt)
std::vector< bool > & rGetGhostNodes ()
bool IsGhostNode (unsigned index)
std::set< unsigned > GetGhostNodeIndices ()
void UpdateGhostPositions (double dt)
void UpdateGhostNodesAfterReMesh (NodeMap &rMap)
c_vector< double, DIM > CalculateForceBetweenNodes (const unsigned &rNodeAGlobalIndex, const unsigned &rNodeBGlobalIndex)
TissueCellAddCell (TissueCell &rNewCell, c_vector< double, DIM > newLocation, TissueCell *pParentCell=NULL)

Private Member Functions

template<class Archive>
void serialize (Archive &archive, const unsigned int version)
void SetGhostNodes (const std::set< unsigned > &ghostNodeIndices)
void Validate ()

Private Attributes

std::vector< bool > mIsGhostNode

Friends

class TestMeshBasedTissueWithGhostNodes
class boost::serialization::access


Detailed Description

template<unsigned DIM>
class MeshBasedTissueWithGhostNodes< DIM >

A facade class encapsulating a mesh-based 'tissue' with ghost nodes.

Hides the 'ghost nodes' concept from the simulation class, so the latter only ever deals with real cells.

Definition at line 44 of file MeshBasedTissueWithGhostNodes.hpp.


Constructor & Destructor Documentation

template<unsigned DIM>
MeshBasedTissueWithGhostNodes< DIM >::MeshBasedTissueWithGhostNodes ( MutableMesh< DIM, DIM > &  rMesh,
const std::vector< TissueCell > &  rCells,
const std::vector< unsigned >  locationIndices = std::vector<unsigned>(),
bool  deleteMesh = false 
) [inline]

Create a new tissue facade from a mesh and collection of cells.

Parameters:
rMesh a mutable tetrahedral mesh
rCells TissueCells corresponding to the nodes of the mesh
locationIndices an optional vector of location indices that correspond to real cells
deleteMesh set to true if you want the tissue to free the mesh memory on destruction

Definition at line 32 of file MeshBasedTissueWithGhostNodes.cpp.

References MeshBasedTissue< DIM >::GetNode(), MeshBasedTissue< DIM >::GetNumNodes(), MeshBasedTissueWithGhostNodes< DIM >::mIsGhostNode, MeshBasedTissueWithGhostNodes< DIM >::SetGhostNodes(), and MeshBasedTissueWithGhostNodes< DIM >::Validate().

template<unsigned DIM>
MeshBasedTissueWithGhostNodes< DIM >::MeshBasedTissueWithGhostNodes ( MutableMesh< DIM, DIM > &  rMesh  )  [inline]

Constructor for use by the de-serializer.

Parameters:
rMesh a mutable tetrahedral mesh.

Definition at line 70 of file MeshBasedTissueWithGhostNodes.cpp.


Member Function Documentation

template<unsigned DIM>
template<class Archive>
void MeshBasedTissueWithGhostNodes< DIM >::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, private]

Serialize the facade.

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:
archive 
version 

Reimplemented from MeshBasedTissue< DIM >.

Definition at line 68 of file MeshBasedTissueWithGhostNodes.hpp.

template<unsigned DIM>
void MeshBasedTissueWithGhostNodes< DIM >::SetGhostNodes ( const std::set< unsigned > &  ghostNodeIndices  )  [inline, private]

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

Parameters:
ghostNodeIndices 

Definition at line 102 of file MeshBasedTissueWithGhostNodes.cpp.

References MeshBasedTissueWithGhostNodes< DIM >::mIsGhostNode, MeshBasedTissue< DIM >::mrMesh, and MeshBasedTissueWithGhostNodes< DIM >::Validate().

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

template<unsigned DIM>
void MeshBasedTissueWithGhostNodes< DIM >::Validate (  )  [inline, private, virtual]

This is called after a tissue 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 MeshBasedTissue as it is an overridden virtual method.

Reimplemented from MeshBasedTissue< DIM >.

Definition at line 205 of file MeshBasedTissueWithGhostNodes.cpp.

References AbstractTissue< DIM >::Begin(), AbstractTissue< DIM >::End(), MeshBasedTissue< DIM >::GetNumNodes(), AbstractTissue< DIM >::mCellLocationMap, and MeshBasedTissueWithGhostNodes< DIM >::mIsGhostNode.

Referenced by MeshBasedTissueWithGhostNodes< DIM >::MeshBasedTissueWithGhostNodes(), and MeshBasedTissueWithGhostNodes< DIM >::SetGhostNodes().

template<unsigned DIM>
void MeshBasedTissueWithGhostNodes< DIM >::UpdateNodeLocations ( const std::vector< c_vector< double, DIM > > &  rNodeForces,
double  dt 
) [inline, virtual]

Overridden UpdateNodeLocation() method.

Update the location of each node in the tissue given a vector of forces on nodes and a time step over which to integrate the equations of motion.

Parameters:
rNodeForces forces on nodes
dt time step

Reimplemented from AbstractCellCentreBasedTissue< DIM >.

Definition at line 259 of file MeshBasedTissueWithGhostNodes.cpp.

References MeshBasedTissueWithGhostNodes< DIM >::UpdateGhostPositions(), and AbstractCellCentreBasedTissue< DIM >::UpdateNodeLocations().

template<unsigned DIM>
std::vector< bool > & MeshBasedTissueWithGhostNodes< DIM >::rGetGhostNodes (  )  [inline]

Returns:
mIsGhostNode.

Definition at line 76 of file MeshBasedTissueWithGhostNodes.cpp.

References MeshBasedTissueWithGhostNodes< DIM >::mIsGhostNode.

template<unsigned DIM>
bool MeshBasedTissueWithGhostNodes< DIM >::IsGhostNode ( unsigned  index  )  [inline, 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:
index the global index of a specified node
Returns:
whether the node is a ghost node

Reimplemented from MeshBasedTissue< DIM >.

Definition at line 82 of file MeshBasedTissueWithGhostNodes.cpp.

References MeshBasedTissueWithGhostNodes< DIM >::mIsGhostNode.

template<unsigned DIM>
std::set< unsigned > MeshBasedTissueWithGhostNodes< DIM >::GetGhostNodeIndices (  )  [inline]

Returns:
the indices of those nodes that are ghost nodes.

Definition at line 88 of file MeshBasedTissueWithGhostNodes.cpp.

References MeshBasedTissueWithGhostNodes< DIM >::mIsGhostNode.

template<unsigned DIM>
void MeshBasedTissueWithGhostNodes< DIM >::UpdateGhostPositions ( double  dt  )  [inline]

template<unsigned DIM>
void MeshBasedTissueWithGhostNodes< DIM >::UpdateGhostNodesAfterReMesh ( NodeMap &  rMap  )  [inline, virtual]

Update mIsGhostNode if required by a remesh.

Parameters:
rMap A map between node indices before and after remesh

Reimplemented from MeshBasedTissue< DIM >.

Definition at line 238 of file MeshBasedTissueWithGhostNodes.cpp.

References MeshBasedTissue< DIM >::GetNumNodes(), and MeshBasedTissueWithGhostNodes< DIM >::mIsGhostNode.

template<unsigned DIM>
c_vector< double, DIM > MeshBasedTissueWithGhostNodes< DIM >::CalculateForceBetweenNodes ( const unsigned &  rNodeAGlobalIndex,
const unsigned &  rNodeBGlobalIndex 
) [inline]

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 166 of file MeshBasedTissueWithGhostNodes.cpp.

References MeshBasedTissue< DIM >::GetNode(), CancerParameters::GetSpringStiffness(), CancerParameters::Instance(), and MeshBasedTissue< DIM >::mrMesh.

Referenced by MeshBasedTissueWithGhostNodes< DIM >::UpdateGhostPositions().

template<unsigned DIM>
TissueCell * MeshBasedTissueWithGhostNodes< DIM >::AddCell ( TissueCell rNewCell,
c_vector< double, DIM >  newLocation,
TissueCell pParentCell = NULL 
) [inline, virtual]

Overridden AddCell() method.

Add a new cell to the tissue and update mIsGhostNode.

Parameters:
rNewCell the cell to add
newLocation the position in space at which to put it
pParentCell pointer to a parent cell (if required)
Returns:
address of cell as it appears in the cell list (internal of this method uses a copy constructor along the way)

Reimplemented from MeshBasedTissue< DIM >.

Definition at line 186 of file MeshBasedTissueWithGhostNodes.cpp.

References MeshBasedTissue< DIM >::AddCell(), MeshBasedTissue< DIM >::GetNumNodes(), AbstractTissue< DIM >::mCellLocationMap, and MeshBasedTissueWithGhostNodes< DIM >::mIsGhostNode.


Friends And Related Function Documentation

template<unsigned DIM>
friend class TestMeshBasedTissueWithGhostNodes [friend]

Just so that the test can test the private functions

Definition at line 49 of file MeshBasedTissueWithGhostNodes.hpp.

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

Needed for serialization.

Reimplemented from MeshBasedTissue< DIM >.

Definition at line 55 of file MeshBasedTissueWithGhostNodes.hpp.


Member Data Documentation

template<unsigned DIM>
std::vector<bool> MeshBasedTissueWithGhostNodes< DIM >::mIsGhostNode [private]


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

Generated on Wed Mar 18 12:52:37 2009 for Chaste by  doxygen 1.5.5