Wildmeshing Toolkit
Loading...
Searching...
No Matches
LinkIterable.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <wmtk/Mesh.hpp>
7
9
10namespace wmtk::simplex {
11
20{
21public:
23 {
24 public:
25 Iterator(LinkIterable& container, const Tuple& t = Tuple());
27 bool operator!=(const Iterator& other) const;
29 const IdSimplex operator*() const;
30
31 private:
37 int64_t depth();
38
42 void init();
43
49
51
52 private:
56 int8_t m_pt = 0;
57 int8_t m_edge_counter = 0;
58 };
59
60public:
61 LinkIterable(const Mesh& mesh, const Simplex& simplex);
62
63 Iterator begin() { return Iterator(*this, m_simplex.tuple()); }
64 Iterator end() { return Iterator(*this); }
65
66private:
67 const Mesh& m_mesh;
71
72 std::array<simplex::internal::VisitedArray<simplex::IdSimplex>, 2>
73 m_visited_link; // for depth 3 iteration
74};
75
76} // namespace wmtk::simplex
The Tuple is the basic navigation tool in our mesh data structure.
Definition Tuple.hpp:19
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...