Wildmeshing Toolkit
simplex_index_from_valid_index.cpp
Go to the documentation of this file.
5 
6 namespace wmtk::autogen::utils {
8  const PrimitiveType mesh_type,
9  int8_t valid_index,
10  wmtk::PrimitiveType type) -> int8_t
11 {
12  switch (mesh_type) {
13  case PrimitiveType::Edge: return edge_mesh::simplex_index_from_valid_index(valid_index, type);
15  return tri_mesh::simplex_index_from_valid_index(valid_index, type);
17  return tet_mesh::simplex_index_from_valid_index(valid_index, type);
18  case PrimitiveType::Vertex: return 0;
19  default: assert(false);
20  }
21  return 0;
22 }
23 } // namespace wmtk::autogen::utils
int8_t simplex_index_from_valid_index(int8_t valid_index, wmtk::PrimitiveType type)
int8_t simplex_index_from_valid_index(int8_t valid_index, wmtk::PrimitiveType type)
int8_t simplex_index_from_valid_index(int8_t valid_index, wmtk::PrimitiveType type)
auto simplex_index_from_valid_index(const PrimitiveType mesh_type, int8_t valid_index, wmtk::PrimitiveType type) -> int8_t