Wildmeshing Toolkit
wmtk::simplex::TopDimensionCofacesIterable::Iterator Class Reference

#include <TopDimensionCofacesIterable.hpp>

Collaboration diagram for wmtk::simplex::TopDimensionCofacesIterable::Iterator:
[legend]

Public Member Functions

 Iterator (TopDimensionCofacesIterable &container, const Tuple &t=Tuple())
 
Iteratoroperator++ ()
 
bool operator!= (const Iterator &other) const
 
Tupleoperator* ()
 
const Tupleoperator* () const
 
bool is_intermediate () const
 

Private Member Functions

PrimitiveType pt (int64_t depth) const
 Get the d - depth primitive type. More...
 
int64_t depth ()
 Compute the depth from the mesh and the simplex type. More...
 
void init (int64_t depth)
 Depending on the depth, the iterator must be initialized differently. More...
 
Iteratorstep_depth_0 ()
 Just return the simplex and stop. More...
 
Iteratorstep_depth_1 ()
 There are at max two d-simplices. More...
 
Iteratorstep_depth_2 ()
 Iterate around simplex to find all d-simplices. More...
 
Iteratorstep_depth_3 ()
 Use breadth first search to find all d-simplices. More...
 
void add_neighbors_to_queue ()
 

Private Attributes

TopDimensionCofacesIterablem_container
 
Tuple m_t
 
IteratorPhase m_phase = IteratorPhase::Forward
 
bool m_is_intermediate = false
 

Detailed Description

Definition at line 45 of file TopDimensionCofacesIterable.hpp.

Constructor & Destructor Documentation

◆ Iterator()

wmtk::simplex::TopDimensionCofacesIterable::Iterator::Iterator ( TopDimensionCofacesIterable container,
const Tuple t = Tuple() 
)

Definition at line 20 of file TopDimensionCofacesIterable.cpp.

References depth(), init(), wmtk::Tuple::is_null(), and m_t.

Here is the call graph for this function:

Member Function Documentation

◆ add_neighbors_to_queue()

void wmtk::simplex::TopDimensionCofacesIterable::Iterator::add_neighbors_to_queue ( )
private

Definition at line 185 of file TopDimensionCofacesIterable.cpp.

References wmtk::Edge, wmtk::utils::TupleInspector::global_cid(), wmtk::Mesh::is_boundary(), wmtk::simplex::Simplex::primitive_type(), wmtk::Mesh::switch_tuple(), wmtk::Mesh::switch_tuples(), wmtk::Tetrahedron, wmtk::Mesh::top_simplex_type(), wmtk::Triangle, and wmtk::Vertex.

Here is the call graph for this function:

◆ depth()

int64_t wmtk::simplex::TopDimensionCofacesIterable::Iterator::depth ( )
private

Compute the depth from the mesh and the simplex type.

The depth is "mesh top simplex dimension" - "simplex dimension".

Definition at line 69 of file TopDimensionCofacesIterable.cpp.

References wmtk::get_primitive_type_id(), wmtk::simplex::Simplex::primitive_type(), and wmtk::Mesh::top_cell_dimension().

Referenced by Iterator().

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

◆ init()

void wmtk::simplex::TopDimensionCofacesIterable::Iterator::init ( int64_t  depth)
private

Depending on the depth, the iterator must be initialized differently.

Definition at line 79 of file TopDimensionCofacesIterable.cpp.

References wmtk::utils::TupleInspector::global_cid(), and wmtk::Mesh::is_boundary().

Referenced by Iterator().

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

◆ is_intermediate()

bool wmtk::simplex::TopDimensionCofacesIterable::Iterator::is_intermediate ( ) const

Definition at line 207 of file TopDimensionCofacesIterable.cpp.

◆ operator!=()

bool wmtk::simplex::TopDimensionCofacesIterable::Iterator::operator!= ( const Iterator other) const

Definition at line 49 of file TopDimensionCofacesIterable.cpp.

References m_t.

◆ operator*() [1/2]

Tuple & wmtk::simplex::TopDimensionCofacesIterable::Iterator::operator* ( )

Definition at line 54 of file TopDimensionCofacesIterable.cpp.

◆ operator*() [2/2]

const Tuple & wmtk::simplex::TopDimensionCofacesIterable::Iterator::operator* ( ) const

Definition at line 59 of file TopDimensionCofacesIterable.cpp.

◆ operator++()

TopDimensionCofacesIterable::Iterator & wmtk::simplex::TopDimensionCofacesIterable::Iterator::operator++ ( )

Definition at line 34 of file TopDimensionCofacesIterable.cpp.

◆ pt()

PrimitiveType wmtk::simplex::TopDimensionCofacesIterable::Iterator::pt ( int64_t  depth) const
private

Get the d - depth primitive type.

Example: for a TriMesh the d-1 simplex is an edge, and the d-2 simplex a vertex.

Definition at line 64 of file TopDimensionCofacesIterable.cpp.

References wmtk::get_primitive_type_from_id().

Here is the call graph for this function:

◆ step_depth_0()

TopDimensionCofacesIterable::Iterator & wmtk::simplex::TopDimensionCofacesIterable::Iterator::step_depth_0 ( )
private

Just return the simplex and stop.

Example: triangle in a TriMesh.

Definition at line 100 of file TopDimensionCofacesIterable.cpp.

◆ step_depth_1()

TopDimensionCofacesIterable::Iterator & wmtk::simplex::TopDimensionCofacesIterable::Iterator::step_depth_1 ( )
private

There are at max two d-simplices.

Example: edge in a TriMesh. Example: triangle in a TetMesh.

Definition at line 106 of file TopDimensionCofacesIterable.cpp.

References wmtk::Mesh::is_boundary(), and wmtk::Mesh::switch_tuple().

Here is the call graph for this function:

◆ step_depth_2()

TopDimensionCofacesIterable::Iterator & wmtk::simplex::TopDimensionCofacesIterable::Iterator::step_depth_2 ( )
private

Iterate around simplex to find all d-simplices.

Example: vertex in a TriMesh. Example: edge in a TetMesh.

Definition at line 121 of file TopDimensionCofacesIterable.cpp.

References wmtk::Mesh::is_boundary(), wmtk::Mesh::switch_tuple(), wmtk::Mesh::switch_tuples(), and wmtk::simplex::Simplex::tuple().

Here is the call graph for this function:

◆ step_depth_3()

TopDimensionCofacesIterable::Iterator & wmtk::simplex::TopDimensionCofacesIterable::Iterator::step_depth_3 ( )
private

Use breadth first search to find all d-simplices.

Example: vertex in a TetMesh.

Definition at line 166 of file TopDimensionCofacesIterable.cpp.

Member Data Documentation

◆ m_container

TopDimensionCofacesIterable& wmtk::simplex::TopDimensionCofacesIterable::Iterator::m_container
private

Definition at line 105 of file TopDimensionCofacesIterable.hpp.

◆ m_is_intermediate

bool wmtk::simplex::TopDimensionCofacesIterable::Iterator::m_is_intermediate = false
private

Definition at line 109 of file TopDimensionCofacesIterable.hpp.

◆ m_phase

IteratorPhase wmtk::simplex::TopDimensionCofacesIterable::Iterator::m_phase = IteratorPhase::Forward
private

Definition at line 108 of file TopDimensionCofacesIterable.hpp.

◆ m_t

Tuple wmtk::simplex::TopDimensionCofacesIterable::Iterator::m_t
private

Definition at line 107 of file TopDimensionCofacesIterable.hpp.

Referenced by Iterator(), and operator!=().


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