SimpMeshRed< _N, _M, T, _Node, _Cell, Container > Class Template Reference

A simplicial mesh data structure. More...

#include <SimpMeshRed.h>

List of all members.

Classes

struct  CellIteratorCompare
 Functor for comparing cell iterators by their identifiers. More...
struct  FaceCompare
 Functor for comparing faces. More...
struct  FaceIteratorCompare
 Functor for comparing face iterators. More...
class  IndSimpIter
 An indexed simplex iterator for a SimpMeshRed. More...
struct  NodeIteratorCompare
 Functor for comparing node iterators by their identifiers. More...
class  SimpIter
 A simplex iterator for a SimpMeshRed. More...

Public Types

enum  { N = _N, M = _M }
 

The space dimension and simplex dimension.


typedef NodeContainer::value_type Node
 A node.
typedef NodeContainer::iterator NodeIterator
 Node iterator.
typedef
NodeContainer::const_iterator 
NodeConstIterator
 Vertex const iterator.
typedef CellContainer::value_type Cell
 A cell (simplex).
typedef CellContainer::iterator CellIterator
 Cell iterator.
typedef
CellContainer::const_iterator 
CellConstIterator
 Cell const iterator.
typedef std::pair
< CellConstIterator, int > 
ConstFace
 A const face of a cell is determined by a cell and a node index.
typedef FaceIterator< M,
ConstFace, CellConstIterator
FaceConstIterator
 A bidirectional, constant iterator on the faces.
typedef std::pair
< CellIterator, int > 
Face
 A face of a cell is determined by a cell and a node index.
typedef FaceIterator< M, Face,
CellIterator
FaceIterator
 A bidirectional, iterator on the faces.
typedef ads::Triplet
< CellConstIterator, int, int > 
ConstEdge
 A const edge of a cell is determined by a cell and two node indices.
typedef EdgeIterator
< SimpMeshRed, true > 
EdgeConstIterator
 A bidirectional, constant iterator on the edges.
typedef ads::Triplet
< CellIterator, int, int > 
Edge
 An edge of a cell is determined by a cell and two node indices.
typedef EdgeIterator
< SimpMeshRed, false > 
EdgeIterator
 A bidirectional, iterator on the edges.
typedef T Number
 The number type.
typedef Node::Vertex Vertex
 A node (a Cartesian point).
typedef BBox< N, NumberBBox
 A bounding box.
typedef int SizeType
 The size type.
typedef
NodeContainer::difference_type 
DifferenceType
 The pointer difference type.
typedef Simplex< M, int > IndexedSimplex
 A simplex of indices.
typedef Simplex< M, VertexSimplex
 A simplex of vertices.
typedef ads::MemFunIterator
< NodeConstIterator, Node,
const Vertex &, true > 
VertexIterator
 Vertex point iterator.
typedef ads::MemFunIterator
< NodeConstIterator, Node, int,
true > 
NodeIdentifierIterator
 Node identifier iterator.
typedef ads::MemFunIterator
< CellConstIterator, Cell, int,
true > 
CellIdentifierIterator
 Cell identifier iterator.
typedef IndSimpIter IndexedSimplexIterator
 A const iterator over indexed simplices.
typedef SimpIter SimplexIterator
 A const iterator over simplices.
typedef std::set< NodeIterator,
NodeIteratorCompare
NodeIteratorSet
 A set of node iterators.
typedef std::set< CellIterator,
CellIteratorCompare
CellIteratorSet
 A set of cell iterators.
typedef std::set< Face,
FaceCompare
FaceSet
 A set of faces.
typedef std::set< FaceIterator,
FaceIteratorCompare
FaceIteratorSet
 A set of face iterators.

Public Member Functions

Constructors and Destructor.

 SimpMeshRed ()
 Default constructor. Empty containers.
 SimpMeshRed (const SimpMeshRed &other)
 Copy constructor.
template<bool A, typename V , typename IS >
 SimpMeshRed (const IndSimpSet< N, M, A, Number, V, IS > &iss)
 Construct from an indexed simplex set.
SimpMeshRedoperator= (const SimpMeshRed &other)
 Assignment operator.
template<typename VertInIter , typename SimpInIter >
void build (VertInIter verticesBeginning, VertInIter verticesEnd, SimpInIter simplicesBeginning, SimpInIter simplicesEnd)
 Build from an indexed simplex set.
template<bool A, typename V , typename IS >
void build (const IndSimpSet< N, M, A, Number, V, IS > &iss)
 Build from an indexed simplex set.
void swap (SimpMeshRed &x)
 Swap.
void clear ()
 Clear the mesh.
 ~SimpMeshRed ()
 Destructor.
Dimension accessors.

int getSpaceDimension () const
 Return the space dimension.
int getSimplexDimension () const
 Return the simplex dimension.
Node accessors.

bool areNodesEmpty () const
 Return true if there are no nodes.
SizeType computeNodesSize () const
 Return the number of nodes.
NodeConstIterator getNodesBeginning () const
 Return the beginning of the nodes.
NodeConstIterator getNodesEnd () const
 Return the end of the nodes.
VertexIterator getVerticesBeginning () const
 Return the beginning of the node vertices.
VertexIterator getVerticesEnd () const
 Return the end of the node vertices.
NodeIdentifierIterator getNodeIdentifiersBeginning () const
 Return the beginning of the node identifiers.
NodeIdentifierIterator getNodeIdentifiersEnd () const
 Return the end of the vertex identifiers.
int computeMaximumNodeIdentifier () const
 Return the maximum node identifier.
Cell accessors.

bool areCellsEmpty () const
 Return true if there are no cells.
SizeType computeCellsSize () const
 Return the number of cells.
CellConstIterator getCellsBeginning () const
 Return the beginning of the cells.
CellConstIterator getCellsEnd () const
 Return the end of the cells.
void getSimplex (CellConstIterator i, Simplex *s) const
 Get the simplex given a const iterator to the cell.
CellIdentifierIterator getCellIdentifiersBeginning () const
 Return the beginning of the cell identifiers.
CellIdentifierIterator getCellIdentifiersEnd () const
 Return the end of the cell identifiers.
int computeMaximumCellIdentifier () const
 Return the maximum cell identifier.
Simplex accessors.

IndexedSimplexIterator getIndexedSimplicesBeginning () const
 Return the beginning of the indexed simplices.
IndexedSimplexIterator getIndexedSimplicesEnd () const
 Return the end of the indexed simplices.
SimplexIterator getSimplicesBeginning () const
 Return the beginning of the simplices.
SimplexIterator getSimplicesEnd () const
 Return the end of the simplices.
Face accessors.

SizeType computeFacesSize () const
 Return the number of faces.
FaceConstIterator getFacesBeginning () const
 Return the beginning of the faces.
FaceConstIterator getFacesEnd () const
 Return the end of the faces.
Edge accessors.

SizeType computeEdgesSize () const
 Return the number of edges.
EdgeConstIterator getEdgesBeginning () const
 Return the beginning of the edges.
EdgeConstIterator getEdgesEnd () const
 Return the end of the edges.
Node manipulators.

NodeIterator getNodesBeginning ()
 Return the beginning of the nodes.
NodeIterator getNodesEnd ()
 Return the end of the nodes.
void setNodeIdentifiers () const
 Set the node identifiers.
template<typename VertexInIter >
void setVertices (VertexInIter begin, VertexInIter end)
 Set the locations of the vertices.
Cell manipulators.

CellIterator getCellsBeginning ()
 Return the beginning of the cells.
CellIterator getCellsEnd ()
 Return the end of the cells.
void setCellIdentifiers () const
 Set the cell identifiers.
Face manipulators.

FaceIterator getFacesBeginning ()
 Return the beginning of the faces.
FaceIterator getFacesEnd ()
 Return the end of the faces.
Edge manipulators.

EdgeIterator getEdgesBeginning ()
 Return the beginning of the edges.
EdgeIterator getEdgesEnd ()
 Return the end of the edges.
Insert/erase nodes.

NodeIterator insertNode (const Node &node=Node())
 Insert the node into the mesh.
NodeIterator insertNode (const NodeIterator node)
 Insert a copy of the node into the mesh.
void eraseNode (const NodeIterator node)
 Erase a vertex.
void merge (NodeIterator x, NodeIterator y)
 Merge two nodes. Erase the second.
Insert/erase cells.

CellIterator insertCell (const Cell &c=Cell())
 Insert the cell into the mesh and set the self iterator and identifier.
CellIterator insertCell (const CellIterator c)
 Insert a copy of the cell into the mesh.
void eraseCell (const CellIterator c)
 Erase a cell.
template<typename InIter >
void eraseCells (InIter begin, InIter end)
 Erase a range of cells.

Related Functions

(Note that these are not member functions.)



template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont>
bool isOriented (const SimpMeshRed< N, M, T, Node, Cell, Cont > &mesh)
 Return true if the simplices of the mesh have consistent orientations.
template<class DistortionFunction , int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont>
BEGIN_NAMESPACE_GEOM int flip (SimpMeshRed< N, 2, T, Node, Cell, Cont > *mesh)
 Flip faces for as long as the quality of the mesh is improved.
template<class DistortionFunction , int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont>
int flip (SimpMeshRed< N, 2, T, Node, Cell, Cont > *mesh, T maxAngle)
 Flip faces for as long as the quality of the mesh is improved.
template<int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont>
int flipUsingModifiedMeanRatio (SimpMeshRed< N, 2, T, Node, Cell, Cont > *mesh)
 Flip faces using the modified mean ratio metric for as long as the quality of the mesh is improved.
template<int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont>
int flipUsingModifiedMeanRatio (SimpMeshRed< N, 2, T, Node, Cell, Cont > *mesh, const T maxAngle)
 Flip faces using the modified mean ratio metric for as long as the quality of the mesh is improved.
template<int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont>
int flipUsingModifiedConditionNumber (SimpMeshRed< N, 2, T, Node, Cell, Cont > *mesh)
 Flip faces using the modified condition number metric for as long as the quality of the mesh is improved.
template<int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont>
int flipUsingModifiedConditionNumber (SimpMeshRed< N, 2, T, Node, Cell, Cont > *mesh, const T maxAngle)
 Flip faces using the modified condition number metric for as long as the quality of the mesh is improved.
template<int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, class DistortionFunction >
bool flip (SimpMeshRed< N, 2, T, Node, Cell, Cont > *mesh, const typename SimpMeshRed< N, 2, T, Node, Cell, Cont >::Face &face, DistortionFunction &distortionFunction)
 Flip the specified face if it improves the quality of the mesh.
template<int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, class DistortionFunction >
bool flip (SimpMeshRed< N, 2, T, Node, Cell, Cont > *mesh, const typename SimpMeshRed< N, 2, T, Node, Cell, Cont >::Face &face, DistortionFunction &distortionFunction, T minCosine)
 Flip the specified face if it improves the quality of the mesh.
template<int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, class DistortionFunction >
bool shouldFlip (const SimpMeshRed< N, 2, T, Node, Cell, Cont > &mesh, const typename SimpMeshRed< N, 2, T, Node, Cell, Cont >::Face &face, DistortionFunction &distortionFunction)
 Return true if flipping the specified interior face will improve the quality of the mesh.
template<int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, class DistortionFunction >
bool shouldFlip (const SimpMeshRed< N, 2, T, Node, Cell, Cont > &mesh, const typename SimpMeshRed< N, 2, T, Node, Cell, Cont >::Face &face, DistortionFunction &distortionFunction, T minCosine)
 Return true if flipping the specified interior face will improve the quality of the mesh.
template<typename SMR >
void flip (typename SMR::CellIterator cell, int faceIndex)
 Flip the face between ch and ch->neighbor(i).
template<typename SMR >
void flip (const typename SMR::Face &face)
 Flip the specified face.
template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont>
void applyLaplacianAtNode (SimpMeshRed< N, M, T, Node, Cell, Cont > *mesh, typename SimpMeshRed< N, M, T, Node, Cell, Cont >::NodeIterator node)
 Perform Laplacian smoothing on the specified interior node.
template<int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, class NodeIterInIter >
void applyLaplacian (SimpMeshRed< N, N, T, Node, Cell, Cont > *mesh, NodeIterInIter begin, NodeIterInIter end, int numSweeps=1)
 Perform Laplacian smoothing on the specified interior nodes.
template<int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont>
void applyLaplacian (SimpMeshRed< N, N, T, Node, Cell, Cont > *mesh, int numSweeps=1)
 Perform a sweep of Laplacian smoothing on the interior nodes.
template<int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, class BoundaryCondition >
void applyLaplacian (SimpMeshRed< N, N, T, Node, Cell, Cont > *mesh, const BoundaryCondition &condition, T minAngle, int numSweeps)
 Perform a sweep of Laplacian smoothing on the boundary nodes.
template<int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, class LevelSet , class NodeIterInIter >
void applyLaplacian (SimpMeshRed< M+1, M, T, Node, Cell, Cont > *mesh, const LevelSet &levelSet, NodeIterInIter begin, NodeIterInIter end, int numSweeps=1)
 Perform a sweep of Laplacian smoothing on the specified interior nodes.
template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, class LSF , typename OutIter >
void determineNodesOutside (const SimpMeshRed< N, M, T, Node, Cell, Cont > &mesh, const LSF &f, OutIter iter)
 Get the nodes that are outside the object.
template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, class LSF , typename OutIter >
void determineNodesOutside (SimpMeshRed< N, M, T, Node, Cell, Cont > &mesh, const LSF &f, OutIter iter)
 Get the nodes that are outside the object.
template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, class LSF , typename OutIter >
void determineCellsOutside (const SimpMeshRed< N, M, T, Node, Cell, Cont > &mesh, const LSF &f, OutIter iter)
 Get the cells whose centroids are outside the object.
template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, class LSF , typename OutIter >
void determineCellsOutside (SimpMeshRed< N, M, T, Node, Cell, Cont > &mesh, const LSF &f, OutIter iter)
 Get the cells whose centroids are outside the object.
template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void getNodes (const SimpMeshRed< N, M, T, Node, Cell, Cont > &mesh, OutIter iter)
 Get the node const iterators for the all of the nodes in the mesh.
template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void getNodes (SimpMeshRed< N, M, T, Node, Cell, Cont > &mesh, OutIter iter)
 Get the node iterators for the all of the nodes in the mesh.
template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void determineInteriorNodes (const SimpMeshRed< N, M, T, Node, Cell, Cont > &mesh, OutIter iter)
 Get the node const iterators for the interior nodes.
template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void determineInteriorNodes (SimpMeshRed< N, M, T, Node, Cell, Cont > &mesh, OutIter iter)
 Get the node iterators for the interior nodes.
template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void determineBoundaryNodes (const SimpMeshRed< N, M, T, Node, Cell, Cont > &mesh, OutIter iter)
 Get the node const iterators for the boundary nodes.
template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void determineBoundaryNodes (SimpMeshRed< N, M, T, Node, Cell, Cont > &mesh, OutIter iter)
 Get the node iterators for the boundary nodes.
template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void determineCellsWithRequiredAdjacencies (const SimpMeshRed< N, M, T, Node, Cell, Cont > &mesh, const int minimumRequiredAdjacencies, OutIter iter)
 Get the cell const iterators with at least the specified number of adjacencies.
template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void determineCellsWithRequiredAdjacencies (SimpMeshRed< N, M, T, Node, Cell, Cont > &mesh, const int minimumRequiredAdjacencies, OutIter iter)
 Get the cell iterators with at least the specified number of adjacencies.
template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void determineCellsWithLowAdjacencies (const SimpMeshRed< N, M, T, Node, Cell, Cont > &mesh, const int minimumRequiredAdjacencies, OutIter iter)
 Get the cell const iterators with adjacencies less than specified.
template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void determineCellsWithLowAdjacencies (SimpMeshRed< N, M, T, Node, Cell, Cont > &mesh, const int minimumRequiredAdjacencies, OutIter iter)
 Get the cell iterators with adjacencies less than specified.
template<class SMR >
BEGIN_NAMESPACE_GEOM bool isOnBoundary (const typename SMR::ConstFace &f)
 Return true if the face is on the boundary.
template<class SMR >
bool isOnBoundary (const typename SMR::Face &f)
 Return true if the face is on the boundary.
template<class SMR >
bool isOnBoundary (const typename SMR::FaceConstIterator &f)
 Return true if the face is on the boundary.
template<class SMR >
bool isOnBoundary (const typename SMR::FaceIterator &f)
 Return true if the face is on the boundary.
template<class SMR >
bool areMirrorNodes (typename SMR::NodeConstIterator x, typename SMR::NodeConstIterator y)
 Return true if they are mirror nodes.
template<typename SMR , typename CellIteratorOutputIterator >
void determineCellsIncidentToEdge (typename SMR::CellIterator c, const int i, const int j, CellIteratorOutputIterator output)
 Determine the cells incident to the edge.
template<typename SMR , typename NodeIteratorInsertIterator >
void determineNodesInLink (typename SMR::NodeIterator node, NodeIteratorInsertIterator nodesInLink)
 Determine the nodes in the link of the specified node.

Detailed Description

template<int _N, int _M = _N, typename T = double, template< class > class _Node = SmrNode, template< class > class _Cell = SmrCell, template< class _Elem, class=std::allocator< _Elem > > class Container = std::list>
class SimpMeshRed< _N, _M, T, _Node, _Cell, Container >

A simplicial mesh data structure.

Parameters:
_N is the space dimension.
_M is the simplex dimension By default it is _N.
T is the number type. By default it is double.
_Node is the node type.
_Cell is the cell (simplex) type.
Container is the container for storing the vertices and cells.

Member Function Documentation

template<int _N, int _M = _N, typename T = double, template< class > class _Node = SmrNode, template< class > class _Cell = SmrCell, template< class _Elem, class=std::allocator< _Elem > > class Container = std::list>
template<typename VertInIter , typename SimpInIter >
void SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::build ( VertInIter  verticesBeginning,
VertInIter  verticesEnd,
SimpInIter  simplicesBeginning,
SimpInIter  simplicesEnd 
) [inline]

Build from an indexed simplex set.

The value type for the vertices must be ads::FixedArray<N,T>. The value type for the simplices must be subscriptable.

Referenced by SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::build(), SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::SimpMeshRed(), and tile().

template<int _N, int _M = _N, typename T = double, template< class > class _Node = SmrNode, template< class > class _Cell = SmrCell, template< class _Elem, class=std::allocator< _Elem > > class Container = std::list>
SizeType SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::computeCellsSize (  )  const [inline]

Return the number of cells.

Note:
This is a slow function. It counts the cells.
template<int _N, int _M = _N, typename T = double, template< class > class _Node = SmrNode, template< class > class _Cell = SmrCell, template< class _Elem, class=std::allocator< _Elem > > class Container = std::list>
SizeType SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::computeEdgesSize (  )  const [inline]

Return the number of edges.

Note:
This is a slow function. It counts the edges.

References SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getEdgesBeginning(), and SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getEdgesEnd().

template<int _N, int _M = _N, typename T = double, template< class > class _Node = SmrNode, template< class > class _Cell = SmrCell, template< class _Elem, class=std::allocator< _Elem > > class Container = std::list>
SizeType SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::computeFacesSize (  )  const [inline]

Return the number of faces.

Note:
This is a slow function. It counts the faces.

References SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getFacesBeginning(), and SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getFacesEnd().

template<int _N, int _M = _N, typename T = double, template< class > class _Node = SmrNode, template< class > class _Cell = SmrCell, template< class _Elem, class=std::allocator< _Elem > > class Container = std::list>
int SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::computeMaximumCellIdentifier (  )  const [inline]
template<int _N, int _M = _N, typename T = double, template< class > class _Node = SmrNode, template< class > class _Cell = SmrCell, template< class _Elem, class=std::allocator< _Elem > > class Container = std::list>
int SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::computeMaximumNodeIdentifier (  )  const [inline]
template<int _N, int _M = _N, typename T = double, template< class > class _Node = SmrNode, template< class > class _Cell = SmrCell, template< class _Elem, class=std::allocator< _Elem > > class Container = std::list>
SizeType SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::computeNodesSize (  )  const [inline]

Return the number of nodes.

Note:
This is a slow function. It counts the nodes.

Referenced by printQualityStatistics().

template<int _N, int _M = _N, typename T = double, template< class > class _Node = SmrNode, template< class > class _Cell = SmrCell, template< class _Elem, class=std::allocator< _Elem > > class Container = std::list>
void SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::eraseCell ( const CellIterator  c  )  [inline]

Erase a cell.

Unlink the cell and erase it from the mesh.

Referenced by SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::eraseCells().

template<int _N, int _M = _N, typename T = double, template< class > class _Node = SmrNode, template< class > class _Cell = SmrCell, template< class _Elem, class=std::allocator< _Elem > > class Container = std::list>
template<typename InIter >
void SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::eraseCells ( InIter  begin,
InIter  end 
) [inline]

Erase a range of cells.

Unlink the cells and erase them from the mesh.

InIter is an input iterator for cell iterators.

References SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::eraseCell().

template<int _N, int _M = _N, typename T = double, template< class > class _Node = SmrNode, template< class > class _Cell = SmrCell, template< class _Elem, class=std::allocator< _Elem > > class Container = std::list>
void SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::eraseNode ( const NodeIterator  node  )  [inline]

Erase a vertex.

No cell should be incident to this vertex.

Referenced by SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::merge().

template<int _N, int _M = _N, typename T = double, template< class > class _Node = SmrNode, template< class > class _Cell = SmrCell, template< class _Elem, class=std::allocator< _Elem > > class Container = std::list>
NodeIterator SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::insertNode ( const Node node = Node()  ) 

Insert the node into the mesh.

Set the self iterator and the identifier.

template<int _N, int _M = _N, typename T = double, template< class > class _Node = SmrNode, template< class > class _Cell = SmrCell, template< class _Elem, class=std::allocator< _Elem > > class Container = std::list>
void SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::merge ( NodeIterator  x,
NodeIterator  y 
) [inline]

Merge two nodes. Erase the second.

The two nodes should not have any incident cells in common.

References SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::eraseNode().

template<int _N, int _M = _N, typename T = double, template< class > class _Node = SmrNode, template< class > class _Cell = SmrCell, template< class _Elem, class=std::allocator< _Elem > > class Container = std::list>
void SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::setCellIdentifiers (  )  const

Set the cell identifiers.

Note:
This is a const member function because the cell identifier is mutable.
template<int _N, int _M = _N, typename T = double, template< class > class _Node = SmrNode, template< class > class _Cell = SmrCell, template< class _Elem, class=std::allocator< _Elem > > class Container = std::list>
void SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::setNodeIdentifiers (  )  const

Set the node identifiers.

Note:
This is a const member function because the node identifier is mutable.

Friends And Related Function Documentation

template<class SMR >
bool areMirrorNodes ( typename SMR::NodeConstIterator  x,
typename SMR::NodeConstIterator  y 
) [related]

Return true if they are mirror nodes.

They are mirror nodes if:

  • They are opposite a common face.
  • One is on the boundary and one is in the interior. There is a boundary face opposite the interior node that is not incident to the boundary node.

This function is used to determine if an edge may be collapsed. If not for the second condition, it would be possible for collapsing an edge to create a sliver on the boundary. If a tetrahedran has a face on the boundary and an edge incident to the remaining node is collapsed, that node could be moved to the boundary. This creates a tetrahedron with four nodes on the boundary. (There is an analogous case in 2-D.)

template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void determineBoundaryNodes ( SimpMeshRed< N, M, T, Node, Cell, Cont > &  mesh,
OutIter  iter 
) [related]

Get the node iterators for the boundary nodes.

Parameters:
mesh is the simplicial mesh.
iter is an output iterator for the node iterators.

This function calls the function of the same name with iterators as the initial arguments.

References SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::determineBoundaryNodes(), SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getNodesBeginning(), and SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getNodesEnd().

template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void determineBoundaryNodes ( const SimpMeshRed< N, M, T, Node, Cell, Cont > &  mesh,
OutIter  iter 
) [related]

Get the node const iterators for the boundary nodes.

Parameters:
mesh is the simplicial mesh.
iter is an output iterator for the node const iterators.

This function calls the function of the same name with const iterators as the initial arguments.

References SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getNodesBeginning(), and SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getNodesEnd().

Referenced by SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::determineBoundaryNodes().

template<typename SMR , typename CellIteratorOutputIterator >
void determineCellsIncidentToEdge ( typename SMR::CellIterator  c,
const int  i,
const int  j,
CellIteratorOutputIterator  output 
) [related]

Determine the cells incident to the edge.

Precondition:
SMR::M == 3.
Note:
SMR must be specified explicitly as a template parameter.
template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, class LSF , typename OutIter >
void determineCellsOutside ( SimpMeshRed< N, M, T, Node, Cell, Cont > &  mesh,
const LSF &  f,
OutIter  iter 
) [related]

Get the cells whose centroids are outside the object.

Parameters:
mesh is the simplicial mesh.
f is the level set function that describes the object. Points inside/outside the object have negative/positive values.
iter is an output iterator for the cell iterators.

This function calls the function of the same name with iterators as the initial arguments.

References SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::determineCellsOutside(), SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getCellsBeginning(), and SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getCellsEnd().

template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, class LSF , typename OutIter >
void determineCellsOutside ( const SimpMeshRed< N, M, T, Node, Cell, Cont > &  mesh,
const LSF &  f,
OutIter  iter 
) [related]

Get the cells whose centroids are outside the object.

Parameters:
mesh is the simplicial mesh.
f is the level set function that describes the object. Points inside/outside the object have negative/positive values.
iter is an output iterator for the cell const iterators.

This function calls the function of the same name with const iterators as the initial arguments.

References SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getCellsBeginning(), and SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getCellsEnd().

Referenced by SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::determineCellsOutside().

template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void determineCellsWithLowAdjacencies ( SimpMeshRed< N, M, T, Node, Cell, Cont > &  mesh,
const int  minimumRequiredAdjacencies,
OutIter  iter 
) [related]

Get the cell iterators with adjacencies less than specified.

Parameters:
mesh is the simplicial mesh.
minimumRequiredAdjacencies The minimum required adjacencies.
iter is an output iterator for the cell iterators.

This function calls the function of the same name with iterators as the initial arguments.

References SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::determineCellsWithLowAdjacencies(), SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getCellsBeginning(), and SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getCellsEnd().

template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void determineCellsWithLowAdjacencies ( const SimpMeshRed< N, M, T, Node, Cell, Cont > &  mesh,
const int  minimumRequiredAdjacencies,
OutIter  iter 
) [related]

Get the cell const iterators with adjacencies less than specified.

Parameters:
mesh is the simplicial mesh.
minimumRequiredAdjacencies The minimum required adjacencies.
iter is an output iterator for the cell const iterators.

This function calls the function of the same name with const iterators as the initial arguments.

References SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getCellsBeginning(), and SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getCellsEnd().

Referenced by SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::determineCellsWithLowAdjacencies().

template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void determineCellsWithRequiredAdjacencies ( SimpMeshRed< N, M, T, Node, Cell, Cont > &  mesh,
const int  minimumRequiredAdjacencies,
OutIter  iter 
) [related]

Get the cell iterators with at least the specified number of adjacencies.

Parameters:
mesh is the simplicial mesh.
minimumRequiredAdjacencies This function gets the cells that have at least as many adjacencies as minimumRequiredAdjacencies.
iter is an output iterator for the cell iterators.

This function calls the function of the same name with iterators as the initial arguments.

References SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::determineCellsWithRequiredAdjacencies(), SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getCellsBeginning(), and SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getCellsEnd().

template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void determineCellsWithRequiredAdjacencies ( const SimpMeshRed< N, M, T, Node, Cell, Cont > &  mesh,
const int  minimumRequiredAdjacencies,
OutIter  iter 
) [related]

Get the cell const iterators with at least the specified number of adjacencies.

Parameters:
mesh is the simplicial mesh.
minimumRequiredAdjacencies The minimum required adjacencies.
iter is an output iterator for the cell const iterators.

This function calls the function of the same name with const iterators as the initial arguments.

References SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getCellsBeginning(), and SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getCellsEnd().

Referenced by SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::determineCellsWithRequiredAdjacencies().

template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void determineInteriorNodes ( SimpMeshRed< N, M, T, Node, Cell, Cont > &  mesh,
OutIter  iter 
) [related]

Get the node iterators for the interior nodes.

Parameters:
mesh is the simplicial mesh.
iter is an output iterator for the node iterators.

This function calls the function of the same name with iterators as the initial arguments.

References SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::determineInteriorNodes(), SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getNodesBeginning(), and SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getNodesEnd().

template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void determineInteriorNodes ( const SimpMeshRed< N, M, T, Node, Cell, Cont > &  mesh,
OutIter  iter 
) [related]

Get the node const iterators for the interior nodes.

Parameters:
mesh is the simplicial mesh.
iter is an output iterator for the node const iterators.

This function calls the function of the same name with const iterators as the initial arguments.

References SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getNodesBeginning(), and SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getNodesEnd().

Referenced by SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::determineInteriorNodes().

template<typename SMR , typename NodeIteratorInsertIterator >
void determineNodesInLink ( typename SMR::NodeIterator  node,
NodeIteratorInsertIterator  nodesInLink 
) [related]

Determine the nodes in the link of the specified node.

Note:
SMR must be specified explicitly as a template parameter.
template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, class LSF , typename OutIter >
void determineNodesOutside ( SimpMeshRed< N, M, T, Node, Cell, Cont > &  mesh,
const LSF &  f,
OutIter  iter 
) [related]

Get the nodes that are outside the object.

Parameters:
mesh is the simplicial mesh.
f is the level set function that describes the object. Points inside/outside the object have negative/positive values.
iter is an output iterator for the node iterators.

This function calls the function of the same name with iterators as the initial arguments.

References SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::determineNodesOutside(), SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getNodesBeginning(), and SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getNodesEnd().

template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, class LSF , typename OutIter >
void determineNodesOutside ( const SimpMeshRed< N, M, T, Node, Cell, Cont > &  mesh,
const LSF &  f,
OutIter  iter 
) [related]

Get the nodes that are outside the object.

Parameters:
mesh is the simplicial mesh.
f is the level set function that describes the object. Points inside/outside the object have negative/positive values.
iter is an output iterator for the node const iterators.

This function calls the function of the same name with const iterators as the initial arguments.

References SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getNodesBeginning(), and SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getNodesEnd().

Referenced by SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::determineNodesOutside().

template<typename SMR >
void flip ( const typename SMR::Face &  face  )  [related]

Flip the specified face.

This function just calls flip(CellIterator, int).

template<typename SMR >
void flip ( typename SMR::CellIterator  cell,
int  faceIndex 
) [related]

Flip the face between ch and ch->neighbor(i).

SimpMeshRed_2_flip.jpg

Flipping an edge between two triangle cells.

template<int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, class DistortionFunction >
bool flip ( SimpMeshRed< N, 2, T, Node, Cell, Cont > *  mesh,
const typename SimpMeshRed< N, 2, T, Node, Cell, Cont >::Face face,
DistortionFunction &  distortionFunction,
minCosine 
) [related]

Flip the specified face if it improves the quality of the mesh.

Boundary faces will not be flipped.

Returns:
true if the face is flipped.
template<int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, class DistortionFunction >
bool flip ( SimpMeshRed< N, 2, T, Node, Cell, Cont > *  mesh,
const typename SimpMeshRed< N, 2, T, Node, Cell, Cont >::Face face,
DistortionFunction &  distortionFunction 
) [related]

Flip the specified face if it improves the quality of the mesh.

Boundary faces will not be flipped.

Returns:
true if the face is flipped.
template<class DistortionFunction , int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont>
int flip ( SimpMeshRed< N, 2, T, Node, Cell, Cont > *  mesh,
maxAngle 
) [related]

Flip faces for as long as the quality of the mesh is improved.

Boundary faces will not be flipped. The edge will only be flipped if the angle between the incident face normals is no greater than maxAngle.

Returns:
the number of faces flipped.
template<class DistortionFunction , int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont>
BEGIN_NAMESPACE_GEOM int flip ( SimpMeshRed< N, 2, T, Node, Cell, Cont > *  mesh  )  [related]

Flip faces for as long as the quality of the mesh is improved.

Boundary faces will not be flipped.

Returns:
the number of faces flipped.
template<int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont>
int flipUsingModifiedConditionNumber ( SimpMeshRed< N, 2, T, Node, Cell, Cont > *  mesh,
const T  maxAngle 
) [related]

Flip faces using the modified condition number metric for as long as the quality of the mesh is improved.

Boundary faces will not be flipped.

Returns:
the number of faces flipped.
template<int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont>
int flipUsingModifiedConditionNumber ( SimpMeshRed< N, 2, T, Node, Cell, Cont > *  mesh  )  [related]

Flip faces using the modified condition number metric for as long as the quality of the mesh is improved.

Boundary faces will not be flipped.

Returns:
the number of faces flipped.
template<int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont>
int flipUsingModifiedMeanRatio ( SimpMeshRed< N, 2, T, Node, Cell, Cont > *  mesh,
const T  maxAngle 
) [related]

Flip faces using the modified mean ratio metric for as long as the quality of the mesh is improved.

Boundary faces will not be flipped.

Returns:
the number of faces flipped.
template<int N, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont>
int flipUsingModifiedMeanRatio ( SimpMeshRed< N, 2, T, Node, Cell, Cont > *  mesh  )  [related]

Flip faces using the modified mean ratio metric for as long as the quality of the mesh is improved.

Boundary faces will not be flipped.

Returns:
the number of faces flipped.
template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void getNodes ( SimpMeshRed< N, M, T, Node, Cell, Cont > &  mesh,
OutIter  iter 
) [related]

Get the node iterators for the all of the nodes in the mesh.

Parameters:
mesh is the simplicial mesh.
iter is an output iterator for the node iterators.

This function calls the function of the same name with iterators as the initial arguments.

References SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getNodes(), SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getNodesBeginning(), and SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getNodesEnd().

template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont, typename OutIter >
void getNodes ( const SimpMeshRed< N, M, T, Node, Cell, Cont > &  mesh,
OutIter  iter 
) [related]

Get the node const iterators for the all of the nodes in the mesh.

Parameters:
mesh is the simplicial mesh.
iter is an output iterator for the node const iterators.

This function calls the function of the same name with const iterators as the initial arguments.

References SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getNodesBeginning(), and SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getNodesEnd().

Referenced by SimpMeshRed< _N, _M, T, _Node, _Cell, Container >::getNodes().

template<int N, int M, typename T , template< class > class Node, template< class > class Cell, template< class, class > class Cont>
bool isOriented ( const SimpMeshRed< N, M, T, Node, Cell, Cont > &  mesh  )  [related]

Return true if the simplices of the mesh have consistent orientations.


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