|
hp-FEM
Adaptive hp-FEM suite for nano-optics
|
#include <functional>#include <optional>#include <span>#include <vector>#include <Eigen/Core>#include "hpfem/assembly/quadrature.hpp"#include "hpfem/core/types.hpp"#include "hpfem/fespace/dof_map.hpp"#include "hpfem/fespace/h1_basis.hpp"#include "hpfem/fespace/nedelec_basis.hpp"#include "hpfem/mesh/geometry.hpp"

Go to the source code of this file.
Classes | |
| struct | hpfem::assembly::ConicalForm |
| struct | hpfem::assembly::ConicalElement |
| struct | hpfem::assembly::ConicalSystem |
Namespaces | |
| namespace | hpfem |
| namespace | hpfem::assembly |
Typedefs | |
| using | hpfem::assembly::ConicalTensor = Eigen::Matrix< Complex, 3, 3 > |
| Physical 3×3 tensor in Cartesian components (x, y, z). | |
| using | hpfem::assembly::ConicalTensorField = std::function< ConicalTensor(const Point< 2 > &)> |
| Tensor as a function of the point. | |
| using | hpfem::assembly::ConicalSourceField = std::function< Eigen::Matrix< Complex, 3, 1 >(const Point< 2 > &)> |
| Vector in the scaled components (x, y, v) as a function of the point (sources). | |
| using | hpfem::assembly::ConicalFormFactory = std::function< ConicalForm(Index)> |
Functions | |
| ConicalTensor | hpfem::assembly::conical_scaled_curl_tensor (const ConicalTensor &inverse_permeability) |
| ConicalTensor | hpfem::assembly::conical_scaled_tensor (const ConicalTensor &permittivity) |
| bool | hpfem::assembly::is_diagonal (const ConicalTensor &tensor) noexcept |
| True if the off-diagonal entries are exactly zero. | |
| ConicalElement | hpfem::assembly::element_conical (const fespace::NedelecBasis< 2 > &nd_basis, const fespace::H1Basis< 2 > &h1_basis, const mesh::CellGeometry< 2 > &geometry, const QuadratureRule< 2 > &rule, Real beta, const ConicalForm &form) |
| Integrates the conical forms over one cell with the given rule. | |
| ConicalSystem | hpfem::assembly::assemble_conical (const fespace::NedelecDofMap< 2 > &nedelec, const fespace::DofMap< 2 > &h1, Real beta, const ConicalFormFactory &form_of_cell, int extra_order=2, std::span< const Index > cells={}) |
| SparseMatrix | hpfem::assembly::conical_gradient (const fespace::DofMap< 2 > &h1, const fespace::NedelecDofMap< 2 > &nedelec, Real beta) |
Maxwell forms of a z-invariant structure for a field with the dependence \( e^{i\beta z} \) (conical incidence, 2.5D): \( E = (E_x, E_y, E_z)(x, y)\,e^{i\beta z} \) on the 2D mesh with the in-plane components \( E_t = (E_x, E_y) \) in the Nédélec space and the scaled longitudinal component \( v = -iE_z \) in the H1 space of the same order. The curl of the mode is \( \nabla\times E = \big(\partial_yE_z - i\beta E_y,\ i\beta E_x - \partial_xE_z, \ \partial_xE_y - \partial_yE_x\big) = \big(i(\partial_y v - \beta E_y),\ -i(\partial_x v - \beta E_x),\ \nabla_t\times E_t\big) \), so that with diagonal tensors in (x, y, z) the bilinear forms read (test functions not conjugated; full tensors below)
\[ a(E, V) = \int \Big[ \mu_x^{-1}(\partial_y v - \beta E_y)(\partial_y w - \beta V_y) + \mu_y^{-1}(\partial_x v - \beta E_x)(\partial_x w - \beta V_x) + \mu_z^{-1}(\nabla_t\times E_t)(\nabla_t\times V_t) \Big] dx\,dy , \]
\[ b(E, V) = \int \big[ \varepsilon_x E_xV_x + \varepsilon_y E_yV_y + \varepsilon_z v w \big] dx\,dy , \]
real symmetric for lossless media, complex symmetric otherwise; the stretched tensors of a 2D PML, \( \Lambda = \mathrm{diag}(s_y/s_x,\ s_x/s_y,\ s_xs_y) \), fit. At β = 0 the forms decouple into the in-plane (H_z polarisation) block of maxwell_forms.hpp and the scalar E_z block \( \int \mu_t^{-1}\nabla v\cdot\nabla w - k_0^2\varepsilon_z vw \). The gradient of a potential, \( \nabla(\psi e^{i\beta z}) = (\nabla_t\psi,\ v = \beta\psi) \), is exactly representable: \( K_\beta = [G;\ \beta I] \) spans the kernel of a(·,·). Sources are paired as \( \int f_xV_x + f_yV_y + f_v w \) with the scaled \( f_v = -if_z \).
Full tensors (crystals, ADR-0015 §4): with \( c = (\partial_y v - \beta E_y,
\ \partial_x v - \beta E_x,\ \nabla_t\times E_t) \) the curl is \( D c \), \( D = \mathrm{diag}(i, -i, 1) \), that of the test function \( \bar D c_V \), and the scaled field \( (E_x, E_y, v) \) maps to the physical one by \( D' = \mathrm{diag}(1, 1, i)
\) (test side \( D'' = \mathrm{diag}(1, 1, -i) \)). The forms are \( \int c_V^T(\bar D\mu^{-1}D)\,c_E \) and \( \int \hat V^T(D''\varepsilon D')\,\hat E \) (conical_scaled_curl_tensor, conical_scaled_tensor): the xz and yz entries of a symmetric tensor enter as an antisymmetric pair (factors ∓i), so the matrix is complex-symmetric only for \( \varepsilon_{xz} = \varepsilon_{yz} = 0 \); in general \( A(\beta)^T = S A(-\beta) S \), \( S = \mathrm{diag}(I, -I) \) on the (Nédélec, H1) blocks. Diagonal tensors keep the specialised path of the formulas above. Convention exp(-iωt). See docs/theory/maxwell.md#conical-incidence.