Wildmeshing Toolkit
get_tuple_from_simplex_local_id.hpp
Go to the documentation of this file.
1 #pragma once
2 #include <cassert>
3 #include <wmtk/Tuple.hpp>
5 #if !defined(_NDEBUG)
6 #include "is_ccw.hpp"
7 #endif
8 
9 namespace wmtk::autogen::edge_mesh {
10 
11 inline Tuple get_tuple_from_simplex_local_vertex_id(int8_t local_id, int64_t global_id)
12 {
13  assert(local_id >= 0);
14  assert(local_id < 2);
15  return Tuple(local_id, -1, -1, global_id);
16 }
17 inline Tuple
18 get_tuple_from_simplex_local_id(PrimitiveType pt, int8_t local_id, int64_t global_fid)
19 {
20  switch (pt) {
21  case PrimitiveType::Vertex: return get_tuple_from_simplex_local_vertex_id(local_id, global_fid);
24  default:
25  case PrimitiveType::Tetrahedron: assert(false); return {};
26  }
27 }
28 } // namespace wmtk::autogen::edge_mesh
Tuple get_tuple_from_simplex_local_id(PrimitiveType pt, int8_t local_id, int64_t global_fid)
Tuple get_tuple_from_simplex_local_vertex_id(int8_t local_id, int64_t global_id)