Wildmeshing Toolkit
Loading...
Searching...
No Matches
OpenStarIterable.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <wmtk/Mesh.hpp>
7
9
10namespace wmtk::simplex {
11
17{
18public:
20 {
21 public:
22 Iterator(OpenStarIterable& container, const Tuple& t = Tuple());
24 bool operator!=(const Iterator& other) const;
26 const IdSimplex operator*() const;
27
28 private:
34 int64_t depth();
35
39 void init();
40
46
47 private:
51 int8_t m_pt = -1;
52 int8_t m_edge_counter = 0;
53 };
54
55public:
56 OpenStarIterable(const Mesh& mesh, const Simplex& simplex);
57
58 Iterator begin() { return Iterator(*this, m_simplex.tuple()); }
59 Iterator end() { return Iterator(*this); }
60
61private:
62 const Mesh& m_mesh;
66
67 std::array<simplex::internal::VisitedArray<simplex::IdSimplex>, 2>
68 m_visited_cofaces; // for depth 3 iteration
69};
70
71} // namespace wmtk::simplex
The Tuple is the basic navigation tool in our mesh data structure.
Definition Tuple.hpp:19
TopDimensionCofacesIterable::Iterator m_it
void init()
Depending on the depth, the iterator must be initialized differently.
bool operator!=(const Iterator &other) const
int64_t depth()
Compute the depth from the mesh and the simplex type.
Iterator & step_depth_3()
Use breadth first search to find all d-simplices, and iterate through all cofaces in a d-simplex.
This iterator internally uses TopDimensionCofacesIterable.
TopDimensionCofacesIterable m_tdc_itrbl
TopDimensionCofacesIterable::Iterator m_it_end
std::array< simplex::internal::VisitedArray< simplex::IdSimplex >, 2 > m_visited_cofaces
const Tuple & tuple() const
Definition Simplex.hpp:53
Iterating through the d-simplices of a mesh can be done in different ways, depending on the simplex d...