hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
refinement.hpp
Go to the documentation of this file.
1#pragma once
4
5#include <vector>
6
8#include "hpfem/mesh/mesh.hpp"
9
10namespace hpfem::mesh {
11
15template <int Dim>
16struct Refined {
17 static constexpr Index kChildren = Dim == 2 ? 4 : 8;
19 std::vector<Index> parent_cell;
20 std::vector<Index> edge_vertex;
21};
22
33template <int Dim>
34[[nodiscard]] Refined<Dim> refine_uniform(const Mesh<Dim>& parent);
35
36extern template Refined<2> refine_uniform<2>(const Mesh<2>&);
37extern template Refined<3> refine_uniform<3>(const Mesh<3>&);
38
39} // namespace hpfem::mesh
Definition mesh.hpp:61
Definition adaptive_mesh.hpp:19
template Refined< 2 > refine_uniform< 2 >(const Mesh< 2 > &)
template Refined< 3 > refine_uniform< 3 >(const Mesh< 3 > &)
Refined< Dim > refine_uniform(const Mesh< Dim > &parent)
std::int64_t Index
global indices (DoFs, entities)
Definition types.hpp:17
Definition refinement.hpp:16
std::vector< Index > parent_cell
parent of every child cell
Definition refinement.hpp:19
std::vector< Index > edge_vertex
vertex created on every parent edge
Definition refinement.hpp:20
static constexpr Index kChildren
children per cell
Definition refinement.hpp:17
Mesh< Dim > mesh
Definition refinement.hpp:18