|
hp-FEM
Adaptive hp-FEM suite for nano-optics
|
#include <conical_scattering.hpp>
Public Member Functions | |
| ConicalScattering (const fespace::NedelecDofMap< 2 > &transverse, const fespace::DofMap< 2 > &longitudinal, ConicalScatteringSetup setup) | |
| const ConicalScatteringSetup & | setup () const noexcept |
| const fespace::NedelecDofMap< 2 > & | transverse () const noexcept |
| const fespace::DofMap< 2 > & | longitudinal () const noexcept |
| Real | wavenumber () const noexcept |
| Real | beta () const noexcept |
| const fespace::NedelecDofMap< 2 > & | transverse_dofs () const noexcept |
| const fespace::DofMap< 2 > & | longitudinal_dofs () const noexcept |
| const materials::Material & | background_material (Index cell) const |
| assembly::ConicalForm | form_of_cell (Index cell) const |
| Per-cell form: material tensors (stretched inside the PML) and the source. | |
| const std::vector< Index > & | free_dofs () const noexcept |
| Free block DoFs after the PEC elimination (Nédélec first, then H1). | |
| const std::optional< fespace::Constraints > & | constraints () const noexcept |
| const std::vector< Index > & | system_dofs () const noexcept |
| const std::optional< fespace::Constraints > & | system_constraints () const noexcept |
The constraints on system_dofs() (constraints(), or their H1 part on the scalar path). | |
| ConicalSolution | solve () const |
| Vector | load () const |
| ConicalSolution | solution_from (const Vector &block) const |
| adaptivity::Estimate | estimate (const ConicalSolution &solution, const adaptivity::EstimatorOptions &options={}) const |
| ConicalError | error (const ConicalSolution &solution, const std::function< ConicalVector(const Point< 2 > &)> &exact, const std::function< ConicalVector(const Point< 2 > &)> &exact_curl={}, int extra_order=4) const |
| ConicalVector | field (const ConicalSolution &solution, Index cell, const Point< 2 > &xi) const |
| Physical field (E_x, E_y, E_z) of the unknown at reference point ξ of cell c. | |
| ConicalVector | total_field (const ConicalSolution &solution, Index cell, const Point< 2 > &xi) const |
| ConicalVector | scattered_field (const ConicalSolution &solution, Index cell, const Point< 2 > &xi) const |
| std::optional< ConicalVector > | total_field (const ConicalSolution &solution, const mesh::PointLocator< 2 > &locator, const Point< 2 > &x) const |
| std::optional< ConicalVector > | scattered_field (const ConicalSolution &solution, const mesh::PointLocator< 2 > &locator, const Point< 2 > &x) const |
| ConicalVector | incident_field (const Point< 2 > &x) const |
| Physical incident field (E_x, E_y, E_z) at x (zero without an incident field). | |
| ConicalVector | incident_curl (const Point< 2 > &x) const |
| ConicalVector | incident_h_field (const Point< 2 > &x) const |
| ConicalVector | curl_field (const ConicalSolution &solution, Index cell, const Point< 2 > &xi) const |
| Physical curl of the unknown field at reference point ξ of cell c. | |
| ConicalVector | h_field (const ConicalSolution &solution, Index cell, const Point< 2 > &xi) const |
| Point< 3 > | poynting (const ConicalSolution &solution, Index cell, const Point< 2 > &xi) const |
| std::optional< ConicalVector > | h_field (const ConicalSolution &solution, const mesh::PointLocator< 2 > &locator, const Point< 2 > &x) const |
The same at a physical point located with locator, or nothing outside the mesh. | |
| std::optional< Point< 3 > > | poynting (const ConicalSolution &solution, const mesh::PointLocator< 2 > &locator, const Point< 2 > &x) const |
Assembles \( S(\beta) - k_0^2M \) with PML, PEC, Bloch and hanging-node constraints and the source, solves, and evaluates the fields.
| hpfem::physics::ConicalScattering::ConicalScattering | ( | const fespace::NedelecDofMap< 2 > & | transverse, |
| const fespace::DofMap< 2 > & | longitudinal, | ||
| ConicalScatteringSetup | setup | ||
| ) |
| InvalidArgument | for ω ≤ 0, neither or both of incident field and current, mismatched maps, a PML box with a layer on a periodic side, or (with an incident field) a cell whose permeability differs from the background's. |
| const materials::Material & hpfem::physics::ConicalScattering::background_material | ( | Index | cell | ) | const |
Background material of cell c: the stack's layer at the cell centroid, otherwise materials.background().
|
inlinenoexcept |
|
inlinenoexcept |
Hanging-node and Bloch constraints on the free block DoFs (none on a conforming mesh without periodic directions).
| ConicalVector hpfem::physics::ConicalScattering::curl_field | ( | const ConicalSolution & | solution, |
| Index | cell, | ||
| const Point< 2 > & | xi | ||
| ) | const |
Physical curl of the unknown field at reference point ξ of cell c.
| ConicalError hpfem::physics::ConicalScattering::error | ( | const ConicalSolution & | solution, |
| const std::function< ConicalVector(const Point< 2 > &)> & | exact, | ||
| const std::function< ConicalVector(const Point< 2 > &)> & | exact_curl = {}, |
||
| int | extra_order = 4 |
||
| ) | const |
L2 errors of the unknown field and its conical curl against an exact physical field (E_x, E_y, E_z) and curl given as functions of the point (empty curl: zero).
| adaptivity::Estimate hpfem::physics::ConicalScattering::estimate | ( | const ConicalSolution & | solution, |
| const adaptivity::EstimatorOptions & | options = {} |
||
| ) | const |
Element indicators of a solution (adaptivity::conical_residual_estimate with the per-cell forms of this problem, β and k0²).
| ConicalVector hpfem::physics::ConicalScattering::field | ( | const ConicalSolution & | solution, |
| Index | cell, | ||
| const Point< 2 > & | xi | ||
| ) | const |
Physical field (E_x, E_y, E_z) of the unknown at reference point ξ of cell c.
| assembly::ConicalForm hpfem::physics::ConicalScattering::form_of_cell | ( | Index | cell | ) | const |
Per-cell form: material tensors (stretched inside the PML) and the source.
|
inlinenoexcept |
Free block DoFs after the PEC elimination (Nédélec first, then H1).
| std::optional< ConicalVector > hpfem::physics::ConicalScattering::h_field | ( | const ConicalSolution & | solution, |
| const mesh::PointLocator< 2 > & | locator, | ||
| const Point< 2 > & | x | ||
| ) | const |
The same at a physical point located with locator, or nothing outside the mesh.
| ConicalVector hpfem::physics::ConicalScattering::h_field | ( | const ConicalSolution & | solution, |
| Index | cell, | ||
| const Point< 2 > & | xi | ||
| ) | const |
Magnetic field \( H = \nabla\times E/(i\omega\mu_0\mu_r) \) [A/m] of the total field (unknown plus incident field as the formulation requires) with the permeability of the cell's material; convention exp(-iωt).
| ConicalVector hpfem::physics::ConicalScattering::incident_curl | ( | const Point< 2 > & | x | ) | const |
Physical curl of the incident field at x: setup.incident_curl, or central differences of incident_field (zero without an incident field).
| ConicalVector hpfem::physics::ConicalScattering::incident_field | ( | const Point< 2 > & | x | ) | const |
Physical incident field (E_x, E_y, E_z) at x (zero without an incident field).
| ConicalVector hpfem::physics::ConicalScattering::incident_h_field | ( | const Point< 2 > & | x | ) | const |
Magnetic field of the incident wave in the background medium of the setup, \( H = \nabla\times E/(i\omega\mu_0\mu_r) \) [A/m].
| Vector hpfem::physics::ConicalScattering::load | ( | ) | const |
The load of solve over the full block DoFs (E_x, E_y | v), before the PEC elimination and the constraints: the scattered-field source \( k_0^2(\varepsilon - \varepsilon_b)E^{inc}
\) of the cells whose permittivity deviates from the background, or the current; assembled on the source cells only (zero if there are none). Problems that differ only in the excitation share the operator, so the factorisation one of them kept (KeptFactorisation::solve_many) solves the loads of the others without assembling or factorising again (the incidences from cover and substrate of a grating cell, issue #216).
|
inlinenoexcept |
|
inlinenoexcept |
| std::optional< Point< 3 > > hpfem::physics::ConicalScattering::poynting | ( | const ConicalSolution & | solution, |
| const mesh::PointLocator< 2 > & | locator, | ||
| const Point< 2 > & | x | ||
| ) | const |
| Point< 3 > hpfem::physics::ConicalScattering::poynting | ( | const ConicalSolution & | solution, |
| Index | cell, | ||
| const Point< 2 > & | xi | ||
| ) | const |
Time-averaged Poynting vector \( S = \tfrac12\mathrm{Re}(E\times\bar H) \) [W/m^2] of the total field (energy-flow maps; its z component is the power flow along the lines).
| std::optional< ConicalVector > hpfem::physics::ConicalScattering::scattered_field | ( | const ConicalSolution & | solution, |
| const mesh::PointLocator< 2 > & | locator, | ||
| const Point< 2 > & | x | ||
| ) | const |
| ConicalVector hpfem::physics::ConicalScattering::scattered_field | ( | const ConicalSolution & | solution, |
| Index | cell, | ||
| const Point< 2 > & | xi | ||
| ) | const |
|
inlinenoexcept |
| ConicalSolution hpfem::physics::ConicalScattering::solution_from | ( | const Vector & | block | ) | const |
The solution of a full block coefficient vector (E_x, E_y | v), e.g. a column of KeptFactorisation::solve_many of load(): the scattered field with an incident field, the total field with a current.
| InvalidArgument | if the size is not the number of block DoFs. |
| ConicalSolution hpfem::physics::ConicalScattering::solve | ( | ) | const |
| Error | if the factorisation fails. |
|
inlinenoexcept |
The constraints on system_dofs() (constraints(), or their H1 part on the scalar path).
|
inlinenoexcept |
The unknowns solve factorises before the constraints: free_dofs(), or the free H1 block DoFs (offset by the Nédélec count) on the scalar E_z path.
| std::optional< ConicalVector > hpfem::physics::ConicalScattering::total_field | ( | const ConicalSolution & | solution, |
| const mesh::PointLocator< 2 > & | locator, | ||
| const Point< 2 > & | x | ||
| ) | const |
The same at a physical point located with locator (built on the mesh), or nothing outside the mesh.
| ConicalVector hpfem::physics::ConicalScattering::total_field | ( | const ConicalSolution & | solution, |
| Index | cell, | ||
| const Point< 2 > & | xi | ||
| ) | const |
Total / scattered field (the incident field added or subtracted as the formulation requires; without an incident field both coincide).
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |