hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
cell_layout.hpp
Go to the documentation of this file.
1#pragma once
6
7#include <array>
8#include <cstddef>
9#include <cstdint>
10
12
13namespace hpfem::fespace {
14
17template <int Dim>
18struct CellLayout {
19 static constexpr std::size_t kNumEdges =
20 static_cast<std::size_t>(mesh::SimplexTopology<Dim>::kNumEdges);
21 static constexpr std::size_t kNumFaces = Dim == 3 ? 4 : 0;
22
23 int cell_order = 1;
24 std::array<int, kNumEdges> edge_orders{};
25 std::array<int, 4> face_orders{};
26 std::array<bool, kNumEdges> edge_flipped{};
27 std::array<std::uint8_t, 4> face_permutations{};
28
30 [[nodiscard]] static CellLayout uniform(int p) {
31 CellLayout layout;
32 layout.cell_order = p;
33 layout.edge_orders.fill(p);
34 layout.face_orders.fill(p);
35 return layout;
36 }
37};
38
39} // namespace hpfem::fespace
Definition cell_layout.hpp:13
Definition cell_layout.hpp:18
static constexpr std::size_t kNumFaces
Definition cell_layout.hpp:21
std::array< int, 4 > face_orders
p_f ≥ 1, 3D only
Definition cell_layout.hpp:25
static constexpr std::size_t kNumEdges
Definition cell_layout.hpp:19
static CellLayout uniform(int p)
Uniform order p on all entities, identity orientation.
Definition cell_layout.hpp:30
std::array< int, kNumEdges > edge_orders
p_e ≥ 1
Definition cell_layout.hpp:24
std::array< bool, kNumEdges > edge_flipped
local edge runs against global orientation
Definition cell_layout.hpp:26
std::array< std::uint8_t, 4 > face_permutations
codes into mesh::kFacePermutations
Definition cell_layout.hpp:27
int cell_order
p ≥ 1 for the interior functions
Definition cell_layout.hpp:23
Local topology tables of the reference simplex in Dim dimensions.
Definition simplex_topology.hpp:27