Wildmeshing Toolkit
Loading...
Searching...
No Matches
HalfClosedStarIterable.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <wmtk/Mesh.hpp>
7
9
10namespace wmtk::simplex {
11
22{
23public:
25
27 {
28 public:
29 Iterator(HalfClosedStarIterable& container, const Tuple& t = Tuple());
31 bool operator!=(const Iterator& other) const;
33 const IdSimplex operator*() const;
34
35 private:
38
39 bool step_faces();
40
41 private:
43 const Mesh& m_mesh;
44
47 int8_t m_pt = -1;
48 int8_t m_face_counter = 0;
50 };
51
52public:
53 HalfClosedStarIterable(const Mesh& mesh, const Tuple& tuple);
54
55 Iterator begin() { return Iterator(*this, m_tuple); }
56 Iterator end() { return Iterator(*this); }
57
58private:
59 const Mesh& m_mesh;
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
The Tuple is the basic navigation tool in our mesh data structure.
Definition Tuple.hpp:19
This iterator internally uses TopDimensionCofacesIterable.
std::array< simplex::internal::VisitedArray< simplex::IdSimplex >, 2 > m_visited_cofaces
TopDimensionCofacesIterable::Iterator m_it_end
std::array< simplex::internal::VisitedArray< simplex::IdSimplex >, 2 > m_visited_link
Iterating through the d-simplices of a mesh can be done in different ways, depending on the simplex d...