Wildmeshing Toolkit
Loading...
Searching...
No Matches
local_id_table_offset.hxx
Go to the documentation of this file.
1
#pragma once
2
#include "
autogenerated_tables.hpp
"
3
namespace
wmtk::autogen::tet_mesh
{
4
// computes the offset of a tuple's local ids in the tables
5
inline
int64_t
local_id_table_offset
(
const
Tuple
& tuple)
6
{
7
int64_t value = tuple.
local_vid
() * 6 * 4 + tuple.
local_eid
() * 4 + tuple.
local_fid
();
8
return
value;
9
}
10
11
inline
std::array<int64_t, 3>
lvid_leid_lfid_from_table_offset
(int64_t table_offset)
12
{
13
std::array<int64_t, 3> r;
14
auto
& [lvid, leid, lfid] = r;
15
lfid = table_offset % 4;
16
17
int64_t ve_offset = table_offset / 4;
18
leid = ve_offset % 6;
19
lvid = ve_offset / 6;
20
return
r;
21
}
22
23
}
// namespace wmtk::autogen::tet_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_fid
int8_t local_fid() const
Definition
Tuple.hxx:62
wmtk::Tuple::local_eid
int8_t local_eid() const
Definition
Tuple.hxx:57
wmtk::autogen::tet_mesh
Definition
autogenerated_tables.cpp:4
wmtk::autogen::tet_mesh::lvid_leid_lfid_from_table_offset
std::array< int64_t, 3 > lvid_leid_lfid_from_table_offset(int64_t table_offset)
Definition
local_id_table_offset.hxx:11
wmtk::autogen::tet_mesh::local_id_table_offset
int64_t local_id_table_offset(const Tuple &t)
Definition
local_id_table_offset.hxx:5
autogenerated_tables.hpp
src
wmtk
autogen
tet_mesh
local_id_table_offset.hxx
Generated by
1.9.8