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
>
4
#include "
autogenerated_tables.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);
22
case
PrimitiveType::Edge
:
23
case
PrimitiveType::Triangle
:
24
default
:
25
case
PrimitiveType::Tetrahedron
: assert(
false
);
return
{};
26
}
27
}
28
}
// namespace wmtk::autogen::edge_mesh
Tuple.hpp
wmtk::Tuple
Definition:
Tuple.hpp:42
wmtk::autogen::edge_mesh
Definition:
autogenerated_tables.cpp:4
wmtk::autogen::edge_mesh::get_tuple_from_simplex_local_id
Tuple get_tuple_from_simplex_local_id(PrimitiveType pt, int8_t local_id, int64_t global_fid)
Definition:
get_tuple_from_simplex_local_id.hpp:18
wmtk::autogen::edge_mesh::get_tuple_from_simplex_local_vertex_id
Tuple get_tuple_from_simplex_local_vertex_id(int8_t local_id, int64_t global_id)
Definition:
get_tuple_from_simplex_local_id.hpp:11
wmtk::PrimitiveType
PrimitiveType
Definition:
PrimitiveType.hpp:9
wmtk::PrimitiveType::Triangle
@ Triangle
wmtk::PrimitiveType::Vertex
@ Vertex
wmtk::PrimitiveType::Tetrahedron
@ Tetrahedron
wmtk::PrimitiveType::Edge
@ Edge
autogenerated_tables.hpp
is_ccw.hpp
src
wmtk
autogen
edge_mesh
get_tuple_from_simplex_local_id.hpp
Generated by
1.9.1