hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
smoothness.hpp
Go to the documentation of this file.
1#pragma once
12
13#include <span>
14#include <vector>
15
16#include "hpfem/core/types.hpp"
18
19namespace hpfem::adaptivity {
20
42
47template <int Dim, class Counts>
48[[nodiscard]] std::vector<Real> coefficient_decay(const fespace::EntityDofMap<Dim, Counts>& dofs,
49 const Vector& u, std::span<const Index> cells,
50 const SmoothnessOptions& options = {});
51
53struct HpDecision {
54 std::vector<Index> h_marked;
55 std::vector<Index> p_marked;
56 std::vector<Real> decay;
57};
58
59template <int Dim, class Counts>
61 std::span<const Index> marked,
62 const SmoothnessOptions& options = {});
63
64extern template std::vector<Real> coefficient_decay<2, fespace::H1Counts>(const fespace::DofMap<2>&,
65 const Vector&,
66 std::span<const Index>,
67 const SmoothnessOptions&);
68extern template std::vector<Real> coefficient_decay<3, fespace::H1Counts>(const fespace::DofMap<3>&,
69 const Vector&,
70 std::span<const Index>,
71 const SmoothnessOptions&);
72extern template std::vector<Real> coefficient_decay<2, fespace::NedelecCounts>(
73 const fespace::NedelecDofMap<2>&, const Vector&, std::span<const Index>,
74 const SmoothnessOptions&);
75extern template std::vector<Real> coefficient_decay<3, fespace::NedelecCounts>(
76 const fespace::NedelecDofMap<3>&, const Vector&, std::span<const Index>,
77 const SmoothnessOptions&);
79 std::span<const Index>,
80 const SmoothnessOptions&);
82 std::span<const Index>,
83 const SmoothnessOptions&);
85 const Vector&,
86 std::span<const Index>,
87 const SmoothnessOptions&);
89 const Vector&,
90 std::span<const Index>,
91 const SmoothnessOptions&);
92
93} // namespace hpfem::adaptivity
Definition dof_map.hpp:51
Definition axisymmetric_estimator.hpp:39
std::vector< Real > coefficient_decay(const fespace::EntityDofMap< Dim, Counts > &dofs, const Vector &u, std::span< const Index > cells, const SmoothnessOptions &options={})
template HpDecision hp_decide< 3, fespace::NedelecCounts >(const fespace::NedelecDofMap< 3 > &, const Vector &, std::span< const Index >, const SmoothnessOptions &)
template std::vector< Real > coefficient_decay< 2, fespace::H1Counts >(const fespace::DofMap< 2 > &, const Vector &, std::span< const Index >, const SmoothnessOptions &)
template std::vector< Real > coefficient_decay< 2, fespace::NedelecCounts >(const fespace::NedelecDofMap< 2 > &, const Vector &, std::span< const Index >, const SmoothnessOptions &)
template HpDecision hp_decide< 3, fespace::H1Counts >(const fespace::DofMap< 3 > &, const Vector &, std::span< const Index >, const SmoothnessOptions &)
template std::vector< Real > coefficient_decay< 3, fespace::H1Counts >(const fespace::DofMap< 3 > &, const Vector &, std::span< const Index >, const SmoothnessOptions &)
template std::vector< Real > coefficient_decay< 3, fespace::NedelecCounts >(const fespace::NedelecDofMap< 3 > &, const Vector &, std::span< const Index >, const SmoothnessOptions &)
template HpDecision hp_decide< 2, fespace::NedelecCounts >(const fespace::NedelecDofMap< 2 > &, const Vector &, std::span< const Index >, const SmoothnessOptions &)
HpDecision hp_decide(const fespace::EntityDofMap< Dim, Counts > &dofs, const Vector &u, std::span< const Index > marked, const SmoothnessOptions &options={})
template HpDecision hp_decide< 2, fespace::H1Counts >(const fespace::DofMap< 2 > &, const Vector &, std::span< const Index >, const SmoothnessOptions &)
double Real
Definition types.hpp:15
Eigen::Matrix< Complex, Eigen::Dynamic, 1 > Vector
Definition types.hpp:20
Marked cells split by the smoothness indicator.
Definition smoothness.hpp:53
std::vector< Index > p_marked
Definition smoothness.hpp:55
std::vector< Real > decay
σ of every marked cell, in the order of marked
Definition smoothness.hpp:56
std::vector< Index > h_marked
Definition smoothness.hpp:54
Definition smoothness.hpp:21
Real threshold_scale
Definition smoothness.hpp:30
int min_decision_order
Definition smoothness.hpp:33
Real smooth_threshold
Definition smoothness.hpp:29
int extra_order
Quadrature degree 2p + extra_order (+2 on curved cells) for the coefficients.
Definition smoothness.hpp:23
Real floor
Definition smoothness.hpp:36
Real fit_from
Definition smoothness.hpp:40