Wildmeshing Toolkit
Loading...
Searching...
No Matches
local_id_table_offset.hxx
Go to the documentation of this file.
1
#pragma once
2
3
#include "
autogenerated_tables.hpp
"
4
namespace
wmtk::autogen::tri_mesh
{
5
// computes the offset of a tuple's local ids in the tables
6
inline
int64_t
local_id_table_offset
(
const
Tuple
& tuple)
7
{
8
return
tuple.
local_vid
() * 3 + tuple.
local_eid
();
9
}
10
11
inline
std::array<int64_t, 2>
lvid_leid_from_table_offset
(int64_t table_offset)
12
{
13
std::array<int64_t, 2> r;
14
auto
& [lvid, leid] = r;
15
16
lvid = table_offset / 3;
17
leid = table_offset % 3;
18
return
r;
19
}
20
21
}
// namespace wmtk::autogen::tri_mesh
wmtk::Tuple
The Tuple is the basic navigation tool in our mesh data structure.
Definition
Tuple.hpp:19
wmtk::Tuple::local_vid
int8_t local_vid() const
Definition
Tuple.hxx:52
wmtk::Tuple::local_eid
int8_t local_eid() const
Definition
Tuple.hxx:57
wmtk::autogen::tri_mesh
Definition
autogenerated_tables.cpp:4
wmtk::autogen::tri_mesh::local_id_table_offset
int64_t local_id_table_offset(const Tuple &t)
Definition
local_id_table_offset.hxx:6
wmtk::autogen::tri_mesh::lvid_leid_from_table_offset
std::array< int64_t, 2 > lvid_leid_from_table_offset(int64_t table_offset)
Definition
local_id_table_offset.hxx:11
autogenerated_tables.hpp
src
wmtk
autogen
tri_mesh
local_id_table_offset.hxx
Generated by
1.9.8