Wildmeshing Toolkit
subdart_maximal_action_to_face.cpp
Go to the documentation of this file.
1 // DO NOT MODIFY, autogenerated from the /scripts directory
3 #include "SimplexDart.hpp"
6 namespace wmtk::autogen::tet_mesh {
8  int8_t dart_index,
9  int8_t simplex_dimension,
10  int8_t simplex_index)
11 {
12  switch (simplex_dimension) {
13  case 1: return subdart_preserving_action_1[dart_index][simplex_index];
14 
15  case 2: return subdart_preserving_action_2[dart_index][simplex_index];
16 
17  case 3: return SimplexDart::identity();
18  default: break;
19  }
20  assert(false);
21  return 0;
22 }
23 
25  int8_t dart_index,
26  int8_t simplex_dimension,
27  int8_t simplex_index)
28 {
29  switch (simplex_dimension) {
30  case 1: return max_subdart_preservation_dimension_1[dart_index][simplex_index];
31 
32  case 2: return max_subdart_preservation_dimension_2[dart_index][simplex_index];
33 
34  case 3: return 3;
35  default: break;
36  }
37  return 0;
38 }
39 
40 std::array<int8_t, 2>
41 subdart_maximal_action_to_face(int8_t dart_index, int8_t simplex_dimension, int8_t simplex_index)
42 {
43  switch (simplex_dimension) {
44  case 1:
45  return std::array<int8_t, 2>{
46  {subdart_preserving_action_1[dart_index][simplex_index],
47  max_subdart_preservation_dimension_1[dart_index][simplex_index]}};
48 
49  case 2:
50  return std::array<int8_t, 2>{
51  {subdart_preserving_action_2[dart_index][simplex_index],
52  max_subdart_preservation_dimension_2[dart_index][simplex_index]}};
53 
54  case 3: return std::array<int8_t, 2>{{SimplexDart::identity(), 3}};
55 
56  default: break;
57  }
58  assert(false);
59  return {};
60 }
61 } // namespace wmtk::autogen::tet_mesh
const int8_t subdart_preserving_action_1[24][6]
const int8_t max_subdart_preservation_dimension_1[24][6]
const int8_t subdart_preserving_action_2[24][4]
const int8_t max_subdart_preservation_dimension_2[24][4]
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)