NodesOnlyMesh< SPACE_DIM > Class Template Reference

#include <NodesOnlyMesh.hpp>

Inheritance diagram for NodesOnlyMesh< SPACE_DIM >:

Inheritance graph
[legend]
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 TetrahedralMesh< SPACE_DIM, SPACE_DIM > &rGeneratingMesh)
double GetCellRadius (unsigned index)
void SetCellRadius (unsigned index, double radius)
void ReMesh (NodeMap &rMap)
void DeleteNode (unsigned index)

Private Member Functions

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

Private Attributes

std::vector< double > mCellRadii

Friends

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>
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 65 of file NodesOnlyMesh.hpp.

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 37 of file NodesOnlyMesh.cpp.

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

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

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::ConstructNodesWithoutMesh ( const TetrahedralMesh< 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 TetrahedralMesh used to generate the NodesOnlyMesh

Definition at line 53 of file NodesOnlyMesh.cpp.

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

template<unsigned SPACE_DIM>
double NodesOnlyMesh< SPACE_DIM >::GetCellRadius ( unsigned  index  )  [inline]

Get the cell radius associated with a given node index.

Parameters:
index the index of a node

Definition at line 59 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::mCellRadii.

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 65 of file NodesOnlyMesh.cpp.

References NodesOnlyMesh< SPACE_DIM >::mCellRadii.

template<unsigned SPACE_DIM>
void NodesOnlyMesh< SPACE_DIM >::ReMesh ( NodeMap rMap  )  [inline, virtual]

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

Reimplemented from MutableMesh< SPACE_DIM, SPACE_DIM >.

Definition at line 124 of file NodesOnlyMesh.cpp.

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


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 52 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 Tue May 31 14:33:57 2011 for Chaste by  doxygen 1.5.5