Wildmeshing Toolkit
tuple_from_valid_index.cpp
Go to the documentation of this file.
1 
3 #include <cassert>
7 namespace wmtk::autogen {
9  PrimitiveType mesh_type,
10  const int64_t global_cid,
11  int8_t valid_tuple_index)
12 {
13  switch (mesh_type) {
15  return tet_mesh::tuple_from_valid_index(global_cid, valid_tuple_index);
17  return tri_mesh::tuple_from_valid_index(global_cid, valid_tuple_index);
19  return edge_mesh::tuple_from_valid_index(global_cid, valid_tuple_index);
20  case PrimitiveType::Vertex: return Tuple(-1, -1, -1, global_cid);
21  default: assert(false); // "not implemented"
22  }
23  return {};
24 }
25 } // namespace wmtk::autogen
Tuple tuple_from_valid_index(int64_t global_cid, int8_t valid_tuple_index)
Tuple tuple_from_valid_index(int64_t global_cid, int8_t valid_tuple_index)
Tuple tuple_from_valid_index(int64_t global_cid, int8_t valid_tuple_index)
Tuple tuple_from_valid_index(PrimitiveType mesh_type, const int64_t global_cid, int8_t valid_tuple_index)