16 , m_cofaces_type(cofaces_type)
17 , m_tdc_itrbl(mesh, simplex, cofaces_type != mesh.top_simplex_type())
18 , m_it_end(m_tdc_itrbl.end())
26 : m_container(container)
27 , m_it(container.m_tdc_itrbl, t)
29 if ((*m_it).is_null()) {
38 if (m_container.m_simplex.primitive_type() == m_container.m_cofaces_type) {
44 return step_depth_3();
53 return *m_it != *other;
68 const Mesh& mesh = m_container.m_mesh;
78 return m_container.m_mesh.top_cell_dimension() ==
84 if (depth() == 3 && !is_coface_d0()) {
85 const Mesh& mesh = m_container.m_mesh;
86 const PrimitiveType& cofaces_type = m_container.m_cofaces_type;
88 m_container.m_visited_cofaces.is_visited(mesh.
get_id_simplex(*m_it, cofaces_type));
94 const Mesh& mesh = m_container.m_mesh;
96 const PrimitiveType& cofaces_type = m_container.m_cofaces_type;
97 auto& visited = m_container.m_visited_cofaces;
99 if (!is_coface_d0()) {
103 while (!(*m_it).is_null()) {
104 for (; m_edge_counter < 3; ++m_edge_counter) {
105 if (!visited.is_visited(mesh.
get_id_simplex(*m_it, cofaces_type))) {
Tuple switch_tuples(const Tuple &tuple, const ContainerType &op_sequence) const
int64_t top_cell_dimension() const
simplex::IdSimplex get_id_simplex(const Tuple &tuple, PrimitiveType pt) const
Retrieve the IdSimplex that is represented by the tuple and primitive type.
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.
void init()
Depending on the depth, the iterator must be initialized differently.
bool operator!=(const Iterator &other) const
Iterator(CofacesSingleDimensionIterable &container, const Tuple &t=Tuple())
bool is_coface_d0()
Check if coface type is the mesh's top simplex type.
This iterator internally uses TopDimensionCofacesIterable.
CofacesSingleDimensionIterable(const Mesh &mesh, const Simplex &simplex, const PrimitiveType cofaces_type)
PrimitiveType primitive_type() const
constexpr int8_t get_primitive_type_id(PrimitiveType t)
Get a unique integer id corresponding to each primitive type.