Wildmeshing Toolkit
neighbors_single_dimension.cpp
Go to the documentation of this file.
5 namespace wmtk::simplex {
6 
7 // returns the
8 std::vector<Simplex>
9 neighbors_single_dimension(const Mesh& m, const Simplex& s, const PrimitiveType pt)
10 {
12  m,
14  pt);
15 }
16 std::vector<Tuple>
18 {
19  const PrimitiveType mypt = s.primitive_type();
20  assert(m.top_simplex_type() >= mypt);
21  assert(m.top_simplex_type() >= tpt);
22 
23  if (mypt < tpt) {
24  return cofaces_single_dimension_tuples(m, s, tpt);
25  } else if (mypt > tpt) {
26  return faces_single_dimension_tuples(m, s, tpt);
27  } else {
28  return {s.tuple()};
29  }
30 }
31 } // namespace wmtk::simplex
PrimitiveType top_simplex_type() const
Definition: Mesh.hpp:996
const Tuple & tuple() const
Definition: Simplex.hpp:53
PrimitiveType primitive_type() const
Definition: Simplex.hpp:51
std::vector< Simplex > tuple_vector_to_homogeneous_simplex_vector(const Mesh &m, const std::vector< Tuple > &tups, PrimitiveType primitive)
std::vector< Tuple > neighbors_single_dimension_tuples(const Mesh &m, const Simplex &s, const PrimitiveType tpt)
std::vector< Simplex > neighbors_single_dimension(const Mesh &m, const Simplex &s, const PrimitiveType pt)
std::vector< Tuple > cofaces_single_dimension_tuples(const Mesh &mesh, const Simplex &my_simplex, PrimitiveType cofaces_type)
std::vector< Tuple > faces_single_dimension_tuples(const Mesh &mesh, const Simplex &simplex, const PrimitiveType face_type)