Wildmeshing Toolkit
Loading...
Searching...
No Matches
wmtk::Tuple Class Reference

The Tuple is the basic navigation tool in our mesh data structure. More...

#include <Tuple.hpp>

Public Member Functions

 Tuple (int8_t local_vid, int8_t local_eid, int8_t local_fid, int64_t global_cid)
 
 Tuple ()=default
 
 Tuple (const Tuple &other)=default
 
 Tuple (Tuple &&other)=default
 
Tupleoperator= (const Tuple &other)=default
 
Tupleoperator= (Tuple &&other)=default
 
bool operator== (const Tuple &t) const
 
bool operator!= (const Tuple &t) const
 
bool operator< (const Tuple &t) const
 
bool same_ids (const Tuple &t) const
 Checks whether two tuples are equal, but ignores the hash.
 
bool is_null () const
 Checks if a tuple is "null". This merely implies the global index is -1.
 
int64_t global_cid () const
 
int8_t local_vid () const
 
int8_t local_eid () const
 
int8_t local_fid () const
 
int8_t local_id (const PrimitiveType pt) const
 
std::string as_string () const
 
 operator std::string () const
 

Private Attributes

int64_t m_global_cid = -1
 
int8_t m_local_vid = -1
 
int8_t m_local_eid = -1
 
int8_t m_local_fid = -1
 

Friends

std::ostream & operator<< (std::ostream &os, const Tuple &t)
 

Detailed Description

The Tuple is the basic navigation tool in our mesh data structure.

It consists of the global cell ID, and of local IDs for any other PrimitiveType. We highest simplex dimension we can represent is 3, i.e., tetrahedra. The cell id always represents the top simplex type. So, for a TriMesh, the cell ID is the triangle ID, and the local face ID will remain empty (-1).

Definition at line 18 of file Tuple.hpp.

Constructor & Destructor Documentation

◆ Tuple() [1/4]

wmtk::Tuple::Tuple ( int8_t  local_vid,
int8_t  local_eid,
int8_t  local_fid,
int64_t  global_cid 
)
inline

Definition at line 13 of file Tuple.hxx.

◆ Tuple() [2/4]

wmtk::Tuple::Tuple ( )
default

◆ Tuple() [3/4]

wmtk::Tuple::Tuple ( const Tuple other)
default

◆ Tuple() [4/4]

wmtk::Tuple::Tuple ( Tuple &&  other)
default

Member Function Documentation

◆ as_string()

std::string wmtk::Tuple::as_string ( ) const

Definition at line 7 of file Tuple.cpp.

References global_cid(), local_eid(), local_fid(), and local_vid().

Referenced by wmtk::multimesh::utils::MapValidator::check_child_switch_homomorphism().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ global_cid()

◆ is_null()

◆ local_eid()

◆ local_fid()

◆ local_id()

int8_t wmtk::Tuple::local_id ( const PrimitiveType  pt) const
inline

Definition at line 67 of file Tuple.hxx.

References wmtk::Edge, local_eid(), local_fid(), local_vid(), wmtk::Tetrahedron, wmtk::Triangle, and wmtk::Vertex.

Here is the call graph for this function:

◆ local_vid()

◆ operator std::string()

wmtk::Tuple::operator std::string ( ) const
explicit

Definition at line 17 of file Tuple.cpp.

◆ operator!=()

bool wmtk::Tuple::operator!= ( const Tuple t) const
inline

Definition at line 20 of file Tuple.hxx.

◆ operator<()

bool wmtk::Tuple::operator< ( const Tuple t) const
inline

Definition at line 30 of file Tuple.hxx.

References m_global_cid, m_local_eid, m_local_fid, and m_local_vid.

◆ operator=() [1/2]

Tuple & wmtk::Tuple::operator= ( const Tuple other)
default

◆ operator=() [2/2]

Tuple & wmtk::Tuple::operator= ( Tuple &&  other)
default

◆ operator==()

bool wmtk::Tuple::operator== ( const Tuple t) const
inline

Definition at line 24 of file Tuple.hxx.

References m_global_cid, m_local_eid, m_local_fid, and m_local_vid.

◆ same_ids()

bool wmtk::Tuple::same_ids ( const Tuple t) const
inline

Checks whether two tuples are equal, but ignores the hash.

Definition at line 35 of file Tuple.hxx.

References m_global_cid, m_local_eid, m_local_fid, and m_local_vid.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const Tuple t 
)
friend

Definition at line 22 of file Tuple.cpp.

Member Data Documentation

◆ m_global_cid

int64_t wmtk::Tuple::m_global_cid = -1
private

Definition at line 23 of file Tuple.hpp.

Referenced by global_cid(), is_null(), operator<(), operator==(), and same_ids().

◆ m_local_eid

int8_t wmtk::Tuple::m_local_eid = -1
private

Definition at line 25 of file Tuple.hpp.

Referenced by local_eid(), operator<(), operator==(), and same_ids().

◆ m_local_fid

int8_t wmtk::Tuple::m_local_fid = -1
private

Definition at line 26 of file Tuple.hpp.

Referenced by local_fid(), operator<(), operator==(), and same_ids().

◆ m_local_vid

int8_t wmtk::Tuple::m_local_vid = -1
private

Definition at line 24 of file Tuple.hpp.

Referenced by local_vid(), operator<(), operator==(), and same_ids().


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