Wildmeshing Toolkit
boundary_with_preserved_coface.cpp
Go to the documentation of this file.
1 #include "coface_preserving_boundary.hpp"
2 #include <wmtk/Mesh.hpp>
3 
4 namespace wmtk::simplex {
5 
7  const Mesh& mesh,
8  const Tuple& t,
9  PrimitiveType pt,
10  PrimtiiveType coface_pt)
11 {
12  std::vector<Tuple> ret;
13  constexpr static PrimitiveType PV = PrimitiveType::Vertex;
14  constexpr static PrimitiveType PE = PrimitiveType::Edge;
15  constexpr static PrimitiveType PF = PrimitiveType::Face;
16  constexpr static PrimitiveType PT = PrimitiveType::Tetrahedron;
17  if (coface_pt < pt) {
18  ret.emplace_back(t);
19  }
20  switch (pt) {
21  case PrimitiveType::Vertex: {
22  // vertex does not have a boundary
23  } break;
24  case PrimitiveType::Edge: {
25  } break;
26  case PrimitiveType::Face: {
27  if (coface_pt < PE) {
28  ret.emplace_back(m.switch_tuples(t, {PE}));
29  }
30  } break;
32  if (coface_pt < PF) {
33  ret.emplace_back(m.switch_tuples(t, {PF}));
34  if (coface_pt < PE) {
35  ret.emplace_back(m.switch_tuples(t, {PE, PF}));
36  }
37  }
38  } break;
39  case PrimitiveType::HalfEdge:
40  default: assert(false); break;
41  }
42  return ret;
43 }
44 } // namespace wmtk::simplex
constexpr wmtk::PrimitiveType PT
constexpr wmtk::PrimitiveType PF
std::vector< Tuple > coface_preserving_boundary_tuples(const Mesh &mesh, const Tuple &t, PrimitiveType pt, PrimtiiveType coface_pt)
constexpr PrimitiveType PV
constexpr PrimitiveType PE