Wildmeshing Toolkit
Loading...
Searching...
No Matches
Simplex.cpp
Go to the documentation of this file.
1
#include "
Simplex.hpp
"
2
3
#include <tuple>
4
#include <
wmtk/Mesh.hpp
>
5
namespace
wmtk::simplex
{
6
7
Simplex::Simplex
(
const
Mesh
& m,
const
PrimitiveType
& ptype,
const
Tuple
& t)
8
#if defined(WMTK_ENABLE_SIMPLEX_ID_CACHING)
9
:
Simplex
(ptype, t, m.
id
(t, ptype))
10
#else
11
:
Simplex
(ptype, t)
12
#endif
13
{}
14
15
#if defined(WMTK_ENABLE_SIMPLEX_ID_CACHING)
16
bool
Simplex::operator==(
const
Simplex
& o)
const
17
{
18
return
m_primitive_type
== o.
m_primitive_type
&& m_index == o.m_index;
19
}
20
21
bool
Simplex::operator<(
const
Simplex& o)
const
22
{
23
return
std::tie(
m_primitive_type
, m_index) < std::tie(o.m_primitive_type, o.m_index);
24
}
25
#endif
26
}
// namespace wmtk::simplex
Mesh.hpp
Simplex.hpp
wmtk::Mesh
Definition
Mesh.hpp:95
wmtk::Mesh::id
int64_t id(const Tuple &tuple, PrimitiveType type) const
return the global id of the Tuple of the given dimension
Definition
Mesh.hpp:1006
wmtk::Tuple
The Tuple is the basic navigation tool in our mesh data structure.
Definition
Tuple.hpp:19
wmtk::simplex::Simplex
Definition
Simplex.hpp:22
wmtk::simplex::Simplex::m_primitive_type
PrimitiveType m_primitive_type
Definition
Simplex.hpp:31
wmtk::simplex::Simplex::Simplex
Simplex()=default
wmtk::simplex
Definition
Cell.hpp:7
wmtk::PrimitiveType
PrimitiveType
Definition
PrimitiveType.hpp:9
src
wmtk
simplex
Simplex.cpp
Generated by
1.9.8