hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
include
hpfem
mesh
simplex_topology.hpp
Go to the documentation of this file.
1
#pragma once
18
19
#include <array>
20
21
#include "
hpfem/core/types.hpp
"
22
23
namespace
hpfem::mesh
{
24
26
template
<
int
Dim>
27
struct
SimplexTopology
;
28
30
template
<>
31
struct
SimplexTopology
<2> {
32
static
constexpr
int
kDim = 2;
33
static
constexpr
LocalIndex
kNumVertices = 3;
34
static
constexpr
LocalIndex
kNumEdges = 3;
35
static
constexpr
LocalIndex
kNumFacets = 3;
36
static
constexpr
LocalIndex
kVerticesPerFacet = 2;
37
39
static
constexpr
std::array<std::array<LocalIndex, 2>, 3> kEdgeVertices{{{0, 1}, {1, 2}, {2, 0}}};
41
static
constexpr
std::array<std::array<LocalIndex, 2>, 3> kFacetVertices = kEdgeVertices;
42
};
43
45
template
<>
46
struct
SimplexTopology
<3> {
47
static
constexpr
int
kDim = 3;
48
static
constexpr
LocalIndex
kNumVertices = 4;
49
static
constexpr
LocalIndex
kNumEdges = 6;
50
static
constexpr
LocalIndex
kNumFaces = 4;
51
static
constexpr
LocalIndex
kNumFacets = 4;
52
static
constexpr
LocalIndex
kVerticesPerFacet = 3;
53
55
static
constexpr
std::array<std::array<LocalIndex, 2>, 6> kEdgeVertices{
56
{{0, 1}, {0, 2}, {0, 3}, {1, 2}, {1, 3}, {2, 3}}};
58
static
constexpr
std::array<std::array<LocalIndex, 3>, 4> kFaceVertices{
59
{{1, 2, 3}, {0, 2, 3}, {0, 1, 3}, {0, 1, 2}}};
61
static
constexpr
std::array<std::array<LocalIndex, 3>, 4> kFacetVertices = kFaceVertices;
63
static
constexpr
std::array<std::array<LocalIndex, 3>, 4> kFaceEdges{
64
{{3, 5, 4}, {1, 5, 2}, {0, 4, 2}, {0, 3, 1}}};
65
};
66
71
inline
constexpr
std::array<std::array<LocalIndex, 3>, 6>
kFacePermutations
{
72
{{0, 1, 2}, {0, 2, 1}, {1, 0, 2}, {1, 2, 0}, {2, 0, 1}, {2, 1, 0}}};
73
74
}
// namespace hpfem::mesh
hpfem::mesh
Definition
adaptive_mesh.hpp:19
hpfem::mesh::kFacePermutations
constexpr std::array< std::array< LocalIndex, 3 >, 6 > kFacePermutations
Definition
simplex_topology.hpp:71
hpfem::LocalIndex
std::int32_t LocalIndex
element-local indices
Definition
types.hpp:18
hpfem::mesh::SimplexTopology
Local topology tables of the reference simplex in Dim dimensions.
Definition
simplex_topology.hpp:27
types.hpp
Generated by
1.9.8