Wildmeshing Toolkit
Loading...
Searching...
No Matches
HalfClosedStarIterable.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
wmtk/Mesh.hpp
>
4
#include <
wmtk/simplex/IdSimplex.hpp
>
5
#include <
wmtk/simplex/Simplex.hpp
>
6
#include <
wmtk/simplex/internal/VisitedArray.hpp
>
7
8
#include "
TopDimensionCofacesIterable.hpp
"
9
10
namespace
wmtk::simplex
{
11
21
class
HalfClosedStarIterable
22
{
23
public
:
24
enum
IteratorPhase
{
Faces
,
OpenStar
,
Link
};
25
26
class
Iterator
27
{
28
public
:
29
Iterator
(
HalfClosedStarIterable
& container,
const
Tuple
& t =
Tuple
());
30
Iterator
&
operator++
();
31
bool
operator!=
(
const
Iterator
& other)
const
;
32
IdSimplex
operator*
();
33
const
IdSimplex
operator*
()
const
;
34
35
private
:
36
Iterator
&
step_tri_mesh
();
37
Iterator
&
step_tet_mesh
();
38
39
bool
step_faces
();
40
41
private
:
42
HalfClosedStarIterable
&
m_container
;
43
const
Mesh
&
m_mesh
;
44
45
TopDimensionCofacesIterable::Iterator
m_it
;
46
Tuple
m_t
;
47
int8_t
m_pt
= -1;
48
int8_t
m_face_counter
= 0;
49
IteratorPhase
m_phase
=
IteratorPhase::Faces
;
50
};
51
52
public
:
53
HalfClosedStarIterable
(
const
Mesh
& mesh,
const
Tuple
& tuple);
54
55
Iterator
begin
() {
return
Iterator
(*
this
,
m_tuple
); }
56
Iterator
end
() {
return
Iterator
(*
this
); }
57
58
private
:
59
const
Mesh
&
m_mesh
;
60
const
Tuple
m_tuple
;
61
TopDimensionCofacesIterable
m_tdc_itrbl
;
62
TopDimensionCofacesIterable::Iterator
m_it_end
;
63
64
std::array<simplex::internal::VisitedArray<simplex::IdSimplex>, 2>
65
m_visited_cofaces
;
// for depth 3 iteration
66
std::array<simplex::internal::VisitedArray<simplex::IdSimplex>, 2>
67
m_visited_link
;
// for depth 3 iteration
68
};
69
70
}
// namespace wmtk::simplex
IdSimplex.hpp
Mesh.hpp
Simplex.hpp
TopDimensionCofacesIterable.hpp
VisitedArray.hpp
wmtk::Mesh
Definition
Mesh.hpp:95
wmtk::Tuple
The Tuple is the basic navigation tool in our mesh data structure.
Definition
Tuple.hpp:19
wmtk::simplex::HalfClosedStarIterable::Iterator
Definition
HalfClosedStarIterable.hpp:27
wmtk::simplex::HalfClosedStarIterable::Iterator::step_tri_mesh
Iterator & step_tri_mesh()
Definition
HalfClosedStarIterable.cpp:79
wmtk::simplex::HalfClosedStarIterable::Iterator::m_container
HalfClosedStarIterable & m_container
Definition
HalfClosedStarIterable.hpp:42
wmtk::simplex::HalfClosedStarIterable::Iterator::operator*
IdSimplex operator*()
Definition
HalfClosedStarIterable.cpp:69
wmtk::simplex::HalfClosedStarIterable::Iterator::m_pt
int8_t m_pt
Definition
HalfClosedStarIterable.hpp:47
wmtk::simplex::HalfClosedStarIterable::Iterator::m_it
TopDimensionCofacesIterable::Iterator m_it
Definition
HalfClosedStarIterable.hpp:45
wmtk::simplex::HalfClosedStarIterable::Iterator::m_phase
IteratorPhase m_phase
Definition
HalfClosedStarIterable.hpp:49
wmtk::simplex::HalfClosedStarIterable::Iterator::step_faces
bool step_faces()
Definition
HalfClosedStarIterable.cpp:148
wmtk::simplex::HalfClosedStarIterable::Iterator::m_face_counter
int8_t m_face_counter
Definition
HalfClosedStarIterable.hpp:48
wmtk::simplex::HalfClosedStarIterable::Iterator::m_mesh
const Mesh & m_mesh
Definition
HalfClosedStarIterable.hpp:43
wmtk::simplex::HalfClosedStarIterable::Iterator::operator++
Iterator & operator++()
Definition
HalfClosedStarIterable.cpp:32
wmtk::simplex::HalfClosedStarIterable::Iterator::step_tet_mesh
Iterator & step_tet_mesh()
Definition
HalfClosedStarIterable.cpp:107
wmtk::simplex::HalfClosedStarIterable::Iterator::operator!=
bool operator!=(const Iterator &other) const
Definition
HalfClosedStarIterable.cpp:64
wmtk::simplex::HalfClosedStarIterable::Iterator::m_t
Tuple m_t
Definition
HalfClosedStarIterable.hpp:46
wmtk::simplex::HalfClosedStarIterable
This iterator internally uses TopDimensionCofacesIterable.
Definition
HalfClosedStarIterable.hpp:22
wmtk::simplex::HalfClosedStarIterable::end
Iterator end()
Definition
HalfClosedStarIterable.hpp:56
wmtk::simplex::HalfClosedStarIterable::m_visited_cofaces
std::array< simplex::internal::VisitedArray< simplex::IdSimplex >, 2 > m_visited_cofaces
Definition
HalfClosedStarIterable.hpp:65
wmtk::simplex::HalfClosedStarIterable::m_mesh
const Mesh & m_mesh
Definition
HalfClosedStarIterable.hpp:59
wmtk::simplex::HalfClosedStarIterable::m_tdc_itrbl
TopDimensionCofacesIterable m_tdc_itrbl
Definition
HalfClosedStarIterable.hpp:61
wmtk::simplex::HalfClosedStarIterable::IteratorPhase
IteratorPhase
Definition
HalfClosedStarIterable.hpp:24
wmtk::simplex::HalfClosedStarIterable::OpenStar
@ OpenStar
Definition
HalfClosedStarIterable.hpp:24
wmtk::simplex::HalfClosedStarIterable::Faces
@ Faces
Definition
HalfClosedStarIterable.hpp:24
wmtk::simplex::HalfClosedStarIterable::Link
@ Link
Definition
HalfClosedStarIterable.hpp:24
wmtk::simplex::HalfClosedStarIterable::begin
Iterator begin()
Definition
HalfClosedStarIterable.hpp:55
wmtk::simplex::HalfClosedStarIterable::m_it_end
TopDimensionCofacesIterable::Iterator m_it_end
Definition
HalfClosedStarIterable.hpp:62
wmtk::simplex::HalfClosedStarIterable::m_tuple
const Tuple m_tuple
Definition
HalfClosedStarIterable.hpp:60
wmtk::simplex::HalfClosedStarIterable::m_visited_link
std::array< simplex::internal::VisitedArray< simplex::IdSimplex >, 2 > m_visited_link
Definition
HalfClosedStarIterable.hpp:67
wmtk::simplex::IdSimplex
Definition
IdSimplex.hpp:15
wmtk::simplex::TopDimensionCofacesIterable::Iterator
Definition
TopDimensionCofacesIterable.hpp:46
wmtk::simplex::TopDimensionCofacesIterable
Iterating through the d-simplices of a mesh can be done in different ways, depending on the simplex d...
Definition
TopDimensionCofacesIterable.hpp:38
wmtk::simplex
Definition
Cell.hpp:7
src
wmtk
simplex
iterable
HalfClosedStarIterable.hpp
Generated by
1.9.8