A node in a simplicial mesh that stores a vertex, an iterator to itself, and an identifier. More...
#include <Node_VertSelfId.h>
Public Types | |
enum | { N = Mesh::N } |
The space dimension. | |
typedef Mesh | mesh_type |
The simplicial mesh. | |
typedef mesh_type::node_iterator | node_iterator |
An iterator to a node. | |
typedef mesh_type::node_const_iterator | node_const_iterator |
An iterator to a const node. | |
typedef mesh_type::number_type | number_type |
The number type. | |
typedef ads::FixedArray< N, number_type > | vertex_type |
A Cartesian point. | |
Public Member Functions | |
Constructors and Destructor. | |
Node_VertSelfId () | |
Default constructor. Uninitialized point, null iterator, id = -1. | |
Node_VertSelfId (const vertex_type &vertex, const int identifier=-1) | |
Construct from a point and an identifier. | |
void | build (const vertex_type &vertex, const int identifier=-1, const node_iterator self=0) |
Build from a point, an identifier and a vertex iterator. | |
Node_VertSelfId (const Node_VertSelfId &x) | |
Copy constructor. | |
~Node_VertSelfId () | |
Destructor. | |
Assignment operators. | |
Node_VertSelfId & | operator= (const Node_VertSelfId &x) |
Assignment operator. | |
Accessors. | |
const vertex_type & | vertex () const |
Return the Cartesian point. | |
node_const_iterator | self () const |
Return a const iterator to the derived vertex. | |
int | identifier () const |
Return the identifier of this vertex. | |
Manipulators. | |
void | set_vertex (const vertex_type &vertex) |
Set the point. | |
node_iterator | self () |
Return an iterator to the derived vertex. | |
void | set_self (const node_iterator self) |
Set the iterator to the derived vertex. | |
void | set_identifier (const int identifier) const |
Set the identifier. | |
template<typename CellIterator > | |
void | add_cell (const CellIterator c) |
This is here for compatibility with the other node classes. The function does nothing. | |
Equality. | |
bool | operator== (const Node_VertSelfId &x) const |
Return true if this is equal to x . | |
bool | operator!= (const Node_VertSelfId &x) const |
Return true if this is not equal to x . | |
File I/O. | |
void | put (std::ostream &out) const |
Write the vertex point and the identifier. |
A node in a simplicial mesh that stores a vertex, an iterator to itself, and an identifier.
Mesh | is the simplicial mesh class. |
This vertex class stores a vertex (a Cartesian point), an iterator to itself, and an integer identifier
int Node_VertSelfId< Mesh >::identifier | ( | ) | const [inline] |
Return the identifier of this vertex.
Typically, the identifier is in the range [0...num_vertices). and a value of -1 indicates that the identifier has not been calculated.
Reimplemented in Node_AllIncCells< Mesh >, and Node_OneIncCell< Mesh >.
Referenced by Node_VertSelfId< Mesh >::build(), Node_OneIncCell< Mesh >::identifier(), and Node_VertSelfId< Mesh >::put().
void Node_VertSelfId< Mesh >::set_identifier | ( | const int | identifier | ) | const [inline] |
Set the identifier.
Reimplemented in Node_AllIncCells< Mesh >, and Node_OneIncCell< Mesh >.
Referenced by Node_OneIncCell< Mesh >::set_identifier().