|
hp-FEM
Adaptive hp-FEM suite for nano-optics
|
#include <span>#include <type_traits>#include <vector>#include "hpfem/assembly/h1_forms.hpp"#include "hpfem/assembly/maxwell_forms.hpp"#include "hpfem/assembly/periodic.hpp"#include "hpfem/core/types.hpp"#include "hpfem/fespace/dof_map.hpp"#include "hpfem/solvers/linear_solver.hpp"
Go to the source code of this file.
Classes | |
| struct | hpfem::adaptivity::HypercircleParts |
| Squared contributions of the two constitutive relations of one cell. More... | |
| struct | hpfem::adaptivity::HypercircleEstimate |
| Element indicators of a primal/dual pair. More... | |
Namespaces | |
| namespace | hpfem |
| namespace | hpfem::adaptivity |
Typedefs | |
| template<int Dim> | |
| using | hpfem::adaptivity::DualDofMap = std::conditional_t< Dim==2, fespace::DofMap< 2 >, fespace::NedelecDofMap< 3 > > |
| Space of the dual unknown: H1 in 2D (scalar curl), Nédélec in 3D. | |
| template<int Dim> | |
| using | hpfem::adaptivity::DualForm = std::conditional_t< Dim==2, assembly::ScalarForm< 2 >, assembly::MaxwellForm< 3 > > |
| Per-cell form of the dual problem in the units of the respective assembler. | |
Dual (complementary) formulation of the curl–curl problem and the hypercircle (Prager–Synge) error bound. For the primal problem \( \nabla\times(\mu^{-1}\nabla\times E) - k^2\varepsilon E = f + \nabla\times g \) the dual unknown is the (scaled) magnetic field \( \sigma = \mu^{-1}\nabla\times E - g \), which satisfies \( \nabla\times\sigma = f + k^2\varepsilon E \) and therefore the dual curl–curl problem \( \nabla\times((k^2\varepsilon)^{-1}\nabla\times\sigma) - \mu\sigma = \nabla\times((k^2\varepsilon)^{-1} f) + \mu g \). In 3D \( \sigma \) lives in the same Nédélec space as E; in 2D the curl of a vector is a scalar, so \( \sigma \) is an H1 function with \( \nabla\times\sigma = (\partial_y\sigma, -\partial_x\sigma) \). For a pair \( (E_h, \sigma_h) \) of discrete fields the constitutive-relation error \( \eta_K^2 = \|\sigma_h - (\mu^{-1}\nabla\times E_h - g)\|^2_{\mu,K} + \|(k^2\varepsilon)^{-1}(\nabla\times\sigma_h - f) - E_h\|^2_{-k^2\varepsilon,K} \) is computable without any constant, and for the coercive problem (k² < 0, real symmetric positive μ and ε) it is a guaranteed upper bound of the energy error: \( \|\mu^{-1/2}\nabla\times(E - E_h)\|^2 - k^2\|\varepsilon^{1/2}(E - E_h)\|^2 \le \sum_K \eta_K^2 \) for any \( \sigma_h \) with the dual essential boundary condition (the Galerkin solution of the dual problem gives the sharpest bound). For the indefinite time-harmonic problem the same quantity is the constitutive-relation error estimator (reliable up to the inf-sup constant). See docs/theory/error-estimation.md#dual-formulation-and-guaranteed-bounds.