Node< SPACE_DIM > Class Template Reference

#include <Node.hpp>

Collaboration diagram for Node< SPACE_DIM >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Node (unsigned index, ChastePoint< SPACE_DIM > point, bool isBoundaryNode=false)
 Node (unsigned index, std::vector< double > coords, bool isBoundaryNode=false)
 Node (unsigned index, c_vector< double, SPACE_DIM > location, bool isBoundaryNode=false)
 Node (unsigned index, bool isBoundaryNode=false, double v1=0, double v2=0, double v3=0)
 Node (unsigned index, double *location, bool isBoundaryNode=false)
void SetPoint (ChastePoint< SPACE_DIM > point)
void SetIndex (unsigned index)
void SetAsBoundaryNode (bool value=true)
ChastePoint< SPACE_DIM > GetPoint () const
const c_vector< double,
SPACE_DIM > & 
rGetLocation () const
c_vector< double, SPACE_DIM > & rGetModifiableLocation ()
unsigned GetIndex () const
bool IsBoundaryNode () const
void AddElement (unsigned index)
void RemoveElement (unsigned index)
void RemoveBoundaryElement (unsigned index)
void AddBoundaryElement (unsigned index)
std::set< unsigned > & rGetContainingElementIndices ()
std::set< unsigned > & rGetContainingBoundaryElementIndices ()
unsigned GetNumContainingElements () const
unsigned GetNumBoundaryElements () const
void MarkAsDeleted ()
bool IsDeleted () const
void MarkAsInternal ()
bool IsInternal () const
template<unsigned ELEMENT_DIM>
bool IsFlagged (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh)
void SetRegion (unsigned region)
unsigned GetRegion () const
ContainingElementIterator ContainingElementsBegin () const
ContainingElementIterator ContainingElementsEnd () const
ContainingBoundaryElementIterator ContainingBoundaryElementsBegin () const
ContainingBoundaryElementIterator ContainingBoundaryElementsEnd () const

Private Member Functions

void CommonConstructor (unsigned index, bool isBoundaryNode)

Private Attributes

unsigned mIndex
unsigned mRegion
c_vector< double, SPACE_DIM > mLocation
bool mIsBoundaryNode
bool mIsInternal
bool mIsDeleted
std::set< unsigned > mElementIndices
std::set< unsigned > mBoundaryElementIndices

Classes

class  ContainingBoundaryElementIterator
class  ContainingElementIterator


Detailed Description

template<unsigned SPACE_DIM>
class Node< SPACE_DIM >

A node in a finite element mesh.

Definition at line 46 of file Node.hpp.


Constructor & Destructor Documentation

template<unsigned SPACE_DIM>
Node< SPACE_DIM >::Node ( unsigned  index,
ChastePoint< SPACE_DIM >  point,
bool  isBoundaryNode = false 
) [inline]

There are many ways of creating a node, depending on how you wish to specify its spatial location. Constructor which takes the node's location as a ChastePoint.

Parameters:
index the index of the node in the mesh
point the location of the node in the mesh
isBoundaryNode whether the node is a boundary node (defaults to false)

Definition at line 49 of file Node.cpp.

References Node< SPACE_DIM >::CommonConstructor(), Node< SPACE_DIM >::mLocation, and ChastePoint< DIM >::rGetLocation().

template<unsigned SPACE_DIM>
Node< SPACE_DIM >::Node ( unsigned  index,
std::vector< double >  coords,
bool  isBoundaryNode = false 
) [inline]

Constructor which takes the node's location as a std::vector.

Parameters:
index the index of the node in the mesh
coords the location of the node in the mesh
isBoundaryNode whether the node is a boundary node (defaults to false)

Definition at line 56 of file Node.cpp.

References Node< SPACE_DIM >::CommonConstructor(), and Node< SPACE_DIM >::mLocation.

template<unsigned SPACE_DIM>
Node< SPACE_DIM >::Node ( unsigned  index,
c_vector< double, SPACE_DIM >  location,
bool  isBoundaryNode = false 
) [inline]

Constructor which takes the node's location as a c_vector.

Parameters:
index the index of the node in the mesh
location the location of the node in the mesh
isBoundaryNode whether the node is a boundary node (defaults to false)

Definition at line 66 of file Node.cpp.

References Node< SPACE_DIM >::CommonConstructor(), and Node< SPACE_DIM >::mLocation.

template<unsigned SPACE_DIM>
Node< SPACE_DIM >::Node ( unsigned  index,
bool  isBoundaryNode = false,
double  v1 = 0,
double  v2 = 0,
double  v3 = 0 
) [inline]

Constructor which takes the coordinates of the node's location as separate input arguments.

Parameters:
index the index of the node in the mesh
isBoundaryNode whether the node is a boundary node (defaults to false)
v1 the x-coordinate of the node in the mesh (defaults to 0)
v2 the y-coordinate of the node in the mesh (defaults to 0)
v3 the z-coordinate of the node in the mesh (defaults to 0)

Definition at line 73 of file Node.cpp.

References Node< SPACE_DIM >::CommonConstructor(), and Node< SPACE_DIM >::mLocation.

template<unsigned SPACE_DIM>
Node< SPACE_DIM >::Node ( unsigned  index,
double *  location,
bool  isBoundaryNode = false 
) [inline]

Constructor which takes the coordinates of the node's location as array pointer.

Parameters:
index the index of the node in the mesh
isBoundaryNode whether the node is a boundary node (defaults to false)
location address of the x-coordinate of the node in the mesh (other coordinates are assumed to be in contiguous memory)

Definition at line 87 of file Node.cpp.

References Node< SPACE_DIM >::CommonConstructor(), and Node< SPACE_DIM >::mLocation.


Member Function Documentation

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::CommonConstructor ( unsigned  index,
bool  isBoundaryNode 
) [inline, private]

Extraction of commonality between the constructors.

Parameters:
index the index of the node in the mesh
isBoundaryNode whether the node is a boundary node

Definition at line 39 of file Node.cpp.

References Node< SPACE_DIM >::mIndex, Node< SPACE_DIM >::mIsBoundaryNode, Node< SPACE_DIM >::mIsDeleted, Node< SPACE_DIM >::mIsInternal, and Node< SPACE_DIM >::mRegion.

Referenced by Node< SPACE_DIM >::Node().

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::SetPoint ( ChastePoint< SPACE_DIM >  point  )  [inline]

Set the node's location.

Note: setting the point in space is dangerous. Jacobian and JacobianDeterminant of element need to be updated.

Parameters:
point the new location of the node

Definition at line 101 of file Node.cpp.

References Node< SPACE_DIM >::mLocation, and ChastePoint< DIM >::rGetLocation().

Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::DivideEdge().

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::SetIndex ( unsigned  index  )  [inline]

Set the index of this node in the mesh.

Parameters:
index the index of the node

Definition at line 107 of file Node.cpp.

References Node< SPACE_DIM >::mIndex.

Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::AddNode(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::AddNode(), and NodeBasedCellPopulation< DIM >::AddNode().

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::SetAsBoundaryNode ( bool  value = true  )  [inline]

template<unsigned SPACE_DIM>
ChastePoint< SPACE_DIM > Node< SPACE_DIM >::GetPoint (  )  const [inline]

template<unsigned SPACE_DIM>
const c_vector< double, SPACE_DIM > & Node< SPACE_DIM >::rGetLocation (  )  const [inline]

template<unsigned SPACE_DIM>
c_vector< double, SPACE_DIM > & Node< SPACE_DIM >::rGetModifiableLocation (  )  [inline]

template<unsigned SPACE_DIM>
unsigned Node< SPACE_DIM >::GetIndex (  )  const [inline]

template<unsigned SPACE_DIM>
bool Node< SPACE_DIM >::IsBoundaryNode (  )  const [inline]

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::AddElement ( unsigned  index  )  [inline]

Add an element that contains this node.

Parameters:
index of the element to add.

Definition at line 158 of file Node.cpp.

References Node< SPACE_DIM >::mElementIndices.

Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::MutableVertexMesh(), and VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexMesh().

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::RemoveElement ( unsigned  index  )  [inline]

Remove an element that contains this node.

Parameters:
index of the element to be removed.

Definition at line 164 of file Node.cpp.

References EXCEPTION, and Node< SPACE_DIM >::mElementIndices.

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::RemoveBoundaryElement ( unsigned  index  )  [inline]

Remove an boundary element that contains this node.

Parameters:
index of the boundary element to be removed.

Definition at line 174 of file Node.cpp.

References EXCEPTION, and Node< SPACE_DIM >::mBoundaryElementIndices.

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::AddBoundaryElement ( unsigned  index  )  [inline]

Add an boundary element that contains this node.

Parameters:
index of the element to add.

Definition at line 184 of file Node.cpp.

References Node< SPACE_DIM >::mBoundaryElementIndices.

template<unsigned SPACE_DIM>
std::set< unsigned > & Node< SPACE_DIM >::rGetContainingElementIndices (  )  [inline]

template<unsigned SPACE_DIM>
std::set< unsigned > & Node< SPACE_DIM >::rGetContainingBoundaryElementIndices (  )  [inline]

Return a set of indices of boundary elements containing this node as a vertex.

Definition at line 196 of file Node.cpp.

References Node< SPACE_DIM >::mBoundaryElementIndices.

template<unsigned SPACE_DIM>
unsigned Node< SPACE_DIM >::GetNumContainingElements (  )  const [inline]

Get the number of elements in the mesh that contain this node.

Definition at line 202 of file Node.cpp.

References Node< SPACE_DIM >::mElementIndices.

Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT1Swap(), and MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT3Swap().

template<unsigned SPACE_DIM>
unsigned Node< SPACE_DIM >::GetNumBoundaryElements (  )  const [inline]

Get the number of boundary elements in the mesh that contain this node.

Definition at line 208 of file Node.cpp.

References Node< SPACE_DIM >::mBoundaryElementIndices.

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::MarkAsDeleted (  )  [inline]

Mark the node as having been removed from the mesh.

Definition at line 218 of file Node.cpp.

References Node< SPACE_DIM >::mIsDeleted.

Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::DeleteElementPriorToReMesh().

template<unsigned SPACE_DIM>
bool Node< SPACE_DIM >::IsDeleted (  )  const [inline]

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::MarkAsInternal (  )  [inline]

Mark the node as being internal (not vertex) in a quadratic element.

Definition at line 230 of file Node.cpp.

References Node< SPACE_DIM >::mIsInternal.

template<unsigned SPACE_DIM>
bool Node< SPACE_DIM >::IsInternal (  )  const [inline]

Get whether the node is internal (not vertex) in a quadratic element.

Definition at line 236 of file Node.cpp.

References Node< SPACE_DIM >::mIsInternal.

template<unsigned SPACE_DIM>
template<unsigned ELEMENT_DIM>
bool Node< SPACE_DIM >::IsFlagged ( AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &  rMesh  )  [inline]

Determine if a node lives within a flagged element.

Parameters:
rMesh the mesh containing the nodes and elements

Definition at line 271 of file Node.hpp.

References Node< SPACE_DIM >::ContainingElementsBegin(), Node< SPACE_DIM >::ContainingElementsEnd(), and AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement().

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::SetRegion ( unsigned  region  )  [inline]

Set the node's region ID.

Parameters:
region the new region ID

Definition at line 242 of file Node.cpp.

References Node< SPACE_DIM >::mRegion.

template<unsigned SPACE_DIM>
unsigned Node< SPACE_DIM >::GetRegion (  )  const [inline]

Get the node's region ID.

Definition at line 248 of file Node.cpp.

References Node< SPACE_DIM >::mRegion.

template<unsigned SPACE_DIM>
ContainingElementIterator Node< SPACE_DIM >::ContainingElementsBegin (  )  const [inline]

template<unsigned SPACE_DIM>
ContainingElementIterator Node< SPACE_DIM >::ContainingElementsEnd (  )  const [inline]

template<unsigned SPACE_DIM>
ContainingBoundaryElementIterator Node< SPACE_DIM >::ContainingBoundaryElementsBegin (  )  const [inline]

Get a ContainingBoundaryElementIterator pointing to the first containing boundary element

Definition at line 420 of file Node.hpp.

References Node< SPACE_DIM >::mBoundaryElementIndices.

template<unsigned SPACE_DIM>
ContainingBoundaryElementIterator Node< SPACE_DIM >::ContainingBoundaryElementsEnd (  )  const [inline]

Get a ContainingBoundaryElementIterator pointing to one past the last containing boundary element

Definition at line 428 of file Node.hpp.

References Node< SPACE_DIM >::mBoundaryElementIndices.


Member Data Documentation

template<unsigned SPACE_DIM>
unsigned Node< SPACE_DIM >::mIndex [private]

The index of this node within the mesh.

Definition at line 51 of file Node.hpp.

Referenced by Node< SPACE_DIM >::CommonConstructor(), Node< SPACE_DIM >::GetIndex(), and Node< SPACE_DIM >::SetIndex().

template<unsigned SPACE_DIM>
unsigned Node< SPACE_DIM >::mRegion [private]

template<unsigned SPACE_DIM>
c_vector<double, SPACE_DIM> Node< SPACE_DIM >::mLocation [private]

template<unsigned SPACE_DIM>
bool Node< SPACE_DIM >::mIsBoundaryNode [private]

Whether this node is a boundary node.

Definition at line 60 of file Node.hpp.

Referenced by Node< SPACE_DIM >::CommonConstructor(), Node< SPACE_DIM >::IsBoundaryNode(), and Node< SPACE_DIM >::SetAsBoundaryNode().

template<unsigned SPACE_DIM>
bool Node< SPACE_DIM >::mIsInternal [private]

Whether this node is an internal node. (For use with QuadraticMesh)

Definition at line 63 of file Node.hpp.

Referenced by Node< SPACE_DIM >::CommonConstructor(), Node< SPACE_DIM >::IsInternal(), and Node< SPACE_DIM >::MarkAsInternal().

template<unsigned SPACE_DIM>
bool Node< SPACE_DIM >::mIsDeleted [private]

Whether this node has been deleted, and hence whether its location in the mesh can be re-used. (For use in MutableMesh)

Definition at line 69 of file Node.hpp.

Referenced by Node< SPACE_DIM >::CommonConstructor(), Node< SPACE_DIM >::IsDeleted(), Node< SPACE_DIM >::MarkAsDeleted(), Node< SPACE_DIM >::rGetLocation(), and Node< SPACE_DIM >::rGetModifiableLocation().

template<unsigned SPACE_DIM>
std::set<unsigned> Node< SPACE_DIM >::mElementIndices [private]

template<unsigned SPACE_DIM>
std::set<unsigned> Node< SPACE_DIM >::mBoundaryElementIndices [private]


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

Generated on Mon Nov 1 12:37:08 2010 for Chaste by  doxygen 1.5.5