Wildmeshing Toolkit
Loading...
Searching...
No Matches
boundary_with_preserved_coface.cpp
Go to the documentation of this file.
1#include "coface_preserving_boundary.hpp"
2#include <wmtk/Mesh.hpp>
3
4namespace wmtk::simplex {
5
7 const Mesh& mesh,
8 const Tuple& t,
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;
17 if (coface_pt < pt) {
18 ret.emplace_back(t);
19 }
20 switch (pt) {
22 // vertex does not have a boundary
23 } break;
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
The Tuple is the basic navigation tool in our mesh data structure.
Definition Tuple.hpp:19
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 PE
constexpr PrimitiveType PV