Wildmeshing Toolkit
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
wmtk::TetMesh::Tuple Class Reference

a Tuple refers to a global vid and a global tet id, and a local edge id and local face id More...

#include <TetMesh.h>

Public Member Functions

bool is_valid (const TetMesh &m) const
 
bool is_boundary_edge (const TetMesh &m) const
 
bool is_boundary_face (const TetMesh &m) const
 
void print_info () const
 prints the tuple
 
void print_info (const TetMesh &m) const
 prints additional information
 
size_t vid (const TetMesh &m) const
 
size_t eid (const TetMesh &m) const
 
size_t fid (const TetMesh &m) const
 
size_t tid (const TetMesh &m) const
 
Tuple switch_vertex (const TetMesh &m) const
 
Tuple switch_edge (const TetMesh &m) const
 
Tuple switch_face (const TetMesh &m) const
 
std::optional< Tupleswitch_tetrahedron (const TetMesh &m) const
 
std::optional< Tupleswitch_tetrahedron_slow (const TetMesh &m) const
 
void check_validity (const TetMesh &m) const
 check Tuple validity and connectivity validity
 

Public Attributes

friend TetMesh
 

Private Member Functions

 Tuple (const TetMesh &m, size_t vid, size_t local_eid, size_t local_fid, size_t tid)
 

Private Attributes

size_t m_global_vid = std::numeric_limits<size_t>::max()
 
size_t m_local_eid = std::numeric_limits<size_t>::max()
 
size_t m_local_fid = std::numeric_limits<size_t>::max()
 
size_t m_global_tid = std::numeric_limits<size_t>::max()
 
int m_hash = 0
 

Friends

bool operator== (const Tuple &a, const Tuple &t)
 
bool operator< (const Tuple &a, const Tuple &t)
 

Detailed Description

a Tuple refers to a global vid and a global tet id, and a local edge id and local face id

Constructor & Destructor Documentation

◆ Tuple()

TetMesh::Tuple::Tuple ( const TetMesh m,
size_t  vid,
size_t  local_eid,
size_t  local_fid,
size_t  tid 
)
private

Construct a new Tuple object with global vertex/tetra index and local edge/face index

Parameters
vidvertex id (global)
eidedge id (local)
fidface id (local)
tidtetra id (global)
tshash associated with tid

Member Function Documentation

◆ eid()

size_t TetMesh::Tuple::eid ( const TetMesh m) const

returns a global unique edge id

Parameters
mTetMesh where the tuple belongs.
Returns
size_t
Note
The global id may not be consecutive. The edges are undirected and different tetra share the same edge.

◆ fid()

size_t TetMesh::Tuple::fid ( const TetMesh m) const

returns a global unique face id

Parameters
mTetMesh where the tuple belongs.
Returns
size_t
Note
The global id may not be consecutive. The face are undirected.

◆ is_boundary_edge()

bool TetMesh::Tuple::is_boundary_edge ( const TetMesh m) const

Check if the current tuple the refers to an edge is on the boundary

Parameters
mTetMesh where the tuple belongs.
Returns
if the edge is at the mesh boundary

◆ is_boundary_face()

bool TetMesh::Tuple::is_boundary_face ( const TetMesh m) const

Check if the current tuple the refers to a face is on the boundary

Parameters
mTetMesh where the tuple belongs.
Returns
if the edge is at the mesh boundary

◆ is_valid()

bool TetMesh::Tuple::is_valid ( const TetMesh m) const

Check if the current tuple is already invalid (removed during editing).

Parameters
mTetMesh where the tuple belongs.
Returns
if not removed and the tuple is up to date with respect to the connectivity. And the tet id can't be -1

◆ print_info()

void TetMesh::Tuple::print_info ( const TetMesh m) const

prints additional information

Parameters
mmesh

◆ switch_edge()

TetMesh::Tuple TetMesh::Tuple::switch_edge ( const TetMesh m) const

Switch operation.

Parameters
mthe mesh the Tuple is in
Returns
another Tuple that share the same tetra, face, vertex, but different edge.

◆ switch_face()

TetMesh::Tuple TetMesh::Tuple::switch_face ( const TetMesh m) const

Switch operation.

Parameters
mthe mesh the Tuple is in
Returns
another Tuple that share the same tetra, edge, vertex, but different edge.

◆ switch_tetrahedron()

std::optional< TetMesh::Tuple > TetMesh::Tuple::switch_tetrahedron ( const TetMesh m) const

Switch operation for the adjacent tetra.

Parameters
mMesh
Returns
Tuple for the face-adjacent tetra, sharing same face, edge, and vertex.
nullopt if the Tuple is the switch goes off the boundary.

◆ switch_vertex()

TetMesh::Tuple TetMesh::Tuple::switch_vertex ( const TetMesh m) const

Switch operation.

Parameters
mthe mesh the Tuple is in
Returns
another Tuple that share the same tetra, face, edge, but different vertex.

◆ tid()

size_t TetMesh::Tuple::tid ( const TetMesh m) const

returns global tetra id.

Parameters
mTetMesh where the tuple belongs.
Returns
size_t

◆ vid()

size_t TetMesh::Tuple::vid ( const TetMesh m) const

returns global vertex id.

Parameters
mTetMesh where the tuple belongs.
Returns
size_t

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