SmrNode< SMR > Class Template Reference

Node in a simplicial mesh that stores iterators to all incident cells. More...

#include <SmrNode.h>

List of all members.

Public Types

enum  { N = SMR::N }
 

The space dimension.


typedef SMR Mesh
 The simplicial mesh.
typedef Mesh::CellIterator CellIterator
 An iterator to a cell.
typedef Mesh::CellConstIterator CellConstIterator
 An iterator to a const cell.
typedef Mesh::NodeIterator NodeIterator
 An iterator to a node.
typedef Mesh::NodeConstIterator NodeConstIterator
 An iterator to a const node.
typedef Mesh::Number Number
 The number type.
typedef ads::FixedArray< N,
Number
Vertex
 A vertex (a Cartesian point).
typedef
CellIteratorContainer::iterator 
CellIteratorIterator
 An iterator for incident cell iterators.
typedef
CellIteratorContainer::const_iterator 
CellIteratorConstIterator
 A const iterator for incident cell iterators.
typedef ads::IndirectIterator
< typename
CellIteratorContainer::iterator > 
CellIncidentToNodeIterator
 An iterator for incident cells.
typedef ads::IndirectIterator
< typename
CellIteratorContainer::const_iterator > 
CellIncidentToNodeConstIterator
 A const iterator for incident cells.

Public Member Functions

Constructors and Destructor.

 SmrNode ()
 Default constructor. Uninitialized vertex, and null identifier and iterators.
 SmrNode (const Vertex &vertex, const int identifier=-1)
 Construct from a vertex and an identifier.
void build (const Vertex &vertex, const int identifier=-1, const NodeIterator self=0)
 Build from a vertex and an identifier.
 SmrNode (const SmrNode &other)
 Copy constructor.
 ~SmrNode ()
 Destructor.
Assignment operators.

SmrNodeoperator= (const SmrNode &other)
 Assignment operator.
Accessors.

const VertexgetVertex () const
 Return the vertex.
int getIdentifier () const
 Return the identifier of this node.
NodeConstIterator getSelf () const
 Return a const iterator to itself.
CellConstIterator getCell () const
 Return a const iterator to an incident cell.
int getCellsSize () const
 Return the number of incident cells.
CellIncidentToNodeConstIterator getCellsBeginning () const
 Return the begining of the incident cells.
CellIncidentToNodeConstIterator getCellsEnd () const
 Return the end of the incident cells.
CellIteratorConstIterator getCellIteratorsBeginning () const
 Return the begining of the incident cells iterators.
CellIteratorConstIterator getCellIteratorsEnd () const
 Return the end of the incident cell iterators.
bool hasCell (const CellConstIterator cellIterator) const
 Return true if this node is incident to the specified cell.
bool isOnBoundary () const
 Return true if the node is on the boundary.
Manipulators.

void setVertex (const Vertex &vertex)
 Set the vertex.
void setIdentifier (const int identifier) const
 Set the identifier.
NodeIterator getSelf ()
 Return an iterator to itself.
void setSelf (const NodeIterator self)
 Set the iterator to the derived vertex.
CellIterator getCell ()
 Return an iterator to an incident cell.
void insertCell (const CellIterator c)
 Add an incident cell.
template<typename CellIterInIter >
void insertCells (CellIterInIter begin, CellIterInIter end)
 Add a range of incident cells.
void removeCell (const CellIterator c)
 Remove an incident cell.
CellIncidentToNodeIterator getCellsBeginning ()
 Return the begining of the incident cells.
CellIncidentToNodeIterator getCellsEnd ()
 Return the end of the incident cells.
CellIteratorIterator getCellIteratorsBeginning ()
 Return the begining of the incident cell iterators.
CellIteratorIterator getCellIteratorsEnd ()
 Return the end of the incident cell iterators.
void replace (NodeIterator node)
 Replace this node with the specified one.
Equality.

bool operator== (const SmrNode &x) const
 Return true if this is equal to x.
bool operator!= (const SmrNode &x) const
 Return true if this is not equal to x.
File I/O.

void put (std::ostream &out) const
 Write the vertex point, identifier, and the iterators.

Detailed Description

template<class SMR>
class SmrNode< SMR >

Node in a simplicial mesh that stores iterators to all incident cells.

Parameters:
Mesh is the simplicial mesh.

The base class has the vertex, an iterator to itself, and an identifier. This class stores iterators to all incident cells.


Member Function Documentation

template<class SMR >
int SmrNode< SMR >::getIdentifier (  )  const [inline]

Return the identifier of this node.

Typically, the identifier is in the range [0...num_vertices). and a value of -1 indicates that the identifier has not been calculated.

Referenced by SmrNode< SMR >::put().

template<class SMR >
bool SmrNode< SMR >::isOnBoundary (  )  const [inline]

Return true if the node is on the boundary.

The node is on the boundary if there are any incident boundary faces. To determine this, we examine each of the incident cells.

References SmrNode< SMR >::getSelf().

template<class SMR >
void SmrNode< SMR >::replace ( NodeIterator  node  )  [inline]

Replace this node with the specified one.

This amounts to changing the simplex-vertex incidences.

References SmrNode< SMR >::getCellsBeginning(), SmrNode< SMR >::getCellsEnd(), and SmrNode< SMR >::getSelf().

template<class SMR >
void SmrNode< SMR >::setIdentifier ( const int  identifier  )  const [inline]

Set the identifier.

Note:
This member function is const because the identifier is mutable. It is intended to be modified as the mesh changes.

The documentation for this class was generated from the following file:
Generated on Thu Jun 30 02:14:59 2016 for Computational Geometry Package by  doxygen 1.6.3