Wildmeshing Toolkit
subdart_maximal_action_to_face.cpp
Go to the documentation of this file.
2 #include <cassert>
6 
7 namespace wmtk::autogen::utils {
9  PrimitiveType mesh_type,
10  int8_t dart_index,
11  int8_t simplex_dimension,
12  int8_t simplex_index) -> std::array<int8_t, 2>
13 {
14  switch (mesh_type) {
17  dart_index,
18  simplex_dimension,
19  simplex_index);
22  dart_index,
23  simplex_dimension,
24  simplex_index);
27  dart_index,
28  simplex_dimension,
29  simplex_index);
30  case PrimitiveType::Vertex: return {};
31  default: assert(false);
32  }
33  return {};
34 }
35 
37  PrimitiveType mesh_type,
38  int8_t dart_index,
39  int8_t simplex_dimension,
40  int8_t simplex_index) -> int8_t
41 {
42  switch (mesh_type) {
45  dart_index,
46  simplex_dimension,
47  simplex_index);
50  dart_index,
51  simplex_dimension,
52  simplex_index);
55  dart_index,
56  simplex_dimension,
57  simplex_index);
58  case PrimitiveType::Vertex: return {};
59  default: assert(false);
60  }
61  return {};
62 }
64  PrimitiveType mesh_type,
65  int8_t dart_index,
66  int8_t simplex_dimension,
67  int8_t simplex_index) -> int8_t
68 {
69  switch (mesh_type) {
72  dart_index,
73  simplex_dimension,
74  simplex_index);
77  dart_index,
78  simplex_dimension,
79  simplex_index);
82  dart_index,
83  simplex_dimension,
84  simplex_index);
85  case PrimitiveType::Vertex: return {};
86  default: assert(false);
87  }
88  return {};
89 }
90 
92  PrimitiveType mesh_type,
93  int8_t dart_index,
94  PrimitiveType primitive_type,
95  int8_t simplex_index)
96 {
97  const int8_t type_index = get_primitive_type_id(primitive_type);
98  return subdart_maximal_action_to_face_action(mesh_type, dart_index, type_index, simplex_index);
99 }
101  PrimitiveType mesh_type,
102  int8_t dart_index,
103  PrimitiveType primitive_type,
104  int8_t simplex_index)
105 {
106  const int8_t type_index = get_primitive_type_id(primitive_type);
107  return subdart_maximal_action_to_face_size(mesh_type, dart_index, type_index, simplex_index);
108 }
109 std::array<int8_t, 2> subdart_maximal_action_to_face(
110  PrimitiveType mesh_type,
111  int8_t dart_index,
112  PrimitiveType primitive_type,
113  int8_t simplex_index)
114 {
115  const int8_t type_index = get_primitive_type_id(primitive_type);
116  return subdart_maximal_action_to_face(mesh_type, dart_index, type_index, simplex_index);
117 }
118 } // namespace wmtk::autogen::utils
int8_t subdart_maximal_action_to_face_size(int8_t dart_index, int8_t simplex_dimension, int8_t simplex_index)
std::array< int8_t, 2 > subdart_maximal_action_to_face(int8_t dart_index, int8_t simplex_dimension, int8_t simplex_index)
Returns a dart action that maximizes the number of sub-darts preserved.
int8_t subdart_maximal_action_to_face_action(int8_t dart_index, int8_t simplex_dimension, int8_t simplex_index)
std::array< int8_t, 2 > subdart_maximal_action_to_face(int8_t dart_index, int8_t simplex_dimension, int8_t simplex_index)
Returns a dart action that maximizes the number of sub-darts preserved.
int8_t subdart_maximal_action_to_face_size(int8_t dart_index, int8_t simplex_dimension, int8_t simplex_index)
int8_t subdart_maximal_action_to_face_action(int8_t dart_index, int8_t simplex_dimension, int8_t simplex_index)
std::array< int8_t, 2 > subdart_maximal_action_to_face(int8_t dart_index, int8_t simplex_dimension, int8_t simplex_index)
Returns a dart action that maximizes the number of sub-darts preserved.
int8_t subdart_maximal_action_to_face_size(int8_t dart_index, int8_t simplex_dimension, int8_t simplex_index)
int8_t subdart_maximal_action_to_face_action(int8_t dart_index, int8_t simplex_dimension, int8_t simplex_index)
auto subdart_maximal_action_to_face_action(PrimitiveType mesh_type, int8_t dart_index, int8_t simplex_dimension, int8_t simplex_index) -> int8_t
auto subdart_maximal_action_to_face_size(PrimitiveType mesh_type, int8_t dart_index, int8_t simplex_dimension, int8_t simplex_index) -> int8_t
auto subdart_maximal_action_to_face(PrimitiveType mesh_type, int8_t dart_index, int8_t simplex_dimension, int8_t simplex_index) -> std::array< int8_t, 2 >
constexpr int8_t get_primitive_type_id(PrimitiveType t)
Get a unique integer id corresponding to each primitive type.