Cell in a simplicial mesh that stores handles to the adjacent cells. More...
#include <SmrCell.h>
Public Types | |
| enum | { M = SMR::M } |
The simplex 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::Vertex | Vertex |
| The vertex (a Cartesian point). | |
| typedef Mesh::Number | Number |
| The number type. | |
| typedef Simplex< M, NodeIterator > | NodeIteratorSimplex |
| The simplex of node iterators. | |
| typedef Simplex< M, CellIterator > | CellIteratorSimplex |
| The simplex of cell iterators. | |
| typedef NodeIteratorSimplex::Face | Face |
A face of the cell is a simplex of M vertex iterators. | |
Public Member Functions | |
Constructors and Destructor. | |
| SmrCell () | |
| Default constructor. Null iterators. | |
| SmrCell (const NodeIterator v0, const NodeIterator v1, const CellIterator c0=CellIterator(0), const CellIterator c1=CellIterator(0), const int identifier=-1) | |
| Construct a 1-D cell from the vertices and neighbors. | |
| SmrCell (const NodeIterator v0, const NodeIterator v1, const NodeIterator v2, const CellIterator c0=CellIterator(0), const CellIterator c1=CellIterator(0), const CellIterator c2=CellIterator(0), const int identifier=-1) | |
| Construct a 2-D cell from the vertices and neighbors. | |
| SmrCell (const NodeIterator v0, const NodeIterator v1, const NodeIterator v2, const NodeIterator v3, const CellIterator c0=CellIterator(0), const CellIterator c1=CellIterator(0), const CellIterator c2=CellIterator(0), const CellIterator c3=CellIterator(0), const int identifier=-1) | |
| Construct a 3-D cell from the vertices and neighbors. | |
| SmrCell (const SmrCell &other) | |
| Copy constructor. | |
| ~SmrCell () | |
| Trivial destructor. | |
Assignment operators. | |
| SmrCell & | operator= (const SmrCell &other) |
| Assignment operator. | |
Accessors. | |
| int | getIdentifier () const |
| Return the identifier of this simplex. | |
| CellConstIterator | getSelf () const |
| Return a const iterator to this cell. | |
| NodeConstIterator | getNode (const int m) const |
| Return a const iterator to the m_th node. | |
| const NodeIteratorSimplex & | getNodes () const |
| Return the simplex of node iterators. | |
| int | getIndex (NodeConstIterator node) const |
| Return the index of the specified node. | |
| int | getIndex (NodeIterator node) const |
| Return the index of the specified node. | |
| int | getIndex (const Face &f) const |
| Return the index of the specified vertex. | |
| bool | hasNode (NodeConstIterator node) const |
| Return true if the cell has the specified node. | |
| bool | hasNode (NodeConstIterator node, int *m) const |
| Return true if the cell has the specified node. | |
| bool | hasIncidentBoundaryFace (NodeConstIterator node) const |
| Return true if this cell has a boundary face that is incident to the specified node. | |
| bool | hasIncidentBoundaryFace (const int n) const |
| Return true if this cell has a boundary face that is incident to the specified node. | |
| void | getCentroid (Vertex *centroid) const |
| Calculate the centroid. | |
| CellConstIterator | getNeighbor (const int m) const |
| Return a const iterator to the n_th neighboring cell. | |
| bool | isFaceOnBoundary (const int m) const |
| Return true if the specified face is on the boundary. | |
| int | getNumberOfNeighbors () const |
| Return the number of neighbors. | |
| int | getIndex (CellConstIterator c) const |
| Return the index of the specified neighbor. | |
| bool | hasNeighbor (CellConstIterator c) const |
| Return true if the cell has the specified neighbor. | |
| bool | hasNeighbor (CellConstIterator c, int *m) const |
| Return true if the cell has the specified neighbor. | |
| int | getMirrorIndex (const int m) const |
| Return the index of this cell in the m_th neighbor. | |
| Number | computeMinimumEdgeLength (int *a, int *b) const |
| Return the minimum edge length. | |
| Number | computeMaximumEdgeLength (int *a, int *b) const |
| Return the maximum edge length. | |
| Number | computeMinimumEdgeLength () const |
| Return the minimum edge length. | |
| Number | computeMaximumEdgeLength () const |
| Return the maximum edge length. | |
| void | getSimplex (Simplex< M, Vertex > *simplex) |
| Get the (vertex) simplex that comprises the cell. | |
Manipulators. | |
| void | setIdentifier (const int identifier) const |
| Set the identifier. | |
| CellIterator | getSelf () |
| Return an iterator to this cell. | |
| void | setSelf (const CellIterator self) |
| Set the self iterator for this cell. | |
| NodeIterator | getNode (const int m) |
| Return an iterator to the m_th node. | |
| void | setNode (const int m, const NodeIterator node) |
| Set the m_th node. | |
| CellIterator | getNeighbor (const int m) |
| Return an iterator to the m_th neighboring cell. | |
| void | setNeighbor (const int m, const CellIterator c) |
| Set the m_th neighbor. | |
| NodeIterator | getMirrorVertex (const int m) |
| Return the vertex of the m_th neighbor that is opposite this cell. | |
| void | getFace (const int m, Face *f) |
| Get the face opposite the m_th vertex. | |
| void | unlink () |
| Unlink this cell from the mesh. | |
| void | removeNeighbor (const CellIterator c) |
| Remove the link to the specified neighbor. | |
| void | negate () |
| Reverse the orientation of this cell. | |
File I/O. | |
| void | put (std::ostream &out) const |
| Write the identifier, vertex identifiers and neighbor simplex identifiers. | |
Related Functions | |
(Note that these are not member functions.) | |
| template<class SMR > | |
| bool | doesCellHaveIncidentFaceOnBoundary (const typename SMR::CellConstIterator &c, int i, int j) |
| Return true if the cell has a boundary face incident to the edge. | |
| template<class SMR > | |
| bool | isOnBoundary (const typename SMR::CellConstIterator &c, int i, int j) |
| Return true if the edge is on the boundary. | |
| template<class SMR > | |
| bool | isOnBoundary (const typename SMR::Edge &edge) |
| Return true if the edge is on the boundary. | |
| template<class SMR > | |
| bool | hasFace (typename SMR::CellConstIterator cell, typename SMR::Cell::Face &face, int *faceIndex) |
| Return true if the cell has the specified face. Set the face index. | |
| template<class SMR > | |
| bool | hasFace (typename SMR::CellConstIterator cell, typename SMR::Cell::Face &face) |
| Return true if the cell has the specified face. Set the face index. | |
| template<class SMR > | |
| bool | hasFace (typename SMR::CellConstIterator cell, typename SMR::NodeConstIterator a, typename SMR::NodeConstIterator b, typename SMR::NodeConstIterator c, int *faceIndex) |
| Return true if the cell has the specified face. Set the face index. | |
| template<class SMR > | |
| bool | hasFace (typename SMR::CellConstIterator cell, typename SMR::NodeConstIterator a, typename SMR::NodeConstIterator b, typename SMR::NodeConstIterator c) |
| Return true if the cell has the specified face. | |
| template<class SMR > | |
| bool | hasFace (typename SMR::CellIterator cell, typename SMR::NodeIterator a, typename SMR::NodeIterator b, typename SMR::NodeIterator c, int *faceIndex) |
| Return true if the cell has the specified face. Set the face index. | |
| template<class SMR > | |
| bool | hasFace (typename SMR::CellIterator cell, typename SMR::NodeIterator a, typename SMR::NodeIterator b, typename SMR::NodeIterator c) |
| Return true if the cell has the specified face. | |
Cell in a simplicial mesh that stores handles to the adjacent cells.
| Mesh | is the simplicial mesh data structure. |
| Number SmrCell< SMR >::computeMaximumEdgeLength | ( | int * | a, | |
| int * | b | |||
| ) | const [inline] |
Return the maximum edge length.
Set a and b to the vertex indices that define the maximum edge.
References computeDistance().
| Number SmrCell< SMR >::computeMinimumEdgeLength | ( | int * | a, | |
| int * | b | |||
| ) | const [inline] |
Return the minimum edge length.
Set a and b to the vertex indices that define the minimum edge.
References computeDistance(), and max().
| int SmrCell< SMR >::getIdentifier | ( | ) | const [inline] |
Return the identifier of this simplex.
Typically, the identifier is in the range [0...num_simplices). and a value of -1 indicates that the identifier has not been calculated.
Referenced by SmrCell< SMR >::put().
Return the index of the specified vertex.
The vertex is specified by a face of the cell.
References Simplex< N, V, T >::hasVertex().
| bool SmrCell< SMR >::hasNeighbor | ( | CellConstIterator | c, | |
| int * | m | |||
| ) | const [inline] |
Return true if the cell has the specified neighbor.
If true, compute the index of the neighbor.
References Simplex< N, V, T >::hasVertex().
| bool SmrCell< SMR >::hasNode | ( | NodeConstIterator | node, | |
| int * | m | |||
| ) | const [inline] |
Return true if the cell has the specified node.
If true, compute the index of the node.
References Simplex< N, V, T >::hasVertex().
| void SmrCell< SMR >::removeNeighbor | ( | const CellIterator | c | ) | [inline] |
Remove the link to the specified neighbor.
The shared face becomes a boundary face.
References Simplex< N, V, T >::getBeginning(), and Simplex< N, V, T >::getEnd().
| void SmrCell< SMR >::setIdentifier | ( | const int | identifier | ) | const [inline] |
Set the identifier.
| bool doesCellHaveIncidentFaceOnBoundary | ( | const typename SMR::CellConstIterator & | c, | |
| int | i, | |||
| int | j | |||
| ) | [related] |
Return true if the cell has a boundary face incident to the edge.
| bool hasFace | ( | typename SMR::CellIterator | cell, | |
| typename SMR::NodeIterator | a, | |||
| typename SMR::NodeIterator | b, | |||
| typename SMR::NodeIterator | c | |||
| ) | [related] |
Return true if the cell has the specified face.
| bool hasFace | ( | typename SMR::CellIterator | cell, | |
| typename SMR::NodeIterator | a, | |||
| typename SMR::NodeIterator | b, | |||
| typename SMR::NodeIterator | c, | |||
| int * | faceIndex | |||
| ) | [related] |
Return true if the cell has the specified face. Set the face index.
References Simplex< N, V, T >::hasFace().
| bool hasFace | ( | typename SMR::CellConstIterator | cell, | |
| typename SMR::NodeConstIterator | a, | |||
| typename SMR::NodeConstIterator | b, | |||
| typename SMR::NodeConstIterator | c | |||
| ) | [related] |
Return true if the cell has the specified face.
| bool hasFace | ( | typename SMR::CellConstIterator | cell, | |
| typename SMR::NodeConstIterator | a, | |||
| typename SMR::NodeConstIterator | b, | |||
| typename SMR::NodeConstIterator | c, | |||
| int * | faceIndex | |||
| ) | [related] |
Return true if the cell has the specified face. Set the face index.
References Simplex< N, V, T >::hasFace().
| bool isOnBoundary | ( | const typename SMR::Edge & | edge | ) | [related] |
Return true if the edge is on the boundary.
i and j are the indices of the edge in the cell.
An edge is on the boundary iff an incident face is on the boundary.
| bool isOnBoundary | ( | const typename SMR::CellConstIterator & | c, | |
| int | i, | |||
| int | j | |||
| ) | [related] |
Return true if the edge is on the boundary.
i and j are the indices of the edge in the cell.
An edge is on the boundary iff an incident face is on the boundary.
1.6.3