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
4
namespace
wmtk::simplex
{
5
6
std::vector<Tuple>
coface_preserving_boundary_tuples
(
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
;
31
case
PrimitiveType::Tetrahedron
: {
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
Mesh.hpp
wmtk::Mesh
Definition
Mesh.hpp:95
wmtk::Tuple
The Tuple is the basic navigation tool in our mesh data structure.
Definition
Tuple.hpp:19
PT
constexpr wmtk::PrimitiveType PT
Definition
faces_single_dimension.cpp:6
PF
constexpr wmtk::PrimitiveType PF
Definition
faces_single_dimension.cpp:5
wmtk::simplex
Definition
Cell.hpp:7
wmtk::simplex::coface_preserving_boundary_tuples
std::vector< Tuple > coface_preserving_boundary_tuples(const Mesh &mesh, const Tuple &t, PrimitiveType pt, PrimtiiveType coface_pt)
Definition
boundary_with_preserved_coface.cpp:6
wmtk::PE
constexpr PrimitiveType PE
Definition
EnvelopeInvariant.cpp:25
wmtk::PV
constexpr PrimitiveType PV
Definition
EnvelopeInvariant.cpp:24
wmtk::PrimitiveType
PrimitiveType
Definition
PrimitiveType.hpp:9
wmtk::PrimitiveType::Vertex
@ Vertex
wmtk::PrimitiveType::Tetrahedron
@ Tetrahedron
wmtk::PrimitiveType::Edge
@ Edge
src
wmtk
simplex
internal
boundary_with_preserved_coface.cpp
Generated by
1.9.8