NodesOnlyMesh< SPACE_DIM > Class Template Reference

#include <NodesOnlyMesh.hpp>

Inherits MutableMesh< SPACE_DIM, SPACE_DIM >.

Collaboration diagram for NodesOnlyMesh< SPACE_DIM >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void ConstructNodesWithoutMesh (const std::vector< Node< SPACE_DIM > * > &rNodes)
void ConstructNodesWithoutMesh (const AbstractMesh< SPACE_DIM, SPACE_DIM > &rGeneratingMesh)
void Clear ()
double GetCellRadius (unsigned index)
void SetCellRadius (unsigned index, double radius)
void ReMesh (NodeMap &rMap)
unsigned AddNode (Node< SPACE_DIM > *pNewNode)
void DeleteNode (unsigned index)

Private Member Functions

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

Private Attributes

std::vector< doublemCellRadii

Friends

class TestNodesOnlyMesh
class boost::serialization::access

Detailed Description

template<unsigned SPACE_DIM>
class NodesOnlyMesh< SPACE_DIM >

Mesh class for storing lists of nodes (no elements). This inherits from MutableMesh because we want to be able to add and delete nodes.

Definition at line 42 of file NodesOnlyMesh.hpp.


Member Function Documentation

template<unsigned SPACE_DIM>
unsigned NodesOnlyMesh< SPACE_DIM >::AddNode ( Node< SPACE_DIM > *  pNewNode  )  [inline, virtual]

Overridden AddNode() method.

Parameters:
pNewNode pointer to the new node

Reimplemented from MutableMesh< SPACE_DIM, SPACE_DIM >.

Definition at line 144 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::mCellRadii, and NodesOnlyMesh< SPACE_DIM >::SetCellRadius().

Referenced by NodeBasedCellPopulation< DIM >::AddNode().

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::Clear (  )  [inline, virtual]

Overridden Clear() method for NodesOnlyMesh. Clears mCellRadii in addition to calling Clear() on the parent class.

Reimplemented from MutableMesh< SPACE_DIM, SPACE_DIM >.

Definition at line 57 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::mCellRadii.

Referenced by NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh(), and NodesOnlyMesh< SPACE_DIM >::ReMesh().

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh ( const AbstractMesh< SPACE_DIM, SPACE_DIM > &  rGeneratingMesh  )  [inline]

A Helper method to enable you to construct a nodes-only mesh by stripping the nodes TetrahedralMesh, this calls the ConstructNodesWithoutMesh method with the nodes

If this is the only way of constructing a mesh of this type, then we can be certain that elements and boundary elements are always unused.

Parameters:
rGeneratingMesh any mesh with nodes, used to generate the NodesOnlyMesh

Definition at line 51 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh(), and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes.

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh ( const std::vector< Node< SPACE_DIM > * > &  rNodes  )  [inline]

Construct the mesh using only nodes. No mesh is created, but the nodes are stored. The original vector of nodes is deep-copied: new node objects are made with are independent of the pointers in the input so that they can be safely deleted.

If this is the only way of constructing a mesh of this type, then we can be certain that elements and boundary elements are always unused.

Parameters:
rNodes a vector of pointers to nodes

Definition at line 33 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::Clear(), NodesOnlyMesh< SPACE_DIM >::mCellRadii, and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes.

Referenced by NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh(), PottsBasedCellPopulation< DIM >::WriteVtkResultsToFile(), and MeshBasedCellPopulation< DIM >::WriteVtkResultsToFile().

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::DeleteNode ( unsigned  index  )  [inline, virtual]

Overridden DeleteNode() method.

Parameters:
index is the index of the node to be deleted

Note: we do not need to update mCellRadii here, since if the node index is ever re-used when a new node is added, mCellRadii will be updated correctly.

Reimplemented from MutableMesh< SPACE_DIM, SPACE_DIM >.

Definition at line 160 of file NodesOnlyMesh.cpp.

References EXCEPTION, MutableMesh< SPACE_DIM, SPACE_DIM >::mDeletedNodeIndices, and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes.

template<unsigned SPACE_DIM>
double NodesOnlyMesh< SPACE_DIM >::GetCellRadius ( unsigned  index  )  [inline]
template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::ReMesh ( NodeMap rMap  )  [inline, virtual]
template<unsigned SPACE_DIM>
template<class Archive >
void NodesOnlyMesh< SPACE_DIM >::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, private]

Archives the member variables of the object which have to be preserved during its lifetime.

Note that we must archive any member variables FIRST so that this method can call a ReMesh (to convert from TrianglesMeshReader input format into our native format).

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

Reimplemented from MutableMesh< SPACE_DIM, SPACE_DIM >.

Definition at line 69 of file NodesOnlyMesh.hpp.

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::SetCellRadius ( unsigned  index,
double  radius 
) [inline]

Set the cell radius associated with a given node index.

Parameters:
index the index of a node
radius the cell radius

Definition at line 74 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::mCellRadii.

Referenced by NodeBasedCellPopulation< DIM >::AddCell(), and NodesOnlyMesh< SPACE_DIM >::AddNode().


Friends And Related Function Documentation

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

Needed for serialization.

Reimplemented from MutableMesh< SPACE_DIM, SPACE_DIM >.

Definition at line 56 of file NodesOnlyMesh.hpp.


Member Data Documentation

template<unsigned SPACE_DIM>
std::vector<double> NodesOnlyMesh< SPACE_DIM >::mCellRadii [private]

The documentation for this class was generated from the following files:
Generated on Thu Dec 22 13:06:52 2011 for Chaste by  doxygen 1.6.3