hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions
hpfem::physics Namespace Reference

Classes

struct  AbsorbedPower
 Absorbed power split by material tag and by cell. More...
 
struct  AbsorptionDensity
 
struct  AnisotropicConicalWave
 
struct  AnisotropicPlaneWave
 
class  AnisotropicStack
 
class  AxisymmetricCavity
 Assembles the order-m pencil and solves the gauged eigenproblem. More...
 
struct  AxisymmetricCavitySetup
 Description of an axisymmetric cavity problem (closed, lossless). More...
 
struct  AxisymmetricDiscFlux
 
struct  AxisymmetricDofSets
 
struct  AxisymmetricError
 
struct  AxisymmetricFarField
 
struct  AxisymmetricFluxChannels
 
struct  AxisymmetricLayeredFarField
 
struct  AxisymmetricLayeredWave
 Order m of the plane wave on a layer stack, see layered_axisymmetric_wave. More...
 
struct  AxisymmetricMode
 One eigenmode of order m. More...
 
struct  AxisymmetricOrders
 Fields of several orders and their powers through a common surface. More...
 
class  AxisymmetricResonance
 
struct  AxisymmetricResonanceSetup
 
struct  AxisymmetricResonantMode
 A quasi-normal mode of order m. More...
 
class  AxisymmetricRieszProjection
 
struct  AxisymmetricScatteredField
 
class  AxisymmetricScattering
 
struct  AxisymmetricScatteringSetup
 
struct  BandDerivative
 
struct  Bands
 The bands at one Bloch wave vector. More...
 
class  BandStructure
 Assembles the pencil once and solves the Bloch eigenproblem per wave vector. More...
 
struct  BandStructureSetup
 
struct  ConicalAdjoint
 Adjoint of the conical solver as block coefficients (in-plane and scaled longitudinal). More...
 
struct  ConicalDiffractionOrder
 One diffraction order of a conical problem. More...
 
struct  ConicalError
 
class  ConicalFarField
 
struct  ConicalModalBoundary
 
class  ConicalResonance
 Assembles and solves the conical resonance problem on the block space. More...
 
struct  ConicalResonanceResult
 Modes ordered by the distance of ω to the target, and the timing of the solve. More...
 
struct  ConicalResonanceSetup
 Description of a conical resonance problem. More...
 
struct  ConicalResonantMode
 
class  ConicalScattering
 
struct  ConicalScatteringSetup
 Description of a conical scattering problem. More...
 
struct  ConicalSolution
 
class  ConicalSweep
 The affine operator of a conical scattering problem for sweeps. More...
 
struct  ConicalTangent
 Derivative of the solution coefficients with respect to a parameter of the setup. More...
 
struct  CrossSections
 
struct  DiffractionOrder
 One diffraction order. More...
 
struct  DiffractionOrder3D
 One order (m, n) of a crossed grating with its complex vector amplitude. More...
 
struct  DiffractionOrderField
 One diffraction order with its complex vector amplitude. More...
 
struct  DisplacementCondition
 
class  Elasticity
 Assembles and solves the elasticity problem on the vector H1 space over dofs. More...
 
struct  ElasticitySetup
 Description of the elasticity problem. More...
 
struct  ElasticMaterial
 Isotropic linear-elastic material. More...
 
class  FarField
 
struct  GoalEstimate
 Result of the DWR estimate. More...
 
class  GridField
 
struct  HalfSpaceModes
 
struct  IncidentField
 
class  KeptFactorisation
 
struct  Layer
 A homogeneous, non-magnetic layer of finite thickness [m]. More...
 
struct  LayeredConicalWave
 
struct  LayeredPlaneWave
 
class  LayerStack
 
struct  MieSphere
 
struct  ModeAdjoint
 
struct  ModeChannel
 
struct  ModeResolvedOrder
 A diffraction order resolved into the two modes of the medium on the line. More...
 
struct  OrderLine
 
struct  OrderPlane
 
struct  PortChannel
 One propagating (port, mode) channel of an S-matrix. More...
 
struct  PortCoefficients
 Modal coefficients of a solution on one port. More...
 
struct  PortMode
 
class  PortModes
 Modes, functionals and normalisations of one port; built by Scattering from the setup. More...
 
struct  PowerBalance
 
class  PropagatingMode
 Assembles and solves the mode problem on a cross-section mesh. More...
 
class  Resonance
 Assembles and solves the resonance problem on a Nédélec space. More...
 
struct  ResonanceDerivative
 Derivative of one resonance with respect to one real or complex parameter p. More...
 
struct  ResonanceSetup
 Description of a resonance problem. More...
 
struct  ResonantMode
 
struct  RieszContour
 One integration contour and what was sampled on it. More...
 
class  RieszPencil
 
class  RieszProjection
 Riesz projection on the pencil of a Resonance problem (2D / 3D). More...
 
class  RieszProjectionBase
 
struct  RieszSetup
 Contour choice and integration settings. More...
 
struct  SampledField
 
struct  SamplingOptions
 How points are sampled. More...
 
class  Scattering
 Assembles, constrains and solves a scattering problem and evaluates its fields. More...
 
class  ScatteringOperator
 The factorised operator of a scattering problem. More...
 
struct  ScatteringSetup
 Description of a scattering problem. More...
 
struct  ScatteringSolution
 Coefficients of the unknown field on the DoF map. More...
 
struct  SParameters
 
struct  StackResponse
 
struct  Surface
 
struct  SurfacePoint
 
struct  SweepTimings
 Accumulated wall-clock seconds of the sweep's phases (all points) and the point count. More...
 
class  Thermal
 
struct  ThermalSetup
 Description of the heat-conduction problem. More...
 
class  ThermoOptical
 Runs the optical–thermal feedback loop on a Nédélec and an H1 space of the same mesh. More...
 
struct  ThermoOpticalSetup
 Description of the coupled problem. More...
 
struct  ThermoOpticalState
 Converged (or last) state of the loop. More...
 
class  TimeDomain
 Assembles the matrices once, factorises the Newmark operator and advances a state. More...
 
struct  TimeDomainSetup
 Description of a transient problem. More...
 
struct  TimeSignal
 Time signal g(t) with its derivative (sources enter through g'). More...
 
struct  TimeState
 Field, velocity and acceleration coefficients (full DoF vectors, PEC entries zero). More...
 
struct  TractionCondition
 Traction t = σ n [Pa] on the boundary facets carrying tag (n the outward normal). More...
 
struct  TriangulatedField
 
struct  WaveguideMode
 
struct  WaveguidePort
 A port of a scattering problem: the boundary facets of a waveguide cross-section. More...
 
struct  WaveguideSetup
 

Typedefs

using TangentialField = Eigen::Matrix< Complex, 4, 1 >
 Tangential field \( (E_x, E_y, Z_0H_x, Z_0H_y) \) of a plane wave or a mode.
 
using AxisymmetricField = std::function< Eigen::Matrix< Complex, 3, 1 >(const Point< 2 > &)>
 
using ConicalFunctional = std::function< std::pair< Vector, Vector >(const fespace::NedelecDofMap< 2 > &, const fespace::DofMap< 2 > &)>
 
using ConicalFieldFunction = std::function< ConicalVector(const Point< 2 > &)>
 A physical 3-vector field as a function of the in-plane point.
 
using ConicalVector = Eigen::Matrix< Complex, 3, 1 >
 
using ConicalField = std::function< ConicalVector(const Point< 2 > &)>
 
using FieldFunction = std::function< assembly::ComplexVector< 2 >(const Point< 2 > &)>
 A field as a function of the point, e.g. problem.total_field through a locator.
 
using FieldFunction3D = std::function< assembly::ComplexVector< 3 >(const Point< 3 > &)>
 
template<int Dim>
using DisplacementField = std::function< Eigen::Matrix< Complex, Dim, 1 >(const Point< Dim > &)>
 
template<int Dim>
using Functional = std::function< Vector(const fespace::NedelecDofMap< Dim > &)>
 A linear functional given on any DoF map of the mesh: returns q with Q(E_h) = qᵀ e_h.
 
template<int Dim>
using SurfaceField = std::function< void(const SurfacePoint< Dim > &, assembly::ComplexVector< Dim > &, assembly::ComplexCurl< Dim > &)>
 Field sampler: value and curl of a field at a surface point.
 
using NodeField = Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >
 
using ComplexNodeField = Eigen::Matrix< Complex, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >
 Complex node field, the gradient of a complex goal.
 

Enumerations

enum class  SubstrateMode {
  kS , kP , kOrdinary , kExtraordinary ,
  kBiaxial
}
 
enum class  AxisDipole { kAxial , kTransverse }
 Orientation of a dipole on the axis. More...
 
enum class  PlanePolarisation { kS , kP }
 Polarisation of a plane wave relative to its plane of incidence (the x–z plane). More...
 
enum class  StackSide { kTop , kBottom }
 Side of a layer stack from which a plane wave comes. More...
 
enum class  SampledQuantity { kElectric , kMagnetic , kPoynting }
 
enum class  Polarisation { kS , kP }
 
enum class  Formulation : std::uint8_t { kTotalField , kScatteredField }
 

Functions

template<int Dim>
AbsorbedPower absorbed_power_by_tag (const Scattering< Dim > &problem, const ScatteringSolution< Dim > &solution, int extra_order=2)
 
AbsorbedPower absorbed_power_by_tag (const ConicalScattering &problem, const ConicalSolution &solution, int extra_order=2)
 
template<int Dim>
AbsorptionDensity< Dim > absorption_density (const Scattering< Dim > &problem, const ScatteringSolution< Dim > &solution, int extra_order=2)
 The Joule heating at the quadrature points of the lossy cells.
 
AbsorptionDensity< 2 > absorption_density (const ConicalScattering &problem, const ConicalSolution &solution, int extra_order=2)
 The same for the conical solver.
 
template AbsorbedPower absorbed_power_by_tag< 2 > (const Scattering< 2 > &, const ScatteringSolution< 2 > &, int)
 
template AbsorbedPower absorbed_power_by_tag< 3 > (const Scattering< 3 > &, const ScatteringSolution< 3 > &, int)
 
template AbsorptionDensity< 2 > absorption_density< 2 > (const Scattering< 2 > &, const ScatteringSolution< 2 > &, int)
 
template AbsorptionDensity< 3 > absorption_density< 3 > (const Scattering< 3 > &, const ScatteringSolution< 3 > &, int)
 
HalfSpaceModes half_space_modes (const materials::Tensor3 &eps, Real a, Real b, bool upward)
 
AxisymmetricDofSets axisymmetric_dof_sets (const fespace::NedelecDofMap< 2 > &meridian, const fespace::DofMap< 2 > &azimuthal, const std::vector< mesh::Tag > &pec_tags, mesh::Tag axis_tag, int azimuthal_order)
 
Eigen::Matrix< Complex, 3, 1 > axisymmetric_permittivity (const materials::Material &material)
 
assembly::AxisymmetricForm axisymmetric_pml_form (const pml::PmlBox< 2 > &box, const materials::Material &material, std::optional< int > quadrature_order=std::nullopt)
 
AxisymmetricField axial_plane_wave (Complex amplitude, Real k, int m)
 
AxisymmetricField axisymmetric_gaussian_dipole (Real position, Complex moment, AxisDipole orientation, Real sigma, Real omega, int m)
 
AxisymmetricField axisymmetric_offaxis_gaussian_dipole (Real radius, Real position, const Eigen::Matrix< Complex, 3, 1 > &moment, Real sigma, Real omega, int m)
 
Vector axisymmetric_current_load (const fespace::NedelecDofMap< 2 > &meridian, const fespace::DofMap< 2 > &azimuthal, int m, const AxisymmetricField &current, int extra_order=4)
 
Real dipole_vacuum_power (Complex moment, Real omega)
 
AxisymmetricError axisymmetric_error (const fespace::NedelecDofMap< 2 > &meridian, const fespace::DofMap< 2 > &azimuthal, const Vector &meridian_coefficients, const Vector &azimuthal_coefficients, int azimuthal_order, const AxisymmetricField &exact, const AxisymmetricField &exact_curl={}, int extra_order=4)
 
Real axisymmetric_poynting_flux (const fespace::NedelecDofMap< 2 > &meridian, const fespace::DofMap< 2 > &azimuthal, const Vector &meridian_coefficients, const Vector &azimuthal_coefficients, int azimuthal_order, Real omega, const materials::MaterialMap &materials, const Surface< 2 > &surface, int order=8, const AxisymmetricField &added_value={}, const AxisymmetricField &added_curl={})
 
Eigen::Matrix< Complex, Eigen::Dynamic, 3 > axisymmetric_fields_at (const fespace::NedelecDofMap< 2 > &meridian, const fespace::DofMap< 2 > &azimuthal, const Vector &meridian_coefficients, const Vector &azimuthal_coefficients, const Eigen::Matrix< Real, Eigen::Dynamic, 2 > &points)
 
AxisymmetricFluxChannels axisymmetric_flux_channels (const fespace::NedelecDofMap< 2 > &meridian, const fespace::DofMap< 2 > &azimuthal, const Vector &meridian_coefficients, const Vector &azimuthal_coefficients, int azimuthal_order, Real omega, const materials::MaterialMap &materials, const Surface< 2 > &surface, const LayerStack< 3 > &stack, int order=8, const AxisymmetricField &added_value={}, const AxisymmetricField &added_curl={})
 
AxisymmetricDiscFlux axisymmetric_disc_flux (const fespace::NedelecDofMap< 2 > &meridian, const fespace::DofMap< 2 > &azimuthal, const Vector &meridian_coefficients, const Vector &azimuthal_coefficients, int azimuthal_order, Real omega, const materials::MaterialMap &materials, Real z, Real radius, int direction=-1, const AxisymmetricField &added_value={}, const AxisymmetricField &added_curl={}, int order=8)
 
AbsorbedPower axisymmetric_absorbed_power (const fespace::NedelecDofMap< 2 > &meridian, const fespace::DofMap< 2 > &azimuthal, const Vector &meridian_coefficients, const Vector &azimuthal_coefficients, int azimuthal_order, Real omega, const materials::MaterialMap &materials, const AxisymmetricField &added={}, const std::optional< pml::PmlBox< 2 > > &pml=std::nullopt, int extra_order=4)
 
AxisymmetricFarField axisymmetric_far_field (const fespace::NedelecDofMap< 2 > &meridian, const fespace::DofMap< 2 > &azimuthal, const Vector &meridian_coefficients, const Vector &azimuthal_coefficients, int azimuthal_order, Real omega, const materials::MaterialMap &materials, const Surface< 2 > &surface, const std::vector< Real > &theta, int order=8)
 
AxisymmetricLayeredFarField axisymmetric_layered_far_field (const fespace::NedelecDofMap< 2 > &meridian, const fespace::DofMap< 2 > &azimuthal, const Vector &meridian_coefficients, const Vector &azimuthal_coefficients, int azimuthal_order, Real omega, const materials::MaterialMap &materials, const Surface< 2 > &surface, const LayerStack< 3 > &stack, const std::vector< Real > &theta_up, const std::vector< Real > &theta_down, int order=8)
 
AxisymmetricField oblique_plane_wave (Complex amplitude, Real k, Real theta_i, PlanePolarisation polarisation, int m)
 
AxisymmetricLayeredWave layered_axisymmetric_wave (const LayerStack< 3 > &stack, Real k0, Real theta, Polarisation pol, int m, StackSide side=StackSide::kTop, Complex amplitude=1.0)
 
AxisymmetricOrders scatter_orders (const fespace::NedelecDofMap< 2 > &meridian, const fespace::DofMap< 2 > &azimuthal, AxisymmetricScatteringSetup setup, const std::function< AxisymmetricField(int)> &incident_of_order, int max_order, const Surface< 2 > &surface, Real tolerance=1e-6)
 
AxisymmetricFarField superpose_far_field (const std::vector< AxisymmetricFarField > &patterns, const std::vector< int > &orders, Real phi)
 
template<int Dim>
BandDerivative band_permittivity_derivative (const BandStructure< Dim > &problem, const Bands< Dim > &bands, mesh::Tag tag, Real degeneracy_tolerance=1e-6)
 
template<int Dim>
BandDerivative band_permeability_derivative (const BandStructure< Dim > &problem, const Bands< Dim > &bands, mesh::Tag tag, Real degeneracy_tolerance=1e-6)
 
template<int Dim>
BandDerivative band_shape_derivative (const BandStructure< Dim > &problem, const Bands< Dim > &bands, const NodeField &velocity, Real relative_step=1e-6, Real degeneracy_tolerance=1e-6)
 
template<int Dim>
BandDerivative band_wave_vector_derivative (const BandStructure< Dim > &problem, const Bands< Dim > &bands, const Point< Dim > &direction, Real degeneracy_tolerance=1e-6)
 
template<int Dim>
std::vector< Point< Dim > > group_velocity (const BandStructure< Dim > &problem, const Bands< Dim > &bands, Real degeneracy_tolerance=1e-6)
 
template BandDerivative band_permittivity_derivative< 2 > (const BandStructure< 2 > &, const Bands< 2 > &, mesh::Tag, Real)
 
template BandDerivative band_permittivity_derivative< 3 > (const BandStructure< 3 > &, const Bands< 3 > &, mesh::Tag, Real)
 
template BandDerivative band_permeability_derivative< 2 > (const BandStructure< 2 > &, const Bands< 2 > &, mesh::Tag, Real)
 
template BandDerivative band_permeability_derivative< 3 > (const BandStructure< 3 > &, const Bands< 3 > &, mesh::Tag, Real)
 
template BandDerivative band_shape_derivative< 2 > (const BandStructure< 2 > &, const Bands< 2 > &, const NodeField &, Real, Real)
 
template BandDerivative band_shape_derivative< 3 > (const BandStructure< 3 > &, const Bands< 3 > &, const NodeField &, Real, Real)
 
template BandDerivative band_wave_vector_derivative< 2 > (const BandStructure< 2 > &, const Bands< 2 > &, const Point< 2 > &, Real)
 
template BandDerivative band_wave_vector_derivative< 3 > (const BandStructure< 3 > &, const Bands< 3 > &, const Point< 3 > &, Real)
 
template std::vector< Point< 2 > > group_velocity< 2 > (const BandStructure< 2 > &, const Bands< 2 > &, Real)
 
template std::vector< Point< 3 > > group_velocity< 3 > (const BandStructure< 3 > &, const Bands< 3 > &, Real)
 
GoalEstimate conical_dwr_estimate (const ConicalScattering &problem, const ConicalSolution &solution, const ConicalFunctional &functional, const adaptivity::EstimatorOptions &options={})
 
ConicalFunctional conical_point_functional (const Point< 2 > &x, const ConicalVector &weight)
 
ConicalFunctional conical_order_functional (const Point< 2 > &origin, const Point< 2 > &tangent, Real period, Real kt0, int order, int num_points, const ConicalVector &e)
 
ConicalVector to_literature_frame (const ConicalVector &v)
 Solver frame → literature frame, \( (v_x, v_y, v_z) \mapsto (v_x, -v_z, v_y) \).
 
ConicalVector from_literature_frame (const ConicalVector &v)
 The inverse.
 
ConicalVector conical_curl_of (const ConicalFieldFunction &field, const Point< 2 > &x, Real beta, Real step)
 
std::vector< ConicalDiffractionOrder > conical_diffraction_orders (const ConicalFieldFunction &field, const OrderLine &line, Real k0, Real index_line, Real kt0, Real beta, Real kn_incident, const ConicalFieldFunction &incident={}, int max_order=3, int num_points=0, Real incident_amplitude=1.0)
 
std::vector< ModeResolvedOrder > conical_mode_orders (const ConicalFieldFunction &field, const OrderLine &line, Real k0, const materials::Tensor3 &eps_line, Real kt0, Real beta, Real kn_incident, const ConicalFieldFunction &incident={}, int max_order=3, int num_points=0, Real incident_amplitude=1.0)
 
PowerBalance conical_power_balance (const ConicalScattering &problem, const ConicalSolution &solution, const Surface< 2 > &reflection, Real period, Real kn_incident, const ConicalFieldFunction &incident_wave, Real incident_amplitude=1.0, const Surface< 2 > *transmission=nullptr, int extra_order=2)
 
CrossSections conical_cross_sections (const ConicalScattering &problem, const ConicalSolution &solution, const Surface< 2 > &surface, Real incident_amplitude=1.0, int extra_order=2)
 
ConicalField conical_plane_wave (const ConicalVector &amplitude, const Point< 3 > &wave_vector)
 
ConicalField conical_plane_wave_curl (const ConicalVector &amplitude, const Point< 3 > &wave_vector)
 
ConicalVector conical_polarisation (const Point< 3 > &wave_vector, const Point< 3 > &normal, Polarisation polarisation)
 
assembly::ConicalForm conical_material_form (const materials::Material &material)
 
assembly::ConicalForm conical_pml_form (const pml::PmlBox< 2 > &box, const materials::Material &material, std::optional< int > quadrature_order={})
 
ConicalVector conical_field_at (const fespace::NedelecDofMap< 2 > &transverse, const fespace::DofMap< 2 > &longitudinal, const Vector &e, const Vector &v, Real beta, Index cell, const Point< 2 > &xi, ConicalVector *curl=nullptr)
 
Real conical_poynting_flux (const fespace::NedelecDofMap< 2 > &transverse, const fespace::DofMap< 2 > &longitudinal, const Vector &e, const Vector &v, Real beta, Real omega, const materials::MaterialMap &materials, const Surface< 2 > &surface, int order=8)
 
SparseMatrix conical_modal_boundary_matrix (const fespace::NedelecDofMap< 2 > &transverse, const fespace::DofMap< 2 > &longitudinal, const Surface< 2 > &line, const materials::Tensor3 &eps, Real k0, Real beta, const Point< 2 > &shift, Real kt0, int max_order)
 
LayeredConicalWave layered_conical_wave (const LayerStack< 2 > &stack, Real k0, Real angle, Real azimuth, Polarisation pol, Real amplitude=1.0)
 
LayeredConicalWave layered_conical_wave_from_substrate (const LayerStack< 2 > &stack, Real k0, Real angle, Real azimuth, Polarisation pol, Real amplitude=1.0)
 
AnisotropicConicalWave anisotropic_conical_wave (const AnisotropicStack &stack, Real k0, Real angle, Real azimuth, Polarisation pol, Real amplitude=1.0)
 
AnisotropicConicalWave anisotropic_conical_mode_wave (const AnisotropicStack &stack, Real k0, Real kx, Real beta, int mode, Real amplitude=1.0)
 
std::vector< ConicalVector > conical_fourier_coefficients (const std::function< ConicalVector(const Point< 2 > &)> &field, const Point< 2 > &origin, const Point< 2 > &tangent, Real period, Real kt0, int max_order, int num_points)
 
std::vector< ConicalVector > conical_fourier_coefficients (const std::function< ConicalVector(const Point< 2 > &)> &field, Real x0, Real y0, Real period, Real ky0, int max_order, int num_points)
 The same on the line x = x0 with the period along y (origin (x0, y0), tangent ŷ).
 
std::vector< ConicalDiffractionOrder > conical_diffraction_efficiencies (const std::vector< ConicalVector > &coefficients, Real k0, Real index_line, Real period, Real ky0, Real beta, Real kx_incident, Real incident_amplitude)
 
std::vector< assembly::ComplexVector< 2 > > fourier_coefficients (const std::function< assembly::ComplexVector< 2 >(const Point< 2 > &)> &field, Real x0, Real y0, Real period, Real ky0, int max_order, int num_points)
 
std::vector< assembly::ComplexVector< 2 > > fourier_coefficients (const fespace::NedelecDofMap< 2 > &dofs, const Vector &e_h, const mesh::PointLocator< 2 > &locator, Real x0, Real y0, Real period, Real ky0, int max_order, int num_points)
 
std::vector< DiffractionOrder > diffraction_efficiencies (const std::vector< assembly::ComplexVector< 2 > > &coefficients, Real k0, Real index_line, Real period, Real ky0, Real kx_incident, Real incident_amplitude)
 
std::vector< DiffractionOrderField > diffraction_orders (const FieldFunction &field, const OrderLine &line, Real k0, Real index_line, Real k_tangential, Real kn_incident, const FieldFunction &incident={}, int max_order=3, int num_points=0, Real incident_amplitude=1.0)
 
std::vector< DiffractionOrder3D > diffraction_orders (const FieldFunction3D &field, const OrderPlane &plane, Real k0, Real index_plane, const Point< 3 > &k_tangential, Real kn_incident, const FieldFunction3D &incident={}, int max_order=2, int num_points=0, Real incident_amplitude=1.0)
 
ConicalField conical_gaussian_dipole (const Point< 2 > &position, const ConicalVector &moment, Real sigma, Real omega, Real beta)
 
Real conical_source_power (const ConicalScattering &problem, const ConicalSolution &solution, int extra_order=4)
 
std::vector< ConicalSolution > conical_dipole_responses (const ConicalScattering &problem, const ConicalSolution &solution, const Point< 2 > &position, Real sigma, const Matrix &moments)
 
Eigen::Matrix3cd conical_dipole_power_matrix (const ConicalScattering &problem, const std::vector< ConicalSolution > &unit_responses, const Point< 2 > &position, Real sigma, int extra_order=4)
 
Eigen::Matrix3cd conical_sweep_dipole_power_matrix (ConicalSweep &sweep, const ConicalScatteringSetup &setup, const Point< 2 > &position, Real sigma, int extra_order=4)
 
ConicalVector conical_gaussian_average (const ConicalScattering &problem, const ConicalSolution &solution, const Point< 2 > &position, Real sigma, int extra_order=4)
 
ResonanceDerivative resonance_derivative_from (Complex omega, Complex dlambda, Complex dlambda_domega={})
 
template<int Dim>
ModeAdjoint resonance_adjoint (const Resonance< Dim > &problem, const ResonantMode &mode)
 
template<int Dim>
ResonanceDerivative resonance_material_derivative (const Resonance< Dim > &problem, const ResonantMode &mode, const ModeAdjoint &adjoint, mesh::Tag tag)
 
template<int Dim>
ResonanceDerivative resonance_shape_derivative (const Resonance< Dim > &problem, const ResonantMode &mode, const ModeAdjoint &adjoint, const NodeField &velocity, Real relative_step=1e-6)
 
ModeAdjoint conical_resonance_adjoint (const ConicalResonance &problem, const ConicalResonantMode &mode)
 
ResonanceDerivative conical_resonance_material_derivative (const ConicalResonance &problem, const ConicalResonantMode &mode, const ModeAdjoint &adjoint, mesh::Tag tag)
 
ResonanceDerivative conical_resonance_shape_derivative (const ConicalResonance &problem, const ConicalResonantMode &mode, const ModeAdjoint &adjoint, const NodeField &velocity, Real relative_step=1e-6)
 
ResonanceDerivative conical_resonance_beta_derivative (const ConicalResonance &problem, const ConicalResonantMode &mode, const ModeAdjoint &adjoint, Real step)
 
ResonanceDerivative conical_resonance_bloch_derivative (const ConicalResonance &problem, const ConicalResonantMode &mode, const ModeAdjoint &adjoint, const ConicalResonance &minus, const ConicalResonance &plus, Real step)
 
template ModeAdjoint resonance_adjoint< 2 > (const Resonance< 2 > &, const ResonantMode &)
 
template ModeAdjoint resonance_adjoint< 3 > (const Resonance< 3 > &, const ResonantMode &)
 
template ResonanceDerivative resonance_material_derivative< 2 > (const Resonance< 2 > &, const ResonantMode &, const ModeAdjoint &, mesh::Tag)
 
template ResonanceDerivative resonance_material_derivative< 3 > (const Resonance< 3 > &, const ResonantMode &, const ModeAdjoint &, mesh::Tag)
 
template ResonanceDerivative resonance_shape_derivative< 2 > (const Resonance< 2 > &, const ResonantMode &, const ModeAdjoint &, const NodeField &, Real)
 
template ResonanceDerivative resonance_shape_derivative< 3 > (const Resonance< 3 > &, const ResonantMode &, const ModeAdjoint &, const NodeField &, Real)
 
template<int Dim>
SampledField sample_field (const Scattering< Dim > &problem, const ScatteringSolution< Dim > &solution, const mesh::PointLocator< Dim > &locator, std::span< const Point< Dim > > points, const SamplingOptions &options={})
 
SampledField sample_field (const ConicalScattering &problem, const ConicalSolution &solution, const mesh::PointLocator< 2 > &locator, std::span< const Point< 2 > > points, const SamplingOptions &options={})
 The same for the conical solver: rows (E_x, E_y, E_z), physical components.
 
SampledField sample_field (const ConicalResonance &problem, const ConicalResonantMode &mode, const mesh::PointLocator< 2 > &locator, std::span< const Point< 2 > > points, const SamplingOptions &options={})
 
template<int Dim>
TriangulatedField< Dim > triangulate_field (const Scattering< Dim > &problem, const ScatteringSolution< Dim > &solution, int subdivisions, const SamplingOptions &options={})
 
TriangulatedField< 2 > triangulate_field (const ConicalScattering &problem, const ConicalSolution &solution, int subdivisions, const SamplingOptions &options={})
 The same for the conical solver.
 
TriangulatedField< 2 > triangulate_field (const ConicalResonance &problem, const ConicalResonantMode &mode, int subdivisions, const SamplingOptions &options={})
 The same for a conical resonant mode.
 
template SampledField sample_field< 2 > (const Scattering< 2 > &, const ScatteringSolution< 2 > &, const mesh::PointLocator< 2 > &, std::span< const Point< 2 > >, const SamplingOptions &)
 
template SampledField sample_field< 3 > (const Scattering< 3 > &, const ScatteringSolution< 3 > &, const mesh::PointLocator< 3 > &, std::span< const Point< 3 > >, const SamplingOptions &)
 
template TriangulatedField< 2 > triangulate_field< 2 > (const Scattering< 2 > &, const ScatteringSolution< 2 > &, int, const SamplingOptions &)
 
template TriangulatedField< 3 > triangulate_field< 3 > (const Scattering< 3 > &, const ScatteringSolution< 3 > &, int, const SamplingOptions &)
 
template<int Dim>
GoalEstimate dwr_estimate (const Scattering< Dim > &problem, const ScatteringSolution< Dim > &solution, const Functional< Dim > &functional, const adaptivity::EstimatorOptions &options={})
 
template<int Dim>
Functional< Dim > point_value_functional (const Point< Dim > &x, const assembly::ComplexVector< Dim > &weight)
 Point value \( Q(E) = E(x)\cdot w \) (w not conjugated).
 
Functional< 2 > fourier_coefficient_functional (Real x0, Real y0, Real period, Real ky0, int order, int num_points, const assembly::ComplexVector< 2 > &e)
 
template GoalEstimate dwr_estimate< 2 > (const Scattering< 2 > &, const ScatteringSolution< 2 > &, const Functional< 2 > &, const adaptivity::EstimatorOptions &)
 
template GoalEstimate dwr_estimate< 3 > (const Scattering< 3 > &, const ScatteringSolution< 3 > &, const Functional< 3 > &, const adaptivity::EstimatorOptions &)
 
template Functional< 2 > point_value_functional< 2 > (const Point< 2 > &, const assembly::ComplexVector< 2 > &)
 
template Functional< 3 > point_value_functional< 3 > (const Point< 3 > &, const assembly::ComplexVector< 3 > &)
 
template<int Dim>
void set_material_tensors (assembly::MaxwellForm< Dim > &form, const materials::Material &material, const pml::PmlBox< Dim > *pml)
 
std::vector< Complex > mie_cylinder_coefficients (Real k, Real radius, Real refractive_index, int max_order)
 
Real mie_cylinder_scattering_width (Real k, Real radius, Real refractive_index, int max_order=-1)
 
MieSphere mie_sphere (Real k, Real radius, Complex eps_r, Real background_index=1.0, int max_order=-1)
 
Vector conical_residual (const ConicalScattering &problem, const Vector &transverse, const Vector &longitudinal)
 
ConicalSolution conical_transported_solution (const ConicalScattering &problem, const ConicalSolution &solution)
 
ConicalTangent conical_parameter_tangent (const ConicalScattering &problem, const ConicalSolution &solution, const ConicalScattering &minus, const ConicalScattering &plus, Real step)
 
template<int Dim>
std::vector< SurfacePoint< Dim > > surface_quadrature (const mesh::Mesh< Dim > &mesh, const Surface< Dim > &surface, int order)
 
template<int Dim>
SurfaceField< Dim > discrete_field (const fespace::NedelecDofMap< Dim > &dofs, const Vector &e_h)
 Sampler of a discrete field (coefficients on the DoF map).
 
template<int Dim>
SurfaceField< Dim > analytic_field (const IncidentField< Dim > &field)
 Sampler of an analytic field.
 
template<int Dim>
SurfaceField< Dim > combined_field (const SurfaceField< Dim > &a, const SurfaceField< Dim > &b, Complex factor)
 Sampler of the sum a + factor * b.
 
template<int Dim>
Real poynting_flux (const mesh::Mesh< Dim > &mesh, const Surface< Dim > &surface, const SurfaceField< Dim > &field, Real omega, const materials::MaterialMap &materials, int order)
 
template<int Dim>
Real poynting_flux (const fespace::NedelecDofMap< Dim > &dofs, const Vector &e_h, Real omega, const materials::MaterialMap &materials, const Surface< Dim > &surface, int extra_order=2)
 Flux of a discrete field with the rule degree 2p + extra_order.
 
template<int Dim>
Real absorbed_power (const fespace::NedelecDofMap< Dim > &dofs, const Vector &e_h, Real omega, const materials::MaterialMap &materials, int extra_order=2)
 
template<int Dim>
std::vector< Real > absorbed_power_per_cell (const fespace::NedelecDofMap< Dim > &dofs, const Vector &e_h, Real omega, const materials::MaterialMap &materials, int extra_order=2)
 
Real plane_wave_intensity (Real amplitude, const materials::Material &medium)
 
template<int Dim>
CrossSections cross_sections (const Scattering< Dim > &problem, const ScatteringSolution< Dim > &solution, const Surface< Dim > &surface, Real incident_amplitude, int extra_order=2)
 
PowerBalance power_balance (const Scattering< 2 > &problem, const ScatteringSolution< 2 > &solution, const Surface< 2 > &reflection, Real period, Real kn_incident, Real incident_amplitude=1.0, const Surface< 2 > *transmission=nullptr, int extra_order=2)
 
template<int Dim>
Real absorbed_power (const Scattering< Dim > &problem, const ScatteringSolution< Dim > &solution, int extra_order=2)
 
template Real absorbed_power< 2 > (const Scattering< 2 > &, const ScatteringSolution< 2 > &, int)
 
template Real absorbed_power< 3 > (const Scattering< 3 > &, const ScatteringSolution< 3 > &, int)
 
template std::vector< SurfacePoint< 2 > > surface_quadrature< 2 > (const mesh::Mesh< 2 > &, const Surface< 2 > &, int)
 
template std::vector< SurfacePoint< 3 > > surface_quadrature< 3 > (const mesh::Mesh< 3 > &, const Surface< 3 > &, int)
 
template SurfaceField< 2 > discrete_field< 2 > (const fespace::NedelecDofMap< 2 > &, const Vector &)
 
template SurfaceField< 3 > discrete_field< 3 > (const fespace::NedelecDofMap< 3 > &, const Vector &)
 
template SurfaceField< 2 > analytic_field< 2 > (const IncidentField< 2 > &)
 
template SurfaceField< 3 > analytic_field< 3 > (const IncidentField< 3 > &)
 
template SurfaceField< 2 > combined_field< 2 > (const SurfaceField< 2 > &, const SurfaceField< 2 > &, Complex)
 
template SurfaceField< 3 > combined_field< 3 > (const SurfaceField< 3 > &, const SurfaceField< 3 > &, Complex)
 
template Real poynting_flux< 2 > (const mesh::Mesh< 2 > &, const Surface< 2 > &, const SurfaceField< 2 > &, Real, const materials::MaterialMap &, int)
 
template Real poynting_flux< 3 > (const mesh::Mesh< 3 > &, const Surface< 3 > &, const SurfaceField< 3 > &, Real, const materials::MaterialMap &, int)
 
template Real poynting_flux< 2 > (const fespace::NedelecDofMap< 2 > &, const Vector &, Real, const materials::MaterialMap &, const Surface< 2 > &, int)
 
template Real poynting_flux< 3 > (const fespace::NedelecDofMap< 3 > &, const Vector &, Real, const materials::MaterialMap &, const Surface< 3 > &, int)
 
template Real absorbed_power< 2 > (const fespace::NedelecDofMap< 2 > &, const Vector &, Real, const materials::MaterialMap &, int)
 
template Real absorbed_power< 3 > (const fespace::NedelecDofMap< 3 > &, const Vector &, Real, const materials::MaterialMap &, int)
 
template std::vector< Real > absorbed_power_per_cell< 2 > (const fespace::NedelecDofMap< 2 > &, const Vector &, Real, const materials::MaterialMap &, int)
 
template std::vector< Real > absorbed_power_per_cell< 3 > (const fespace::NedelecDofMap< 3 > &, const Vector &, Real, const materials::MaterialMap &, int)
 
template CrossSections cross_sections< 2 > (const Scattering< 2 > &, const ScatteringSolution< 2 > &, const Surface< 2 > &, Real, int)
 
template CrossSections cross_sections< 3 > (const Scattering< 3 > &, const ScatteringSolution< 3 > &, const Surface< 3 > &, Real, int)
 
template<int Dim>
std::unique_ptr< RieszPencil > resonance_pencil (const Resonance< Dim > &problem)
 
std::unique_ptr< RieszPencil > axisymmetric_pencil (const AxisymmetricResonance &problem)
 
template<int Dim>
Vector current_load (const fespace::NedelecDofMap< Dim > &dofs, const assembly::ComplexVectorField< Dim > &current, int extra_order=2)
 
template std::unique_ptr< RieszPencil > resonance_pencil< 2 > (const Resonance< 2 > &)
 
template std::unique_ptr< RieszPencil > resonance_pencil< 3 > (const Resonance< 3 > &)
 
template Vector current_load< 2 > (const fespace::NedelecDofMap< 2 > &, const assembly::ComplexVectorField< 2 > &, int)
 
template Vector current_load< 3 > (const fespace::NedelecDofMap< 3 > &, const assembly::ComplexVectorField< 3 > &, int)
 
template<int Dim>
SParameters s_parameters (const fespace::NedelecDofMap< Dim > &dofs, ScatteringSetup< Dim > setup)
 
template SParameters s_parameters< 2 > (const fespace::NedelecDofMap< 2 > &, ScatteringSetup< 2 >)
 
template SParameters s_parameters< 3 > (const fespace::NedelecDofMap< 3 > &, ScatteringSetup< 3 >)
 
template<int Dim>
Vector adjoint_solution (const Scattering< Dim > &problem, const Vector &q)
 
template<int Dim>
Vector adjoint_solution (const Scattering< Dim > &problem, const ScatteringSolution< Dim > &solution, const Vector &q)
 
template<int Dim>
Complex material_sensitivity (const Scattering< Dim > &problem, const ScatteringSolution< Dim > &solution, const Vector &adjoint, mesh::Tag tag)
 
template<int Dim>
Vector material_residual_derivative (const Scattering< Dim > &problem, const ScatteringSolution< Dim > &solution, mesh::Tag tag)
 
ConicalAdjoint conical_adjoint_solution (const ConicalScattering &problem, const Vector &q_e, const Vector &q_v)
 
ConicalAdjoint conical_adjoint_solution (const ConicalScattering &problem, const ConicalSolution &solution, const Vector &q_e, const Vector &q_v)
 
Vector conical_material_residual_derivative (const ConicalScattering &problem, const ConicalSolution &solution, mesh::Tag tag)
 
Complex conical_material_sensitivity (const ConicalScattering &problem, const ConicalSolution &solution, const ConicalAdjoint &adjoint, mesh::Tag tag)
 
template<int Dim>
Index num_geometry_nodes (const mesh::Mesh< Dim > &mesh)
 Number of geometry nodes of the mesh: vertices plus edge nodes for order 2.
 
template<int Dim>
ComplexNodeField shape_gradient (const Scattering< Dim > &problem, const ScatteringSolution< Dim > &solution, const Vector &adjoint, Real relative_step=1e-6)
 
ComplexNodeField conical_shape_gradient (const ConicalScattering &problem, const ConicalSolution &solution, const ConicalAdjoint &adjoint, Real relative_step=1e-6)
 The same for the conical solver.
 
Complex shape_sensitivity (const ComplexNodeField &gradient, const NodeField &velocity)
 
template<int Dim>
Complex shape_derivative (const Scattering< Dim > &problem, const ScatteringSolution< Dim > &solution, const Functional< Dim > &functional, const NodeField &velocity, Real relative_step=1e-6, Real functional_step=1e-6)
 
Complex conical_shape_derivative (const ConicalScattering &problem, const ConicalSolution &solution, const ConicalFunctional &functional, const NodeField &velocity, Real relative_step=1e-6, Real functional_step=1e-6)
 The same for the conical solver and a ConicalFunctional.
 
template<int Dim>
Vector shape_residual_derivative (const Scattering< Dim > &problem, const ScatteringSolution< Dim > &solution, const NodeField &velocity, Real relative_step=1e-6)
 
Vector conical_shape_residual_derivative (const ConicalScattering &problem, const ConicalSolution &solution, const NodeField &velocity, Real relative_step=1e-6)
 The same for the conical solver, stacked as (in-plane | scaled longitudinal).
 
template<int Dim>
Vector functional_shape_derivative (const fespace::NedelecDofMap< Dim > &dofs, const Functional< Dim > &functional, const NodeField &velocity, Real functional_step=1e-6)
 
Vector conical_functional_shape_derivative (const fespace::NedelecDofMap< 2 > &transverse, const fespace::DofMap< 2 > &longitudinal, const ConicalFunctional &functional, const NodeField &velocity, Real functional_step=1e-6)
 The same for a conical functional, stacked as (in-plane | scaled longitudinal).
 
template<int Dim>
NodeField region_normal_velocity (const mesh::Mesh< Dim > &mesh, mesh::Tag tag)
 
template<int Dim>
void move_nodes (mesh::Mesh< Dim > &mesh, const NodeField &velocity, Real t)
 
Real vacuum_wavenumber (Real omega) noexcept
 Vacuum wavenumber \( k_0 = \omega / c_0 \) [1/m] of the angular frequency ω [rad/s].
 
template<int Dim>
IncidentField< Dim > plane_wave (const assembly::ComplexVector< Dim > &amplitude, const Point< Dim > &wave_vector)
 
template<int Dim>
IncidentField< Dim > dipole_field (const Point< Dim > &position, const assembly::ComplexVector< Dim > &moment, Real k)
 
template<int Dim>
assembly::ComplexVectorField< Dim > gaussian_current (const Point< Dim > &position, const assembly::ComplexVector< Dim > &moment, Real sigma, Real omega)
 
template IncidentField< 2 > plane_wave< 2 > (const assembly::ComplexVector< 2 > &, const Point< 2 > &)
 
template IncidentField< 3 > plane_wave< 3 > (const assembly::ComplexVector< 3 > &, const Point< 3 > &)
 
template IncidentField< 2 > dipole_field< 2 > (const Point< 2 > &, const assembly::ComplexVector< 2 > &, Real)
 
template IncidentField< 3 > dipole_field< 3 > (const Point< 3 > &, const assembly::ComplexVector< 3 > &, Real)
 
template assembly::ComplexVectorField< 2 > gaussian_current< 2 > (const Point< 2 > &, const assembly::ComplexVector< 2 > &, Real, Real)
 
template assembly::ComplexVectorField< 3 > gaussian_current< 3 > (const Point< 3 > &, const assembly::ComplexVector< 3 > &, Real, Real)
 
template<int Dim>
std::vector< ScatteringSolution< Dim > > solve_many (const Scattering< Dim > &problem, std::span< const IncidentField< Dim > > incidents)
 Solutions for several incident fields with one factorisation.
 
template<int Dim>
std::vector< ScatteringSolution< Dim > > plane_wave_sweep (const Scattering< Dim > &problem, std::span< const Point< Dim > > wave_vectors, const std::function< assembly::ComplexVector< Dim >(const Point< Dim > &)> &polarisation)
 
template std::vector< ScatteringSolution< 2 > > solve_many< 2 > (const Scattering< 2 > &, std::span< const IncidentField< 2 > >)
 
template std::vector< ScatteringSolution< 3 > > solve_many< 3 > (const Scattering< 3 > &, std::span< const IncidentField< 3 > >)
 
template std::vector< ScatteringSolution< 2 > > plane_wave_sweep< 2 > (const Scattering< 2 > &, std::span< const Point< 2 > >, const std::function< assembly::ComplexVector< 2 >(const Point< 2 > &)> &)
 
template std::vector< ScatteringSolution< 3 > > plane_wave_sweep< 3 > (const Scattering< 3 > &, std::span< const Point< 3 > >, const std::function< assembly::ComplexVector< 3 >(const Point< 3 > &)> &)
 
template<int Dim>
Vector absorbed_power_density (const fespace::NedelecDofMap< Dim > &dofs, const Vector &e_h, Real omega, const materials::MaterialMap &materials, const fespace::DofMap< Dim > &h1)
 
template<int Dim>
Vector absorbed_power_load (const fespace::NedelecDofMap< Dim > &dofs, const Vector &e_h, Real omega, const materials::MaterialMap &materials, const fespace::DofMap< Dim > &h1, int extra_order=2)
 
template Vector absorbed_power_density< 2 > (const fespace::NedelecDofMap< 2 > &, const Vector &, Real, const materials::MaterialMap &, const fespace::DofMap< 2 > &)
 
template Vector absorbed_power_density< 3 > (const fespace::NedelecDofMap< 3 > &, const Vector &, Real, const materials::MaterialMap &, const fespace::DofMap< 3 > &)
 
template Vector absorbed_power_load< 2 > (const fespace::NedelecDofMap< 2 > &, const Vector &, Real, const materials::MaterialMap &, const fespace::DofMap< 2 > &, int)
 
template Vector absorbed_power_load< 3 > (const fespace::NedelecDofMap< 3 > &, const Vector &, Real, const materials::MaterialMap &, const fespace::DofMap< 3 > &, int)
 
TimeSignal gaussian_pulse (Real t0, Real width)
 Gaussian pulse \( g(t) = \exp(-(t - t_0)^2 / (2 w^2)) \).
 
TimeSignal modulated_gaussian (Real omega, Real t0, Real width)
 Modulated Gaussian \( g(t) = \sin(\omega (t - t_0))\,\exp(-(t - t_0)^2 / (2 w^2)) \).
 

Typedef Documentation

◆ AxisymmetricField

typedef std::function< Eigen::Matrix< Complex, 3, 1 >(const Point< 2 > &)> hpfem::physics::AxisymmetricField

m-th Fourier component of a field in the scaled components \( (E_r,\ v = -i r E_\varphi,\ E_z) \) as a function of the meridian point.

◆ ComplexNodeField

using hpfem::physics::ComplexNodeField = typedef Eigen::Matrix<Complex, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>

Complex node field, the gradient of a complex goal.

◆ ConicalField

using hpfem::physics::ConicalField = typedef std::function<ConicalVector(const Point<2>&)>

Field in the scaled components \( (E_x, E_y, v = -iE_z) \) as a function of the in-plane point; the dependence \( e^{i\beta z} \) is implied.

◆ ConicalFieldFunction

using hpfem::physics::ConicalFieldFunction = typedef std::function<ConicalVector(const Point<2>&)>

A physical 3-vector field as a function of the in-plane point.

◆ ConicalFunctional

using hpfem::physics::ConicalFunctional = typedef std::function<std::pair<Vector, Vector>(const fespace::NedelecDofMap<2>&, const fespace::DofMap<2>&)>

A linear functional of the conical field given on any pair of maps of the mesh: returns (q_e, q_v) with Q(E_h) = q_eᵀ e + q_vᵀ v.

◆ ConicalVector

using hpfem::physics::ConicalVector = typedef Eigen::Matrix<Complex, 3, 1>

◆ DisplacementField

template<int Dim>
using hpfem::physics::DisplacementField = typedef std::function<Eigen::Matrix<Complex, Dim, 1>(const Point<Dim>&)>

◆ FieldFunction

using hpfem::physics::FieldFunction = typedef std::function<assembly::ComplexVector<2>(const Point<2>&)>

A field as a function of the point, e.g. problem.total_field through a locator.

◆ FieldFunction3D

using hpfem::physics::FieldFunction3D = typedef std::function<assembly::ComplexVector<3>(const Point<3>&)>

A field of the 3D solver as a function of the point, e.g. problem.total_field through a locator.

◆ Functional

template<int Dim>
using hpfem::physics::Functional = typedef std::function<Vector(const fespace::NedelecDofMap<Dim>&)>

A linear functional given on any DoF map of the mesh: returns q with Q(E_h) = qᵀ e_h.

◆ NodeField

using hpfem::physics::NodeField = typedef Eigen::Matrix<Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>

Real node field: one row per geometry node (vertices, then the edge nodes of a second-order mesh), Dim columns.

◆ SurfaceField

template<int Dim>
using hpfem::physics::SurfaceField = typedef std::function<void(const SurfacePoint<Dim>&, assembly::ComplexVector<Dim>&, assembly::ComplexCurl<Dim>&)>

Field sampler: value and curl of a field at a surface point.

◆ TangentialField

using hpfem::physics::TangentialField = typedef Eigen::Matrix<Complex, 4, 1>

Tangential field \( (E_x, E_y, Z_0H_x, Z_0H_y) \) of a plane wave or a mode.

Enumeration Type Documentation

◆ AxisDipole

enum class hpfem::physics::AxisDipole
strong

Orientation of a dipole on the axis.

Enumerator
kAxial 
kTransverse 

◆ Formulation

enum class hpfem::physics::Formulation : std::uint8_t
strong
Enumerator
kTotalField 

unknown E; the incident field enters through boundary data / currents

kScatteredField 

unknown E − E_inc; the incident field enters as a volume source

◆ PlanePolarisation

Polarisation of a plane wave relative to its plane of incidence (the x–z plane).

Enumerator
kS 
kP 

◆ Polarisation

enum class hpfem::physics::Polarisation
strong

Polarisation of a plane wave on a layer stack: s has E perpendicular to the plane of incidence, p has E in that plane (H perpendicular). In 2D the field of Scattering<2> is the in-plane E, i.e. only p exists.

Enumerator
kS 
kP 

◆ SampledQuantity

What is sampled: the electric field, the magnetic field \( H = \nabla\times E/(i\omega \mu_0\mu_r) \) or the time-averaged Poynting vector \( \tfrac12\mathrm{Re}(E\times\bar H) \) (real, stored as complex). Components per row: Scattering<2> E 2 / H 1 (H_z) / S 2, Scattering<3> 3 / 3 / 3, ConicalScattering 3 / 3 / 3.

Enumerator
kElectric 
kMagnetic 
kPoynting 

◆ StackSide

enum class hpfem::physics::StackSide
strong

Side of a layer stack from which a plane wave comes.

Enumerator
kTop 

from the incidence medium, travelling towards −z

kBottom 

from the substrate (lossless), travelling towards +z

◆ SubstrateMode

enum class hpfem::physics::SubstrateMode
strong

Kind of a downward substrate mode: s / p of an isotropic substrate, ordinary (D ⊥ optic axis) / extraordinary of a uniaxial one, or one of the two eigenmodes of a biaxial one.

Enumerator
kS 
kP 
kOrdinary 
kExtraordinary 
kBiaxial 

Function Documentation

◆ absorbed_power() [1/2]

template<int Dim>
Real hpfem::physics::absorbed_power ( const fespace::NedelecDofMap< Dim > &  dofs,
const Vector &  e_h,
Real  omega,
const materials::MaterialMap &  materials,
int  extra_order = 2 
)

Absorbed power \( \tfrac{\omega\varepsilon_0}{2}\int_\Omega \mathrm{Im}(\varepsilon_r)|E_h|^2 \) over all cells with lossy material. [W] in 3D, [W/m] in 2D.

◆ absorbed_power() [2/2]

template<int Dim>
Real hpfem::physics::absorbed_power ( const Scattering< Dim > &  problem,
const ScatteringSolution< Dim > &  solution,
int  extra_order = 2 
)

Absorbed power of the total field of a scattering solution over all lossy cells (the unknown plus the incident or background field, so the absorption of a layered background is included). [W] in 3D, [W/m] in 2D.

◆ absorbed_power< 2 >() [1/2]

template Real hpfem::physics::absorbed_power< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const Vector &  ,
Real  ,
const materials::MaterialMap &  ,
int   
)
extern

◆ absorbed_power< 2 >() [2/2]

template Real hpfem::physics::absorbed_power< 2 > ( const Scattering< 2 > &  ,
const ScatteringSolution< 2 > &  ,
int   
)
extern

◆ absorbed_power< 3 >() [1/2]

template Real hpfem::physics::absorbed_power< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const Vector &  ,
Real  ,
const materials::MaterialMap &  ,
int   
)
extern

◆ absorbed_power< 3 >() [2/2]

template Real hpfem::physics::absorbed_power< 3 > ( const Scattering< 3 > &  ,
const ScatteringSolution< 3 > &  ,
int   
)
extern

◆ absorbed_power_by_tag() [1/2]

AbsorbedPower hpfem::physics::absorbed_power_by_tag ( const ConicalScattering &  problem,
const ConicalSolution &  solution,
int  extra_order = 2 
)

The same for the conical solver (|E|^2 = |E_x|^2 + |E_y|^2 + |E_z|^2 of the physical field; the degree is taken from the higher of the two spaces).

◆ absorbed_power_by_tag() [2/2]

template<int Dim>
AbsorbedPower hpfem::physics::absorbed_power_by_tag ( const Scattering< Dim > &  problem,
const ScatteringSolution< Dim > &  solution,
int  extra_order = 2 
)

Absorbed power of the total field of a scattering solution, with rules of degree 2p + extra_order (the field is a polynomial of degree p; the extra order resolves the incident field and curved cells).

◆ absorbed_power_by_tag< 2 >()

template AbsorbedPower hpfem::physics::absorbed_power_by_tag< 2 > ( const Scattering< 2 > &  ,
const ScatteringSolution< 2 > &  ,
int   
)
extern

◆ absorbed_power_by_tag< 3 >()

template AbsorbedPower hpfem::physics::absorbed_power_by_tag< 3 > ( const Scattering< 3 > &  ,
const ScatteringSolution< 3 > &  ,
int   
)
extern

◆ absorbed_power_density()

template<int Dim>
Vector hpfem::physics::absorbed_power_density ( const fespace::NedelecDofMap< Dim > &  dofs,
const Vector &  e_h,
Real  omega,
const materials::MaterialMap &  materials,
const fespace::DofMap< Dim > &  h1 
)

Absorbed power density of the discrete field e_h (coefficients on dofs) as the hierarchical interpolant on the H1 map h1 of the same mesh: per cell \( q = \tfrac{\omega\varepsilon_0}{2}\,\mathrm{Im}(\varepsilon_r)\,|E_h|^2 \) with the material of the cell. Lossless cells contribute zero; the interpolant is discontinuous in its derivative at material interfaces, as the density is.

Exceptions
InvalidArgumentif the maps live on different meshes or e_h does not match.

◆ absorbed_power_density< 2 >()

template Vector hpfem::physics::absorbed_power_density< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const Vector &  ,
Real  ,
const materials::MaterialMap &  ,
const fespace::DofMap< 2 > &   
)
extern

◆ absorbed_power_density< 3 >()

template Vector hpfem::physics::absorbed_power_density< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const Vector &  ,
Real  ,
const materials::MaterialMap &  ,
const fespace::DofMap< 3 > &   
)
extern

◆ absorbed_power_load()

template<int Dim>
Vector hpfem::physics::absorbed_power_load ( const fespace::NedelecDofMap< Dim > &  dofs,
const Vector &  e_h,
Real  omega,
const materials::MaterialMap &  materials,
const fespace::DofMap< Dim > &  h1,
int  extra_order = 2 
)

Load vector of the absorbed power on the H1 map, \( b_i = \int \phi_i\, q \) with the density evaluated cell by cell at the quadrature points (exact for the polynomial \( |E_h|^2 \) on affine cells, discontinuities at material interfaces kept); the sum of its vertex entries (the constant 1 of the hierarchical basis) is the absorbed power. The right-hand side of Thermal::solve_load.

Exceptions
InvalidArgumentif the maps live on different meshes or e_h does not match.

◆ absorbed_power_load< 2 >()

template Vector hpfem::physics::absorbed_power_load< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const Vector &  ,
Real  ,
const materials::MaterialMap &  ,
const fespace::DofMap< 2 > &  ,
int   
)
extern

◆ absorbed_power_load< 3 >()

template Vector hpfem::physics::absorbed_power_load< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const Vector &  ,
Real  ,
const materials::MaterialMap &  ,
const fespace::DofMap< 3 > &  ,
int   
)
extern

◆ absorbed_power_per_cell()

template<int Dim>
std::vector< Real > hpfem::physics::absorbed_power_per_cell ( const fespace::NedelecDofMap< Dim > &  dofs,
const Vector &  e_h,
Real  omega,
const materials::MaterialMap &  materials,
int  extra_order = 2 
)

The same cell by cell: the absorbed power of every cell (0 in lossless cells), e.g. for carrier-generation profiles (divide by the photon energy and the cell volume).

◆ absorbed_power_per_cell< 2 >()

template std::vector< Real > hpfem::physics::absorbed_power_per_cell< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const Vector &  ,
Real  ,
const materials::MaterialMap &  ,
int   
)
extern

◆ absorbed_power_per_cell< 3 >()

template std::vector< Real > hpfem::physics::absorbed_power_per_cell< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const Vector &  ,
Real  ,
const materials::MaterialMap &  ,
int   
)
extern

◆ absorption_density() [1/2]

AbsorptionDensity< 2 > hpfem::physics::absorption_density ( const ConicalScattering &  problem,
const ConicalSolution &  solution,
int  extra_order = 2 
)

The same for the conical solver.

◆ absorption_density() [2/2]

template<int Dim>
AbsorptionDensity< Dim > hpfem::physics::absorption_density ( const Scattering< Dim > &  problem,
const ScatteringSolution< Dim > &  solution,
int  extra_order = 2 
)

The Joule heating at the quadrature points of the lossy cells.

◆ absorption_density< 2 >()

template AbsorptionDensity< 2 > hpfem::physics::absorption_density< 2 > ( const Scattering< 2 > &  ,
const ScatteringSolution< 2 > &  ,
int   
)
extern

◆ absorption_density< 3 >()

template AbsorptionDensity< 3 > hpfem::physics::absorption_density< 3 > ( const Scattering< 3 > &  ,
const ScatteringSolution< 3 > &  ,
int   
)
extern

◆ adjoint_solution() [1/2]

template<int Dim>
Vector hpfem::physics::adjoint_solution ( const Scattering< Dim > &  problem,
const ScatteringSolution< Dim > &  solution,
const Vector &  q 
)

The same on the factorisation the solve kept (ScatteringSetup::keep_factorisation): one transposed solve (KeptFactorisation::solve_adjoint) instead of an assembly and a factorisation, the exact transpose of the system that was solved (ports, condensation and constraints included). Falls back to adjoint_solution(problem, q) when the solution carries no factorisation.

Exceptions
InvalidArgumentif q or the kept factorisation do not match the DoF map.

◆ adjoint_solution() [2/2]

template<int Dim>
Vector hpfem::physics::adjoint_solution ( const Scattering< Dim > &  problem,
const Vector &  q 
)

Adjoint solution on the primal space of the problem for the functional vector q ( \( Q(e) = q^\top e \) on problem.dofs()): homogeneous Dirichlet data on the PEC and incident facets, hanging-node and Bloch constraints in the test space. Full-size vector.

Exceptions
InvalidArgumentif q does not match the DoF map.

◆ analytic_field()

template<int Dim>
SurfaceField< Dim > hpfem::physics::analytic_field ( const IncidentField< Dim > &  field)

Sampler of an analytic field.

◆ analytic_field< 2 >()

template SurfaceField< 2 > hpfem::physics::analytic_field< 2 > ( const IncidentField< 2 > &  )
extern

◆ analytic_field< 3 >()

template SurfaceField< 3 > hpfem::physics::analytic_field< 3 > ( const IncidentField< 3 > &  )
extern

◆ anisotropic_conical_mode_wave()

AnisotropicConicalWave hpfem::physics::anisotropic_conical_mode_wave ( const AnisotropicStack &  stack,
Real  k0,
Real  kx,
Real  beta,
int  mode,
Real  amplitude = 1.0 
)

The downward mode mode of a (crystal) incidence medium of the laboratory-frame stack at the in-plane wavevector (kx, β) [1/m] in the solver frame of the conical solver, as anisotropic_conical_wave (AnisotropicStack::mode_wave; M19 S7e). wave.ky is the normal wavenumber −Re k_z of the mode (> 0); the powers are left zero.

Exceptions
asAnisotropicStack::mode_wave.

◆ anisotropic_conical_wave()

AnisotropicConicalWave hpfem::physics::anisotropic_conical_wave ( const AnisotropicStack &  stack,
Real  k0,
Real  angle,
Real  azimuth,
Polarisation  pol,
Real  amplitude = 1.0 
)

The plane wave of an AnisotropicStack given in the laboratory frame (x across the lines, y along them, z the normal) in the conical solver frame (x across, y the normal, z along the lines): the solver point (x, y) is the laboratory point (x, 0, y), the field \( E_c = PE_{\text{lab}} \) in scaled components, the physical curl \( \nabla\times E_c = \det(P)\,P\,\nabla\times E_{\text{lab}} = -P\,\nabla\times E_{\text{lab}} \) (P is a reflection), β = k_y of the laboratory frame. The angles and the s / p vectors are those of layered_conical_wave (P maps one set onto the other). R and T are those of pol.

Exceptions
asAnisotropicStack::plane_wave.

◆ axial_plane_wave()

AxisymmetricField hpfem::physics::axial_plane_wave ( Complex  amplitude,
Real  k,
int  m 
)

The x-polarised plane wave \( E_0\,\hat x\,e^{ikz} \) travelling along the axis has the azimuthal orders m = ±1 only: \( (E_r, E_\varphi, E_z) = \tfrac{E_0}{2}(1,\ \pm i,\ 0)e^{ikz} \), i.e. \( (E_r, v, E_z) = \tfrac{E_0}{2}(1,\ \pm r,\ 0)e^{ikz} \). The scattered power of the full wave is the sum over both orders (equal by symmetry).

Exceptions
InvalidArgumentfor m ∉ {−1, 1}.

◆ axisymmetric_absorbed_power()

AbsorbedPower hpfem::physics::axisymmetric_absorbed_power ( const fespace::NedelecDofMap< 2 > &  meridian,
const fespace::DofMap< 2 > &  azimuthal,
const Vector &  meridian_coefficients,
const Vector &  azimuthal_coefficients,
int  azimuthal_order,
Real  omega,
const materials::MaterialMap &  materials,
const AxisymmetricField &  added = {},
const std::optional< pml::PmlBox< 2 > > &  pml = std::nullopt,
int  extra_order = 4 
)

Absorbed power of an order-m field (ADR-0014 §4): the Joule heating \( \tfrac{\omega\varepsilon_0}{2}\,\mathrm{Im}\,\varepsilon_r\,|E_m|^2 \) integrated with the weight 2πr over every lossy cell, \( |E_m|^2 = |E_r|^2 + |E_\varphi|^2 + |E_z|^2 \) with \( E_\varphi = i v / r \); the orders are orthogonal in φ, so the power of a field with several orders is the sum over m (per cell as well). added (scaled components) is added at every quadrature point: the incident or stack field for the total field. Cells whose centroid lies in pml are left out. Rules of degree 2p + extra_order. [W].

Exceptions
InvalidArgumentif the coefficient vectors do not match the maps.

◆ axisymmetric_current_load()

Vector hpfem::physics::axisymmetric_current_load ( const fespace::NedelecDofMap< 2 > &  meridian,
const fespace::DofMap< 2 > &  azimuthal,
int  m,
const AxisymmetricField &  current,
int  extra_order = 4 
)

Load \( b_J \) of an order-m current density \( (J_r,\ -i r J_\varphi,\ J_z) \) in the scaled components on the block space (e, v), without the factor \( i\omega\mu_0 \) and without the azimuthal factor 2π (the convention of the block forms): the source of a RieszProjection built on axisymmetric_pencil. axisymmetric_gaussian_dipole divided by \( i\omega\mu_0 \) gives such a density.

◆ axisymmetric_disc_flux()

AxisymmetricDiscFlux hpfem::physics::axisymmetric_disc_flux ( const fespace::NedelecDofMap< 2 > &  meridian,
const fespace::DofMap< 2 > &  azimuthal,
const Vector &  meridian_coefficients,
const Vector &  azimuthal_coefficients,
int  azimuthal_order,
Real  omega,
const materials::MaterialMap &  materials,
Real  z,
Real  radius,
int  direction = -1,
const AxisymmetricField &  added_value = {},
const AxisymmetricField &  added_curl = {},
int  order = 8 
)

The disc must lie on a mesh line y = z and end at a mesh vertex r = radius.

Exceptions
InvalidArgumentas axisymmetric_poynting_flux, for a radius ≤ 0, a direction other than ±1, or a disc that is not covered by facets of the mesh line.

◆ axisymmetric_dof_sets()

AxisymmetricDofSets hpfem::physics::axisymmetric_dof_sets ( const fespace::NedelecDofMap< 2 > &  meridian,
const fespace::DofMap< 2 > &  azimuthal,
const std::vector< mesh::Tag > &  pec_tags,
mesh::Tag  axis_tag,
int  azimuthal_order 
)

Index sets of order m: PEC fixes the Nédélec trace and v; the axis fixes v for every m and the tangential Nédélec DoFs (E_z) for m ≠ 0; ψ vanishes on PEC and, for m ≠ 0, on the axis.

Exceptions
InvalidArgumentif the maps differ in mesh or order or the axis tag has no facets.

◆ axisymmetric_error()

AxisymmetricError hpfem::physics::axisymmetric_error ( const fespace::NedelecDofMap< 2 > &  meridian,
const fespace::DofMap< 2 > &  azimuthal,
const Vector &  meridian_coefficients,
const Vector &  azimuthal_coefficients,
int  azimuthal_order,
const AxisymmetricField &  exact,
const AxisymmetricField &  exact_curl = {},
int  extra_order = 4 
)

Error of the coefficients meridian (E_r, E_z) and azimuthal (v) of order m against the exact field exact in the scaled components (E_r, v = −i r E_φ, E_z) and its cylindrical curl exact_curl = ((∇×E)_r, (∇×E)_φ, (∇×E)_z); an empty exact_curl means zero. The discrete curl of the mode is \( (\tfrac{i}{r}(mE_z - \partial_z v),\ \partial_zE_r - \partial_rE_z,\ \tfrac{i}{r}(\partial_rv - mE_r)) \). Quadrature of degree 2p + extra_order (+2 on cells touching the axis and on curved cells).

Exceptions
InvalidArgumentif the maps differ in mesh or a vector does not match its map.

◆ axisymmetric_far_field()

AxisymmetricFarField hpfem::physics::axisymmetric_far_field ( const fespace::NedelecDofMap< 2 > &  meridian,
const fespace::DofMap< 2 > &  azimuthal,
const Vector &  meridian_coefficients,
const Vector &  azimuthal_coefficients,
int  azimuthal_order,
Real  omega,
const materials::MaterialMap &  materials,
const Surface< 2 > &  surface,
const std::vector< Real > &  theta,
int  order = 8 
)

Near-to-far-field transform of the order-m field on a closed surface of revolution in the homogeneous background (same formula as FarField<3>: \( F = \frac{ik}{4\pi}[Z N_t - \hat r\times L] \) with \( N = \int J e^{-ik\hat r\cdot x'} \), \( L = \int M e^{-ik\hat r\cdot x'} \), \( J = n\times H \), \( M = -n\times E \)); the azimuthal integration is done analytically with the Bessel functions \( J_m, J_{m\pm1}(k\rho\sin\theta) \), so only the meridian curve is integrated numerically. background gives k and Z; the surface must enclose every source and scatterer and lie in that medium.

Exceptions
InvalidArgumentif the coefficient vectors do not match the maps.

◆ axisymmetric_fields_at()

Eigen::Matrix< Complex, Eigen::Dynamic, 3 > hpfem::physics::axisymmetric_fields_at ( const fespace::NedelecDofMap< 2 > &  meridian,
const fespace::DofMap< 2 > &  azimuthal,
const Vector &  meridian_coefficients,
const Vector &  azimuthal_coefficients,
const Eigen::Matrix< Real, Eigen::Dynamic, 2 > &  points 
)

Physical cylindrical components (E_r, E_φ, E_z) of an order-m field with the given coefficients (the unknown of AxisymmetricScattering::solve: the scattered field with an incident field, the total field with a current) at the physical points (r, z), one per row of points (r ≥ 0); the azimuthal factor \( e^{im\varphi} \) is left out. \( E_\varphi = iv/r \); on the axis (r below 1e-9 of the cell size h) it is taken at r = 1e-9 h, the limit of v / r. Rows outside the mesh are NaN. Field maps on grids (hpfem.dataports, issue #214).

Exceptions
InvalidArgumentif the coefficient vectors do not match the maps or a point has r < 0.

◆ axisymmetric_flux_channels()

AxisymmetricFluxChannels hpfem::physics::axisymmetric_flux_channels ( const fespace::NedelecDofMap< 2 > &  meridian,
const fespace::DofMap< 2 > &  azimuthal,
const Vector &  meridian_coefficients,
const Vector &  azimuthal_coefficients,
int  azimuthal_order,
Real  omega,
const materials::MaterialMap &  materials,
const Surface< 2 > &  surface,
const LayerStack< 3 > &  stack,
int  order = 8,
const AxisymmetricField &  added_value = {},
const AxisymmetricField &  added_curl = {} 
)

axisymmetric_poynting_flux split into the channels of stack (arguments as there).

Exceptions
InvalidArgumentas axisymmetric_poynting_flux.

◆ axisymmetric_gaussian_dipole()

AxisymmetricField hpfem::physics::axisymmetric_gaussian_dipole ( Real  position,
Complex  moment,
AxisDipole  orientation,
Real  sigma,
Real  omega,
int  m 
)

Volume source \( f = i\omega\mu_0 J \) of a point dipole on the axis at z = position with current moment moment [A m], smeared over the normalised 3D Gaussian \( g = \exp(-(r^2 + (z - z_0)^2) / 2\sigma^2) / ((2\pi)^{3/2}\sigma^3) \), in the scaled components of order m: the axial dipole (moment along z) has m = 0 only, \( (f_r, f_v, f_z) = i\omega\mu_0 p\,g\,(0, 0, 1) \); the transverse dipole (moment along x) has m = ±1, \( (f_r, f_v, f_z) = i\omega\mu_0 \tfrac{p}{2} g\,(1, \pm r, 0) \). The smearing lowers the radiated power of the free dipole by \( e^{-k^2\sigma^2} \) (Gaussian form factor), exactly for the total power in a lossless medium. Total-field formulation (AxisymmetricScatteringSetup::current).

Exceptions
InvalidArgumentfor σ ≤ 0 or an order the orientation does not radiate.

◆ axisymmetric_layered_far_field()

AxisymmetricLayeredFarField hpfem::physics::axisymmetric_layered_far_field ( const fespace::NedelecDofMap< 2 > &  meridian,
const fespace::DofMap< 2 > &  azimuthal,
const Vector &  meridian_coefficients,
const Vector &  azimuthal_coefficients,
int  azimuthal_order,
Real  omega,
const materials::MaterialMap &  materials,
const Surface< 2 > &  surface,
const LayerStack< 3 > &  stack,
const std::vector< Real > &  theta_up,
const std::vector< Real > &  theta_down,
int  order = 8 
)

Far field by reciprocity (ADR-0014 §4, M18 S3): with the equivalent currents of the field on a closed surface S of revolution around every source and scatterer, the amplitude \( E \approx F(\theta)\,e^{im\varphi}\,e^{iknR}/R \) in the direction r̂ of either half-space is the overlap with the layered plane wave arriving from r̂ (incident amplitude 1, the stack's reflections included): \( F\cdot\hat e = \frac{i\omega\mu_0}{4\pi}\oint_S (E\times H_{pw} - E_{pw}\times H)\cdot n\,dS \), with \( \hat e = \hat\theta \) for the p and \( -\hat\varphi \) for the s wave. The φ integral leaves the order −m of the wave (layered_axisymmetric_wave at θ from the normal, from the top for the cover, from the bottom for the substrate) with the factor \( 2\pi(-1)^m \) at φ = 0, the phase is referred to the origin. A homogeneous stack gives axisymmetric_far_field. Sources may lie anywhere inside S (scattered field of a body on the stack, or the total field of a dipole if S lies in one layer); S may cross the layers, lossy ones included (reciprocity holds in any reciprocal medium; outside S only the stack). The power into the half-spaces is up.radiated_power() and down.radiated_power() (sampled up to grazing); in a lossless stack the scattered power minus both is guided along the layers. theta_up ⊂ [0, π/2), theta_down ⊂ (π/2, π].

Exceptions
InvalidArgumentif the coefficient vectors do not match the maps, an angle lies in the wrong half-space or at grazing, or theta_down is given for a lossy substrate.

◆ axisymmetric_offaxis_gaussian_dipole()

AxisymmetricField hpfem::physics::axisymmetric_offaxis_gaussian_dipole ( Real  radius,
Real  position,
const Eigen::Matrix< Complex, 3, 1 > &  moment,
Real  sigma,
Real  omega,
int  m 
)

Volume source \( f = i\omega\mu_0 J \) of order m of a point dipole off the axis, at the radius radius = ρ0 ≥ 0, azimuth φ = 0 and height position = z0, with the Cartesian current moment moment = (p_x, p_y, p_z) [A m] at that point, smeared over the normalised 3D Gaussian of axisymmetric_gaussian_dipole centred there (issue #214). With \( \kappa = r\rho_0/\sigma^2 \), \( \tilde I_n = e^{-\kappa}I_n(\kappa) \) and \( G = \frac{i\omega\mu_0}{(2\pi)^{3/2}\sigma^3} e^{-((r-\rho_0)^2 + (z-z_0)^2)/2\sigma^2} \) the order-m components \( \frac{1}{2\pi}\int f e^{-im\varphi} d\varphi \) are

\[ f_r = G\left[p_x \tfrac{\tilde I_{m-1} + \tilde I_{m+1}}{2} + p_y \tfrac{\tilde I_{m-1} - \tilde I_{m+1}}{2i}\right],\quad f_\varphi = G\left[-p_x \tfrac{\tilde I_{m-1} - \tilde I_{m+1}}{2i} + p_y \tfrac{\tilde I_{m-1} + \tilde I_{m+1}}{2}\right],\quad f_z = G\,p_z \tilde I_m \]

in the scaled components (f_r, f_v = −i r f_φ, f_z); the orders sum to the 3D Gaussian. The source is cut to zero beyond 10σ from (ρ0, z0) in the meridian plane (below e^{-50} of the peak), so assembling it away from the emitter costs nothing. ρ0 = 0 gives axisymmetric_gaussian_dipole (m = 0 for p_z, m = ±1 for p_x). Parity under the mirror φ → −φ: the sources of p_x and p_z satisfy \( f_{-m} = D f_m \), that of p_y \( f_{-m} = -D f_m \) (D negates f_v), so with AxisymmetricScattering::mirrored the orders m ≥ 0 determine all. The order content falls off as \( e^{-m^2\sigma^2/2\rho_0^2} \).

Exceptions
InvalidArgumentfor σ ≤ 0 or ρ0 < 0.

◆ axisymmetric_pencil()

std::unique_ptr< RieszPencil > hpfem::physics::axisymmetric_pencil ( const AxisymmetricResonance &  problem)

The order-m block pencil of an AxisymmetricResonance problem (full vectors are the block vectors (e, v) of the meridian and azimuthal maps).

◆ axisymmetric_permittivity()

Eigen::Matrix< Complex, 3, 1 > hpfem::physics::axisymmetric_permittivity ( const materials::Material &  material)

Diagonal permittivity (ε_r, ε_φ, ε_z) of a material in the cylindrical components of the axisymmetric solver (ADR-0015 §8, M19 S6): an isotropic ε gives (ε, ε, ε); a tensor material is read in (r, φ, z) components and must be diagonal there. A uniaxial crystal with its optic axis along the symmetry axis z (ε_xx = ε_yy) means the same in both frames; ε_xx ≠ ε_yy is a radially / azimuthally anisotropic medium (e.g. a radially uniaxial shell), which no constant Cartesian tensor describes. Convention exp(−iωt), Im ε ≥ 0 for loss.

Exceptions
AnisotropicUnsupportedfor off-diagonal entries (an optic axis tilted against z, or a helical anisotropy, breaks the rotational symmetry) and for a tensor permeability.

◆ axisymmetric_pml_form()

assembly::AxisymmetricForm hpfem::physics::axisymmetric_pml_form ( const pml::PmlBox< 2 > &  box,
const materials::Material &  material,
std::optional< int >  quadrature_order = std::nullopt 
)

Cylindrical PML as material (Teixeira–Chew): with the stretch factors \( s_r, s_z \) of the box and \( s_\varphi = \tilde r / r \) the tensor \( \Lambda = \mathrm{diag}(s_\varphi s_z / s_r,\ s_r s_z / s_\varphi,\ s_r s_\varphi / s_z) \) gives \( \tilde\varepsilon = \varepsilon_r\Lambda \) and \( \tilde\mu^{-1} = \mu_r^{-1}\Lambda^{-1} \) (identity inside the box). The box must have no layer on the axis side (x-min thickness 0).

◆ axisymmetric_poynting_flux()

Real hpfem::physics::axisymmetric_poynting_flux ( const fespace::NedelecDofMap< 2 > &  meridian,
const fespace::DofMap< 2 > &  azimuthal,
const Vector &  meridian_coefficients,
const Vector &  azimuthal_coefficients,
int  azimuthal_order,
Real  omega,
const materials::MaterialMap &  materials,
const Surface< 2 > &  surface,
int  order = 8,
const AxisymmetricField &  added_value = {},
const AxisymmetricField &  added_curl = {} 
)

Time-averaged power [W] of the order-m field \( (e, v) \) through the surface of revolution generated by the meridian surface: \( \int 2\pi r\,\tfrac12\mathrm{Re}(E\times H^*)\cdot n\,ds \) with \( H = \nabla\times E / (i\omega\mu) \) from the cylindrical curl of the mode and μ of the inside cell. Orders do not mix, so the power of a field with several orders is the sum over m. added_value / added_curl (both or neither): an analytic order-m field in the scaled components and its cylindrical curl added at every quadrature point, e.g. the stack field of layered_axisymmetric_wave for the flux of the total field (ADR-0009 §5).

Exceptions
InvalidArgumentif the coefficient vectors do not match the maps or only one of added_value and added_curl is given.

◆ band_permeability_derivative()

template<int Dim>
BandDerivative hpfem::physics::band_permeability_derivative ( const BandStructure< Dim > &  problem,
const Bands< Dim > &  bands,
mesh::Tag  tag,
Real  degeneracy_tolerance = 1e-6 
)

Derivative of the bands with respect to the relative permeability \( \mu_r \) of the cells with tag.

Exceptions
InvalidArgumentas band_permittivity_derivative.

◆ band_permeability_derivative< 2 >()

template BandDerivative hpfem::physics::band_permeability_derivative< 2 > ( const BandStructure< 2 > &  ,
const Bands< 2 > &  ,
mesh::Tag  ,
Real   
)
extern

◆ band_permeability_derivative< 3 >()

template BandDerivative hpfem::physics::band_permeability_derivative< 3 > ( const BandStructure< 3 > &  ,
const Bands< 3 > &  ,
mesh::Tag  ,
Real   
)
extern

◆ band_permittivity_derivative()

template<int Dim>
BandDerivative hpfem::physics::band_permittivity_derivative ( const BandStructure< Dim > &  problem,
const Bands< Dim > &  bands,
mesh::Tag  tag,
Real  degeneracy_tolerance = 1e-6 
)

Derivative of the bands with respect to the relative permittivity \( \varepsilon_r \) of the cells with tag (real, the bands are lossless).

Exceptions
InvalidArgumentif bands carries no modes (keep_modes), the modes do not match the problem, no cell carries the tag or the tolerance is negative.

◆ band_permittivity_derivative< 2 >()

template BandDerivative hpfem::physics::band_permittivity_derivative< 2 > ( const BandStructure< 2 > &  ,
const Bands< 2 > &  ,
mesh::Tag  ,
Real   
)
extern

◆ band_permittivity_derivative< 3 >()

template BandDerivative hpfem::physics::band_permittivity_derivative< 3 > ( const BandStructure< 3 > &  ,
const Bands< 3 > &  ,
mesh::Tag  ,
Real   
)
extern

◆ band_shape_derivative()

template<int Dim>
BandDerivative hpfem::physics::band_shape_derivative ( const BandStructure< Dim > &  problem,
const Bands< Dim > &  bands,
const NodeField &  velocity,
Real  relative_step = 1e-6,
Real  degeneracy_tolerance = 1e-6 
)

Derivative of the bands with respect to a geometry parameter with mesh velocity \( V = \partial x/\partial p \) (one row per geometry node, num_geometry_nodes), e.g. region_normal_velocity for the radius of a rod. The element matrices of every cell with a moving node are differenced along V (largest node displacement relative_step times the cell diameter).

Exceptions
InvalidArgumentas band_permittivity_derivative, if V does not match the geometry nodes, V does not vanish on the periodic faces (the master and slave facets of the lattice), the step is not positive or a perturbed cell degenerates.

◆ band_shape_derivative< 2 >()

template BandDerivative hpfem::physics::band_shape_derivative< 2 > ( const BandStructure< 2 > &  ,
const Bands< 2 > &  ,
const NodeField &  ,
Real  ,
Real   
)
extern

◆ band_shape_derivative< 3 >()

template BandDerivative hpfem::physics::band_shape_derivative< 3 > ( const BandStructure< 3 > &  ,
const Bands< 3 > &  ,
const NodeField &  ,
Real  ,
Real   
)
extern

◆ band_wave_vector_derivative()

template<int Dim>
BandDerivative hpfem::physics::band_wave_vector_derivative ( const BandStructure< Dim > &  problem,
const Bands< Dim > &  bands,
const Point< Dim > &  direction,
Real  degeneracy_tolerance = 1e-6 
)

Directional derivative of the bands along the wave vector, \( d/dt\,k_{0,n}(k + t\,d) \) at t = 0 (linear in d; \( dk_0/dt \) is dimensionless for a d in 1/m, angular_frequency is then the group velocity along d in m/s). Branch slopes through a degenerate point (folded bands, high-symmetry points) are the cluster values.

Exceptions
InvalidArgumentas band_permittivity_derivative (without the tag) or for d = 0.

◆ band_wave_vector_derivative< 2 >()

template BandDerivative hpfem::physics::band_wave_vector_derivative< 2 > ( const BandStructure< 2 > &  ,
const Bands< 2 > &  ,
const Point< 2 > &  ,
Real   
)
extern

◆ band_wave_vector_derivative< 3 >()

template BandDerivative hpfem::physics::band_wave_vector_derivative< 3 > ( const BandStructure< 3 > &  ,
const Bands< 3 > &  ,
const Point< 3 > &  ,
Real   
)
extern

◆ combined_field()

template<int Dim>
SurfaceField< Dim > hpfem::physics::combined_field ( const SurfaceField< Dim > &  a,
const SurfaceField< Dim > &  b,
Complex  factor 
)

Sampler of the sum a + factor * b.

◆ combined_field< 2 >()

template SurfaceField< 2 > hpfem::physics::combined_field< 2 > ( const SurfaceField< 2 > &  ,
const SurfaceField< 2 > &  ,
Complex   
)
extern

◆ combined_field< 3 >()

template SurfaceField< 3 > hpfem::physics::combined_field< 3 > ( const SurfaceField< 3 > &  ,
const SurfaceField< 3 > &  ,
Complex   
)
extern

◆ conical_adjoint_solution() [1/2]

ConicalAdjoint hpfem::physics::conical_adjoint_solution ( const ConicalScattering &  problem,
const ConicalSolution &  solution,
const Vector &  q_e,
const Vector &  q_v 
)

The same on the factorisation the solve kept (ConicalScatteringSetup::keep_factorisation, also on the scalar E_z path), falling back to the assembling version without one.

Exceptions
InvalidArgumentif the vectors or the kept factorisation do not match the maps.

◆ conical_adjoint_solution() [2/2]

ConicalAdjoint hpfem::physics::conical_adjoint_solution ( const ConicalScattering &  problem,
const Vector &  q_e,
const Vector &  q_v 
)

Adjoint solution of the conical problem for the functional pair \( (q_e, q_v) \) of a ConicalFunctional evaluated on the problem's maps.

Exceptions
InvalidArgumentif the vectors do not match the maps.

◆ conical_cross_sections()

CrossSections hpfem::physics::conical_cross_sections ( const ConicalScattering &  problem,
const ConicalSolution &  solution,
const Surface< 2 > &  surface,
Real  incident_amplitude = 1.0,
int  extra_order = 2 
)

Cross-sections per unit length [m] of an isolated scatterer (scattered-field formulation in a homogeneous background): \( \sigma_{sca} \) from the flux of the unknown (scattered) field outwards through the closed surface (normal outwards, e.g. Surface::around_cells of a tagged region around the scatterer in the background), \( \sigma_{abs} \) from the volumetric absorbed power of the total field, \( \sigma_{ext} = \sigma_{sca} + \sigma_{abs} \), all divided by the incident intensity \( \tfrac12 n|E_0|^2/Z_0 \) of the lossless background.

Exceptions
InvalidArgumentwithout an incident field or with a lossy background.

◆ conical_curl_of()

ConicalVector hpfem::physics::conical_curl_of ( const ConicalFieldFunction &  field,
const Point< 2 > &  x,
Real  beta,
Real  step 
)

Curl of a physical 2.5D field by central differences of the in-plane derivatives (step, in metres) with \( \partial_z = i\beta \): \( (\partial_yE_z - i\beta E_y,\ i\beta E_x - \partial_xE_z,\ \partial_xE_y - \partial_yE_x) \).

◆ conical_diffraction_efficiencies()

std::vector< ConicalDiffractionOrder > hpfem::physics::conical_diffraction_efficiencies ( const std::vector< ConicalVector > &  coefficients,
Real  k0,
Real  index_line,
Real  period,
Real  ky0,
Real  beta,
Real  kx_incident,
Real  incident_amplitude 
)

Efficiencies \( \eta_m = \mathrm{Re}(k_{x,m})|A_m|^2 / (k_x^{inc}|E_0|^2) \) of the orders in a medium of real index index_line on the line (equal permeability on both sides), for the incident plane wave of amplitude |E0| with normal wavenumber kx_incident > 0 and the longitudinal wavenumber β.

◆ conical_diffraction_orders()

std::vector< ConicalDiffractionOrder > hpfem::physics::conical_diffraction_orders ( const ConicalFieldFunction &  field,
const OrderLine &  line,
Real  k0,
Real  index_line,
Real  kt0,
Real  beta,
Real  kn_incident,
const ConicalFieldFunction &  incident = {},
int  max_order = 3,
int  num_points = 0,
Real  incident_amplitude = 1.0 
)

Diffraction orders of field - incident (or of field when incident is empty) on the line, as diffraction_orders for the in-plane solver: \( A_m = \frac1a\int_0^a (E - E^{inc})(o + t\hat t)e^{-ik_{t,m}t}dt \) with the composite Gauss–Legendre rule of conical_fourier_coefficients (num_points 0: 16 per order, at least 64), the normal wavenumber \( k_{n,m} = \sqrt{k_0^2n^2 - k_{t,m}^2 - \beta^2} \) in the medium of the line and the efficiency \( \mathrm{Re}(k_{n,m})|A_m|^2/(k_n^{inc}|E_0|^2) \). The amplitudes are in the solver frame (to_literature_frame converts them).

Exceptions
InvalidArgumentfor a degenerate line or non-positive parameters.

◆ conical_dipole_power_matrix()

Eigen::Matrix3cd hpfem::physics::conical_dipole_power_matrix ( const ConicalScattering &  problem,
const std::vector< ConicalSolution > &  unit_responses,
const Point< 2 > &  position,
Real  sigma,
int  extra_order = 4 
)

The power matrix of the Gaussian dipole in a cell problem: with the responses \( E_j \) to the unit moments \( \hat e_x, \hat e_y, \hat e_z \), \( A_{ij} = -\tfrac12\int g_2\,e^{-\sigma^2\beta^2/2}\,(E_j)_i\,dA \), so that the power delivered by any moment p is \( P_{cell}(p) = \mathrm{Re}(p^H A\,p) \) [W/m per unit β].

Exceptions
InvalidArgumentunless unit_responses holds the three unit-moment responses.

◆ conical_dipole_responses()

std::vector< ConicalSolution > hpfem::physics::conical_dipole_responses ( const ConicalScattering &  problem,
const ConicalSolution &  solution,
const Point< 2 > &  position,
Real  sigma,
const Matrix &  moments 
)

Responses of a cell problem to several Gaussian dipoles on the factorisation its solve kept (ConicalScatteringSetup::keep_factorisation, M16 S1): for each row of moments (k × 3, physical current moments [A m]) the solution of the same cell problem (kx, β, materials, PML) with the source conical_gaussian_dipole(position, moment, sigma, ω, β) — one load assembly on the cells within 7σ of the position and one solve each, no factorisation (the three orientations of an isotropic emitter share one; ADR-0013 §5).

Exceptions
InvalidArgumentwithout a kept factorisation, for σ ≤ 0 or a moment row that is not a 3-vector.

◆ conical_dwr_estimate()

GoalEstimate hpfem::physics::conical_dwr_estimate ( const ConicalScattering &  problem,
const ConicalSolution &  solution,
const ConicalFunctional &  functional,
const adaptivity::EstimatorOptions &  options = {} 
)

DWR estimate of the error of the goal for a solution of the conical problem.

Exceptions
InvalidArgumentif the solution or the functional does not match the maps.

◆ conical_field_at()

ConicalVector hpfem::physics::conical_field_at ( const fespace::NedelecDofMap< 2 > &  transverse,
const fespace::DofMap< 2 > &  longitudinal,
const Vector &  e,
const Vector &  v,
Real  beta,
Index  cell,
const Point< 2 > &  xi,
ConicalVector *  curl = nullptr 
)

Physical field (E_x, E_y, E_z) of the coefficients (e, v) of a conical field at reference point ξ of cell c, and its physical curl \( (\partial_yE_z - i\beta E_y,\ i\beta E_x - \partial_xE_z,\ \partial_xE_y - \partial_yE_x) \).

◆ conical_fourier_coefficients() [1/2]

std::vector< ConicalVector > hpfem::physics::conical_fourier_coefficients ( const std::function< ConicalVector(const Point< 2 > &)> &  field,
const Point< 2 > &  origin,
const Point< 2 > &  tangent,
Real  period,
Real  kt0,
int  max_order,
int  num_points 
)

Fourier coefficients of a physical 3-vector field on the line through origin along the unit tangent (the direction of the period): \( A_m = \frac1a\int_0^a E(\text{origin} + s\,\text{tangent})\,e^{-ik_{t,m}s}\,ds \) with \( k_{t,m} = k_{t0} + 2\pi m/a \), m = −max_order..max_order, sampled with num_points Gauss–Legendre points per period.

◆ conical_fourier_coefficients() [2/2]

std::vector< ConicalVector > hpfem::physics::conical_fourier_coefficients ( const std::function< ConicalVector(const Point< 2 > &)> &  field,
Real  x0,
Real  y0,
Real  period,
Real  ky0,
int  max_order,
int  num_points 
)

The same on the line x = x0 with the period along y (origin (x0, y0), tangent ŷ).

◆ conical_functional_shape_derivative()

Vector hpfem::physics::conical_functional_shape_derivative ( const fespace::NedelecDofMap< 2 > &  transverse,
const fespace::DofMap< 2 > &  longitudinal,
const ConicalFunctional &  functional,
const NodeField &  velocity,
Real  functional_step = 1e-6 
)

The same for a conical functional, stacked as (in-plane | scaled longitudinal).

◆ conical_gaussian_average()

ConicalVector hpfem::physics::conical_gaussian_average ( const ConicalScattering &  problem,
const ConicalSolution &  solution,
const Point< 2 > &  position,
Real  sigma,
int  extra_order = 4 
)

The field of a solution averaged over the Gaussian of conical_gaussian_dipole, \( e^{-\sigma^2\beta^2/2}\int g_2\,E\,dA \) with the total physical field E (the incident field added for a scattered-field solution): by the quadrature of the cells within 7σ of the position, exact across material interfaces inside the Gaussian, where the normal component of E jumps. The reciprocity amplitude of a distant dipole is p · this average (ADR-0013 §6).

Exceptions
InvalidArgumentfor σ ≤ 0 or a solution that does not match the DoF maps.

◆ conical_gaussian_dipole()

ConicalField hpfem::physics::conical_gaussian_dipole ( const Point< 2 > &  position,
const ConicalVector &  moment,
Real  sigma,
Real  omega,
Real  beta 
)

Volume source \( f = i\omega\mu_0 J_{k_x,\beta} \) of the cell problem of a Gaussian dipole (file comment) in the scaled components \( (f_x, f_y, -i f_z) \) of the conical solver (ConicalScatteringSetup::current, total-field formulation): position \( (x_0, y_0) \) [m], moment the physical current moment \( (p_x, p_y, p_z) \) [A m] in the solver frame (x along the period, y normal, z along the lines), sigma the smearing [m], omega [rad/s], beta the longitudinal wavenumber of the cell problem [1/m]. The Bloch images of the Gaussian in the neighbouring cells are not included: keep it 6σ inside the cell (grating.emit checks it).

Exceptions
InvalidArgumentfor σ ≤ 0 or ω ≤ 0.

◆ conical_material_form()

assembly::ConicalForm hpfem::physics::conical_material_form ( const materials::Material &  material)

Homogeneous material as conical form: diagonal tensors \( \mu_r^{-1} \) and \( \varepsilon_r \), no sources.

◆ conical_material_residual_derivative()

Vector hpfem::physics::conical_material_residual_derivative ( const ConicalScattering &  problem,
const ConicalSolution &  solution,
mesh::Tag  tag 
)

material_residual_derivative of the conical solver, stacked as (in-plane | scaled longitudinal), the ordering of ConicalSolution::factorisation.

Exceptions
InvalidArgumentas conical_material_sensitivity.

◆ conical_material_sensitivity()

Complex hpfem::physics::conical_material_sensitivity ( const ConicalScattering &  problem,
const ConicalSolution &  solution,
const ConicalAdjoint &  adjoint,
mesh::Tag  tag 
)

\( dQ/d\varepsilon_{\text{tag}} \) for the conical solver: \( k_0^2 \big[(z_e, z_v)^\top M_{\text{tag}}(e, v) + (z_e, z_v)^\top\ell_{\text{tag}}\big] \) with the block mass of the conical forms (the pairing \( \varepsilon_zvw \) of the scaled longitudinal part).

Exceptions
InvalidArgumentas material_sensitivity.

◆ conical_modal_boundary_matrix()

SparseMatrix hpfem::physics::conical_modal_boundary_matrix ( const fespace::NedelecDofMap< 2 > &  transverse,
const fespace::DofMap< 2 > &  longitudinal,
const Surface< 2 > &  line,
const materials::Tensor3 &  eps,
Real  k0,
Real  beta,
const Point< 2 > &  shift,
Real  kt0,
int  max_order 
)

Dirichlet-to-Neumann matrix of a modal transparent boundary in the full block indices (Nédélec, then H1, as assemble_conical): with the outward normal n, the tangent t along the period vector shift and the right-handed local frame (t, n × t, n) (rows of R), the tangential trace \( E_t = (E\cdot t, E\cdot(n\times t)) \) of the trial and test functions is expanded in the orders \( k_m = k_{t0} + 2\pi m/a \), m = −M..M, and \( B_{ij} = ik_0\sum_m \hat F_{i,m}^T J Y_m \hat E_{j,m} \) with \( \hat E_{j,m} = \tfrac1a\int E_t(\phi_j)e^{-ik_ms}ds \), \( \hat F_{i,m} = \int F_t(\phi_i)e^{ik_ms}ds \) (test functions in the physical components \( (V_x, V_y, -iw) \)), \( J = [[0,-1],[1,0]] \) (n × ·) and the admittance \( Y_m = W_HW_E^{-1} \) of the two outgoing modes of half_space_modes(R ε Rᵀ, k_m/k_0, β (n×t)_z/k_0, true), \( \tilde H_t = Y_mE_t \) ( \( \tilde H = Z_0H \), curl E = i k0 H̃). The matrix is dense on the DoFs of the line.

Exceptions
InvalidArgumentfor an empty or curved line, a line not along shift, or grazing propagation of an order (a Rayleigh anomaly).

◆ conical_mode_orders()

std::vector< ModeResolvedOrder > hpfem::physics::conical_mode_orders ( const ConicalFieldFunction &  field,
const OrderLine &  line,
Real  k0,
const materials::Tensor3 &  eps_line,
Real  kt0,
Real  beta,
Real  kn_incident,
const ConicalFieldFunction &  incident = {},
int  max_order = 3,
int  num_points = 0,
Real  incident_amplitude = 1.0 
)

Diffraction orders of field - incident (or of field) on the line, decomposed on the two outgoing modes (along line.normal) of the medium of permittivity eps_line (solver frame, any symmetric tensor) at the tangential wavenumber \( k_{t,m} = k_{t0} + 2\pi m/a \) and the longitudinal β (ADR-0015 §7). The local frame (t̂, n̂ × t̂, n̂) is right-handed, so the modes are those of half_space_modes(R ε Rᵀ, k_{t,m}/k_0, β (n̂ × t̂)_z / k_0, upward) with the rows t̂, n̂ × t̂, n̂ of R: s / p in an isotropic medium, ordinary / extraordinary in a uniaxial one, the two eigenmodes in a biaxial one. The tangential \( E \) of \( A_m \) fixes both amplitudes (only outgoing waves on the line); the efficiency of a channel is \( |c|^2 S_n / S_n^{inc} \) with the incident flux \( |E_0|^2 k_n^{inc}/k_0 \) in units of 2 Z0; evanescent channels of a lossless medium carry none. In a lossy medium the efficiencies are the powers through the line (they decay with its distance from the structure). In an isotropic lossless medium the order efficiency equals that of conical_diffraction_orders. Arguments as there.

Exceptions
InvalidArgumentfor a degenerate line, a normal not perpendicular to the tangent, or grazing propagation of an order (a Rayleigh anomaly, k_n = 0).

◆ conical_order_functional()

ConicalFunctional hpfem::physics::conical_order_functional ( const Point< 2 > &  origin,
const Point< 2 > &  tangent,
Real  period,
Real  kt0,
int  order,
int  num_points,
const ConicalVector &  e 
)

Vector amplitude of a diffraction order along a polarisation vector e (not conjugated): \( Q(E) = \frac1P\int_0^P E(x_0 + s\,t)\cdot e\; e^{-ik_{t,m}s}\,ds \) on the line from origin along the unit tangent over one period, \( k_{t,m} = k_{t,0} + 2\pi m/P \) (the same Gauss–Legendre rule as conical_fourier_coefficients). For the efficiency of the order the natural choice is \( e = \overline{A_m}/|A_m| \) of the current amplitude: then \( \Delta R_m \approx 2 R_m\,\mathrm{Re}(\Delta Q)/|A_m| \).

◆ conical_parameter_tangent()

ConicalTangent hpfem::physics::conical_parameter_tangent ( const ConicalScattering &  problem,
const ConicalSolution &  solution,
const ConicalScattering &  minus,
const ConicalScattering &  plus,
Real  step 
)

\( de/d\theta \) of solution (solved on problem with ConicalScatteringSetup::keep_factorisation) from the problems at \( \theta - h \) (minus) and \( \theta + h \) (plus, step = h): three assemblies and one tangent solve on the kept factorisation (see the file comment). The three problems must share the DoF maps, the scalar-path choice and the constraint pattern; anything in their setups may differ smoothly in \( \theta \) (frequency, \( \beta \), materials, PML, incident field, currents, Bloch phases). An observable \( Q(e,\theta) \) then has \( dQ/d\theta = \partial_e Q\cdot de/d\theta + \partial_\theta Q|_e \).

Exceptions
InvalidArgumentwithout a kept factorisation, for h ≤ 0 or if the problems or the solution do not fit together.

◆ conical_plane_wave()

ConicalField hpfem::physics::conical_plane_wave ( const ConicalVector &  amplitude,
const Point< 3 > &  wave_vector 
)

Scaled components of the plane wave \( E_0 e^{ik\cdot x} \) with the (real) wave vector \( k = (k_x, k_y, \beta) \) and the complex amplitude \( E_0 \perp k \): the returned field is \( (E_{0x}, E_{0y}, -iE_{0z})\,e^{i(k_xx + k_yy)} \); β = k_z must be the setup's β.

Exceptions
InvalidArgumentif E_0 is not transverse to k (relative tolerance 1e-10).

◆ conical_plane_wave_curl()

ConicalField hpfem::physics::conical_plane_wave_curl ( const ConicalVector &  amplitude,
const Point< 3 > &  wave_vector 
)

Physical curl \( i k \times E_0\,e^{i(k_xx + k_yy)} \) of the same plane wave (physical components, for ConicalScatteringSetup::incident_curl).

◆ conical_pml_form()

assembly::ConicalForm hpfem::physics::conical_pml_form ( const pml::PmlBox< 2 > &  box,
const materials::Material &  material,
std::optional< int >  quadrature_order = {} 
)

PML as material for the conical forms (ADR-0005): with the stretch factors \( s_x, s_y \) of the box, \( \Lambda = \mathrm{diag}(s_y/s_x, s_x/s_y, s_xs_y) \) gives \( \tilde\varepsilon = \varepsilon_r\Lambda \) and \( \tilde\mu^{-1} = \mu_r^{-1}\Lambda^{-1} \) (identity inside the box).

◆ conical_point_functional()

ConicalFunctional hpfem::physics::conical_point_functional ( const Point< 2 > &  x,
const ConicalVector &  weight 
)

Point value of the physical field, \( Q(E) = E(x)\cdot w = E_xw_x + E_yw_y + E_zw_z \) (w not conjugated).

◆ conical_polarisation()

ConicalVector hpfem::physics::conical_polarisation ( const Point< 3 > &  wave_vector,
const Point< 3 > &  normal,
Polarisation  polarisation 
)

Unit polarisation vectors of a plane wave with wave vector k incident on a structure with the (in-plane) normal n̂: s has E perpendicular to the plane of incidence spanned by k and n̂ (for k ∥ n̂ it is the invariant direction ẑ), p has E in that plane and ⊥ k.

◆ conical_power_balance()

PowerBalance hpfem::physics::conical_power_balance ( const ConicalScattering &  problem,
const ConicalSolution &  solution,
const Surface< 2 > &  reflection,
Real  period,
Real  kn_incident,
const ConicalFieldFunction &  incident_wave,
Real  incident_amplitude = 1.0,
const Surface< 2 > *  transmission = nullptr,
int  extra_order = 2 
)

Flux-based energy balance of a periodic conical problem (scattered-field formulation): the incident power per period \( \tfrac12|E_0|^2\,k_n^{inc}/(k_0Z_0)\,a \), the power of the reflected field (total field minus the downward incident wave incident_wave, whose H is taken by central differences) through reflection (a Surface::plane in the incidence medium, normal away from the structure), the transmitted power of the total field through transmission (or 0) and the volumetric absorbed power of the total field (absorbed_power_by_tag); relative_residual() is the reference-free quality indicator. [W/m].

Exceptions
InvalidArgumentwithout an incident field.

◆ conical_poynting_flux()

Real hpfem::physics::conical_poynting_flux ( const fespace::NedelecDofMap< 2 > &  transverse,
const fespace::DofMap< 2 > &  longitudinal,
const Vector &  e,
const Vector &  v,
Real  beta,
Real  omega,
const materials::MaterialMap &  materials,
const Surface< 2 > &  surface,
int  order = 8 
)

Time-averaged power per unit length [W/m] of the conical field (e, v) through the surface: \( \int \tfrac12\mathrm{Re}(E\times H^*)\cdot n\,ds \) with \( H = \nabla\times E/(i\omega \mu_0\mu) \) of the inside cell's material (the conical curl).

Exceptions
InvalidArgumentif the coefficient vectors do not match the maps.

◆ conical_residual()

Vector hpfem::physics::conical_residual ( const ConicalScattering &  problem,
const Vector &  transverse,
const Vector &  longitudinal 
)

Full residual \( \rho = b - (K - k_0^2 M)\,e \) of the conical problem at the block coefficients (in-plane | scaled longitudinal), stacked in that order, on all DoFs (the PEC rows included). At the solution \( P^H\rho \) vanishes on system_dofs(). One assembly.

Exceptions
InvalidArgumentif the vectors do not match the maps.

◆ conical_resonance_adjoint()

ModeAdjoint hpfem::physics::conical_resonance_adjoint ( const ConicalResonance &  problem,
const ConicalResonantMode &  mode 
)

The adjoint of a conical resonance: the mode itself without Bloch phases, else the left eigenvector of the reduced pencil by two steps of transposed inverse iteration at \( \lambda(1 + 10^{-10}) \) (one factorisation, ConicalResonanceSetup::solver).

Exceptions
InvalidArgumentif the mode does not match the maps.

◆ conical_resonance_beta_derivative()

ResonanceDerivative hpfem::physics::conical_resonance_beta_derivative ( const ConicalResonance &  problem,
const ConicalResonantMode &  mode,
const ModeAdjoint &  adjoint,
Real  step 
)

\( d/d\beta \) (longitudinal wavenumber, [1/m]) of a conical resonance: central difference of the assembled pencil at β ± step (the Bloch constraints do not depend on β). step is absolute [1/m]: take about \( 10^{-6}\max(|\beta|, k_0) \) (a step far below that leaves only round-off of the assembled matrices; hpfem.grating.resonance_sensitivity scales it so).

Exceptions
InvalidArgumentfor a non-positive step.

◆ conical_resonance_bloch_derivative()

ResonanceDerivative hpfem::physics::conical_resonance_bloch_derivative ( const ConicalResonance &  problem,
const ConicalResonantMode &  mode,
const ModeAdjoint &  adjoint,
const ConicalResonance &  minus,
const ConicalResonance &  plus,
Real  step 
)

Derivative with respect to a parameter of the Bloch constraints (the Bloch wavenumber \( k_x \) of the periodic pairs): minus and plus are the problem at the parameter ∓ step on the same maps (only the phases differ). With \( x' = \partial P\,x_r \) and \( \tilde y' = \overline{\partial P}\,y \), \( d\lambda = [\tilde y^\top(S - \lambda M)\,x' + \tilde y'^\top(S - \lambda M)\,x] / (\tilde y^\top M x) \) — the complex dispersion \( d\omega/dk_x \) of a leaky mode.

Exceptions
InvalidArgumentwithout Bloch constraints, for a non-positive step or problems with another constraint pattern.

◆ conical_resonance_material_derivative()

ResonanceDerivative hpfem::physics::conical_resonance_material_derivative ( const ConicalResonance &  problem,
const ConicalResonantMode &  mode,
const ModeAdjoint &  adjoint,
mesh::Tag  tag 
)

\( d/d\varepsilon_r \) of the cells with tag for a conical resonance.

Exceptions
InvalidArgumentas resonance_material_derivative.

◆ conical_resonance_shape_derivative()

ResonanceDerivative hpfem::physics::conical_resonance_shape_derivative ( const ConicalResonance &  problem,
const ConicalResonantMode &  mode,
const ModeAdjoint &  adjoint,
const NodeField &  velocity,
Real  relative_step = 1e-6 
)

Derivative of a conical resonance along a mesh velocity.

Exceptions
InvalidArgumentas resonance_shape_derivative.

◆ conical_shape_derivative()

Complex hpfem::physics::conical_shape_derivative ( const ConicalScattering &  problem,
const ConicalSolution &  solution,
const ConicalFunctional &  functional,
const NodeField &  velocity,
Real  relative_step = 1e-6,
Real  functional_step = 1e-6 
)

The same for the conical solver and a ConicalFunctional.

◆ conical_shape_gradient()

ComplexNodeField hpfem::physics::conical_shape_gradient ( const ConicalScattering &  problem,
const ConicalSolution &  solution,
const ConicalAdjoint &  adjoint,
Real  relative_step = 1e-6 
)

The same for the conical solver.

◆ conical_shape_residual_derivative()

Vector hpfem::physics::conical_shape_residual_derivative ( const ConicalScattering &  problem,
const ConicalSolution &  solution,
const NodeField &  velocity,
Real  relative_step = 1e-6 
)

The same for the conical solver, stacked as (in-plane | scaled longitudinal).

◆ conical_source_power()

Real hpfem::physics::conical_source_power ( const ConicalScattering &  problem,
const ConicalSolution &  solution,
int  extra_order = 4 
)

Power delivered by the source of a total-field conical problem, \( -\tfrac12\mathrm{Re}\int \bar J\cdot E\,dA \) with \( J = f/(i\omega\mu_0) \) of ConicalScatteringSetup::current and the physical field \( (E_x, E_y, E_z = iv) \) of the solution, by quadrature of degree 2p + extra_order on every cell [W/m; per unit β for a cell problem of the array scanning]. For a lossless structure it equals the power leaving through the PML boundaries plus the guided power; with losses the absorbed power as well.

Exceptions
InvalidArgumentwithout a current (scattered-field problem) or for mismatched vectors.

◆ conical_sweep_dipole_power_matrix()

Eigen::Matrix3cd hpfem::physics::conical_sweep_dipole_power_matrix ( ConicalSweep &  sweep,
const ConicalScatteringSetup &  setup,
const Point< 2 > &  position,
Real  sigma,
int  extra_order = 4 
)

The power matrix of conical_dipole_power_matrix for the cell problem setup (one (kx, β) sample of the array scanning) on a sweep: ConicalSweep::factorize (the cached affine parts, the reduction with the test space for a complex Bloch phase, the refactorisation on the symbolic analysis of the first sample), then the loads of the three unit moments on the cells within 7σ and one multi-rhs solve. The setup must keep what the sweep's base fixes (mesh, orders, PEC tags, periodic pairs, PML box, materials) and carry a current (any; the loads are the dipoles'). Agrees with ConicalScattering + conical_dipole_responses to rounding. Not thread safe: one sweep per thread.

Exceptions
InvalidArgumentfor σ ≤ 0, and as ConicalSweep::solve.

◆ conical_transported_solution()

ConicalSolution hpfem::physics::conical_transported_solution ( const ConicalScattering &  problem,
const ConicalSolution &  solution 
)

The solution with its reduced coefficients (the constraint masters on system_dofs()) kept and the slaves recomputed from the constraints of problem: the coefficients \( P(\theta')\,u \) of another parameter value on the same maps. Without constraints a copy. beta is the one of problem; no factorisation.

Exceptions
InvalidArgumentif the vectors do not match the maps.

◆ cross_sections()

template<int Dim>
CrossSections hpfem::physics::cross_sections ( const Scattering< Dim > &  problem,
const ScatteringSolution< Dim > &  solution,
const Surface< Dim > &  surface,
Real  incident_amplitude,
int  extra_order = 2 
)

◆ cross_sections< 2 >()

template CrossSections hpfem::physics::cross_sections< 2 > ( const Scattering< 2 > &  ,
const ScatteringSolution< 2 > &  ,
const Surface< 2 > &  ,
Real  ,
int   
)
extern

◆ cross_sections< 3 >()

template CrossSections hpfem::physics::cross_sections< 3 > ( const Scattering< 3 > &  ,
const ScatteringSolution< 3 > &  ,
const Surface< 3 > &  ,
Real  ,
int   
)
extern

◆ current_load()

template<int Dim>
Vector hpfem::physics::current_load ( const fespace::NedelecDofMap< Dim > &  dofs,
const assembly::ComplexVectorField< Dim > &  current,
int  extra_order = 2 
)

Load \( b_J = \int J\cdot\phi \) of a current density J (without the factor \( i\omega\mu_0 \), which add_current applies per contour point).

◆ current_load< 2 >()

template Vector hpfem::physics::current_load< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const assembly::ComplexVectorField< 2 > &  ,
int   
)
extern

◆ current_load< 3 >()

template Vector hpfem::physics::current_load< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const assembly::ComplexVectorField< 3 > &  ,
int   
)
extern

◆ diffraction_efficiencies()

std::vector< DiffractionOrder > hpfem::physics::diffraction_efficiencies ( const std::vector< assembly::ComplexVector< 2 > > &  coefficients,
Real  k0,
Real  index_line,
Real  period,
Real  ky0,
Real  kx_incident,
Real  incident_amplitude 
)

Efficiencies of the orders of coefficients (from fourier_coefficients with the same max_order) in a medium of real refractive index index_line on the line, for an incident plane wave of amplitude |E0| with normal wavenumber kx_incident (> 0) in the incidence medium: \( \eta_m = \mathrm{Re}(k_{x,m})|A_m|^2 / (k_x^{inc}|E_0|^2) \) (equal permeability on both sides).

◆ diffraction_orders() [1/2]

std::vector< DiffractionOrderField > hpfem::physics::diffraction_orders ( const FieldFunction &  field,
const OrderLine &  line,
Real  k0,
Real  index_line,
Real  k_tangential,
Real  kn_incident,
const FieldFunction &  incident = {},
int  max_order = 3,
int  num_points = 0,
Real  incident_amplitude = 1.0 
)

Orders of field - incident on the line (the reflected orders of a total field, with the incident wave incident given, e.g. Scattering::incident_wave), or of field itself when incident is empty (a scattered field above, the transmitted field below): \( A_m = \frac{1}{a}\int_0^a (E - E^{inc})(o + t\,\hat t)\,e^{-i k_{t,m} t}\,dt \) with \( k_{t,m} = k_t + 2\pi m / a \), by composite Gauss-Legendre with num_points points in blocks of up to 8 (0: 16 per order, at least 64; exact for the piecewise polynomial FEM field when the blocks align with the cells, e.g. 8 points per cell on the line). k_tangential is the Bloch wavenumber of the incident wave along the tangent, index_line the real index of the medium on the line, kn_incident the normal wavenumber of the incident wave (> 0) in the incidence medium and incident_amplitude its |E0|.

Exceptions
InvalidArgumentfor a degenerate line, non-positive parameters or a point outside the mesh (the field function throws or returns no value).

◆ diffraction_orders() [2/2]

std::vector< DiffractionOrder3D > hpfem::physics::diffraction_orders ( const FieldFunction3D &  field,
const OrderPlane &  plane,
Real  k0,
Real  index_plane,
const Point< 3 > &  k_tangential,
Real  kn_incident,
const FieldFunction3D &  incident = {},
int  max_order = 2,
int  num_points = 0,
Real  incident_amplitude = 1.0 
)

Orders (m, n), |m|, |n| ≤ max_order, of field - incident on the plane (of field itself when incident is empty), in the order m = -max_order … max_order, n = -max_order … max_order (n fastest): \( A_{mn} = \int_0^1\!\int_0^1 (E - E^{inc})(o + s\mathbf a_1 + t\mathbf a_2)\,e^{-i\mathbf k_{mn}\cdot(s\mathbf a_1 + t\mathbf a_2)}\,ds\,dt \) with \( \mathbf k_{mn} = \mathbf k_t + m\mathbf b_1 + n\mathbf b_2 \), by a tensor composite Gauss–Legendre rule with num_points points per lattice direction in blocks of up to 8 (0: 8 per order, at least 32; exact for the piecewise polynomial FEM field when the blocks align with the cells). \( k_n = \sqrt{k_0^2 n^2 - |\mathbf k_{mn}|^2} \) with Im ≥ 0 in the medium of real index index_plane; \( \eta_{mn} = \mathrm{Re}(k_n)|A_{mn}|^2 / (k_n^{inc}|E_0|^2) \) (equal permeability on both sides). k_tangential is the tangential wavevector of the incident wave (in the plane), kn_incident its normal wavenumber (> 0) in the incidence medium and incident_amplitude its |E0|. Cost: num_points² evaluations of the field.

Exceptions
InvalidArgumentfor a degenerate lattice, lattice vectors or a k_tangential not in the plane, a non-unit normal, non-positive parameters or a point outside the mesh (the field function throws).

◆ dipole_field()

template<int Dim>
IncidentField< Dim > hpfem::physics::dipole_field ( const Point< Dim > &  position,
const assembly::ComplexVector< Dim > &  moment,
Real  k 
)

Field of a point dipole (3D) or line dipole (2D, in-plane moment) at x0: the outgoing solution of \( \nabla\times\nabla\times E - k^2 E = p\,\delta(x - x_0) \), \( E = (I + \nabla\nabla / k^2)\, g\, p \) with the scalar Green's function \( g = e^{ikr}/(4\pi r) \) (3D) or \( g = \tfrac{i}{4} H_0^{(1)}(kr) \) (2D). Singular at x0; place the source outside the mesh or in a cell to be excised.

◆ dipole_field< 2 >()

template IncidentField< 2 > hpfem::physics::dipole_field< 2 > ( const Point< 2 > &  ,
const assembly::ComplexVector< 2 > &  ,
Real   
)
extern

◆ dipole_field< 3 >()

template IncidentField< 3 > hpfem::physics::dipole_field< 3 > ( const Point< 3 > &  ,
const assembly::ComplexVector< 3 > &  ,
Real   
)
extern

◆ dipole_vacuum_power()

Real hpfem::physics::dipole_vacuum_power ( Complex  moment,
Real  omega 
)

Radiated power of a point dipole of current moment p in vacuum, \( P_0 = Z_0 k_0^2 |p|^2 / (12\pi) \) [W].

◆ discrete_field()

template<int Dim>
SurfaceField< Dim > hpfem::physics::discrete_field ( const fespace::NedelecDofMap< Dim > &  dofs,
const Vector &  e_h 
)

Sampler of a discrete field (coefficients on the DoF map).

◆ discrete_field< 2 >()

template SurfaceField< 2 > hpfem::physics::discrete_field< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const Vector &   
)
extern

◆ discrete_field< 3 >()

template SurfaceField< 3 > hpfem::physics::discrete_field< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const Vector &   
)
extern

◆ dwr_estimate()

template<int Dim>
GoalEstimate hpfem::physics::dwr_estimate ( const Scattering< Dim > &  problem,
const ScatteringSolution< Dim > &  solution,
const Functional< Dim > &  functional,
const adaptivity::EstimatorOptions &  options = {} 
)

Estimates the error of the goal for the solution of the problem.

Exceptions
InvalidArgumentif the solution does not match the problem.

◆ dwr_estimate< 2 >()

template GoalEstimate hpfem::physics::dwr_estimate< 2 > ( const Scattering< 2 > &  ,
const ScatteringSolution< 2 > &  ,
const Functional< 2 > &  ,
const adaptivity::EstimatorOptions &   
)
extern

◆ dwr_estimate< 3 >()

template GoalEstimate hpfem::physics::dwr_estimate< 3 > ( const Scattering< 3 > &  ,
const ScatteringSolution< 3 > &  ,
const Functional< 3 > &  ,
const adaptivity::EstimatorOptions &   
)
extern

◆ fourier_coefficient_functional()

Functional< 2 > hpfem::physics::fourier_coefficient_functional ( Real  x0,
Real  y0,
Real  period,
Real  ky0,
int  order,
int  num_points,
const assembly::ComplexVector< 2 > &  e 
)

Fourier coefficient of a diffraction order (2D, physics::fourier_coefficients): \( Q(E) = \frac1a\int_{y_0}^{y_0+a} E(x_0, y)\cdot e\; e^{-i k_{y,m} y}\,dy \) with \( k_{y,m} = k_{y,0} + 2\pi m / a \), polarisation vector e, Gauss–Legendre with num_points points.

◆ fourier_coefficients() [1/2]

std::vector< assembly::ComplexVector< 2 > > hpfem::physics::fourier_coefficients ( const fespace::NedelecDofMap< 2 > &  dofs,
const Vector &  e_h,
const mesh::PointLocator< 2 > &  locator,
Real  x0,
Real  y0,
Real  period,
Real  ky0,
int  max_order,
int  num_points 
)

The same for a discrete field located with locator; points outside the mesh are an error.

◆ fourier_coefficients() [2/2]

std::vector< assembly::ComplexVector< 2 > > hpfem::physics::fourier_coefficients ( const std::function< assembly::ComplexVector< 2 >(const Point< 2 > &)> &  field,
Real  x0,
Real  y0,
Real  period,
Real  ky0,
int  max_order,
int  num_points 
)

Fourier coefficients \( A_m = \frac1a\int_{y_0}^{y_0+a} E(x_0, y)\,e^{-ik_{y,m}y}\,dy \) for \( m = -\text{max\_order}..\text{max\_order} \) (index \( m + \text{max\_order} \)) of a field given as a function of the physical point, sampled with num_points Gauss–Legendre points per period (choose a multiple of the cells across the period, e.g. 8 per cell).

◆ from_literature_frame()

ConicalVector hpfem::physics::from_literature_frame ( const ConicalVector &  v)

The inverse.

◆ functional_shape_derivative()

template<int Dim>
Vector hpfem::physics::functional_shape_derivative ( const fespace::NedelecDofMap< Dim > &  dofs,
const Functional< Dim > &  functional,
const NodeField &  velocity,
Real  functional_step = 1e-6 
)

Derivative of the functional vector along the mesh velocity, \( \partial q/\partial x \cdot V \), by central differences of the functional on copies of the mesh moved by \( \pm \) functional_step times the largest cell diameter (a point value or a line integral changes with the cells it lives in): the term \( (\partial q/\partial x\cdot V)^\top e \) of shape_derivative.

Exceptions
InvalidArgumenton a mismatched velocity.

◆ gaussian_current()

template<int Dim>
assembly::ComplexVectorField< Dim > hpfem::physics::gaussian_current ( const Point< Dim > &  position,
const assembly::ComplexVector< Dim > &  moment,
Real  sigma,
Real  omega 
)

Volume source \( f = i\omega\mu_0 J \) of a dipole of moment density moment [A m / m^Dim per unit ...] smeared over the normalised Gaussian \( g(x) = \exp(-|x - x_0|^2 / 2\sigma^2) / ((2\pi)^{Dim/2}\sigma^{Dim}) \): a point (3D) or line (2D) dipole resolved by the mesh (choose \( \sigma \) a fraction of the cell size and well below the wavelength), for the total-field formulation (ScatteringSetup::current) where the analytic dipole_field cannot serve as incident field, e.g. an emitter inside a layered structure. Evaluated in C++, so it costs nothing in the parallel assembly.

Exceptions
InvalidArgumentfor σ ≤ 0.

◆ gaussian_current< 2 >()

template assembly::ComplexVectorField< 2 > hpfem::physics::gaussian_current< 2 > ( const Point< 2 > &  ,
const assembly::ComplexVector< 2 > &  ,
Real  ,
Real   
)
extern

◆ gaussian_current< 3 >()

template assembly::ComplexVectorField< 3 > hpfem::physics::gaussian_current< 3 > ( const Point< 3 > &  ,
const assembly::ComplexVector< 3 > &  ,
Real  ,
Real   
)
extern

◆ gaussian_pulse()

TimeSignal hpfem::physics::gaussian_pulse ( Real  t0,
Real  width 
)

Gaussian pulse \( g(t) = \exp(-(t - t_0)^2 / (2 w^2)) \).

◆ group_velocity()

template<int Dim>
std::vector< Point< Dim > > hpfem::physics::group_velocity ( const BandStructure< Dim > &  problem,
const Bands< Dim > &  bands,
Real  degeneracy_tolerance = 1e-6 
)

Group velocity \( v_g = \nabla_k\omega = c_0\,\nabla_k k_0 \) [m/s] of every band, one band_wave_vector_derivative per Cartesian direction (Dim cheap differences of the prolongation, no solve). Components of a band at \( k_0 = 0 \) are NaN; at a degenerate point every component is the sorted cluster spectrum of its own direction.

Exceptions
InvalidArgumentas band_wave_vector_derivative.

◆ group_velocity< 2 >()

template std::vector< Point< 2 > > hpfem::physics::group_velocity< 2 > ( const BandStructure< 2 > &  ,
const Bands< 2 > &  ,
Real   
)
extern

◆ group_velocity< 3 >()

template std::vector< Point< 3 > > hpfem::physics::group_velocity< 3 > ( const BandStructure< 3 > &  ,
const Bands< 3 > &  ,
Real   
)
extern

◆ half_space_modes()

HalfSpaceModes hpfem::physics::half_space_modes ( const materials::Tensor3 &  eps,
Real  a,
Real  b,
bool  upward 
)

Modes of a half-space of permittivity eps (laboratory frame, z the normal) travelling or decaying towards +z (upward) or −z.

Exceptions
InvalidArgumentfor ε_zz ≈ 0, a gain medium or grazing propagation (k_z = 0, a Rayleigh anomaly).

◆ layered_axisymmetric_wave()

AxisymmetricLayeredWave hpfem::physics::layered_axisymmetric_wave ( const LayerStack< 3 > &  stack,
Real  k0,
Real  theta,
Polarisation  pol,
int  m,
StackSide  side = StackSide::kTop,
Complex  amplitude = 1.0 
)

Order m of the plane wave of LayerStack<3>::plane_wave (ADR-0014 §2–3): the wave of amplitude |E| = amplitude [V/m] at the angle θ ∈ [0, π/2) [rad] from the normal, in-plane wave vector along +x, coming from the incidence medium (kTop, travelling towards −z) or from the substrate (kBottom, travelling towards +z; the substrate must be lossless), with the background field of the stack in every layer. In layer j the field is an up and a down partial wave with the common real in-plane wavenumber \( k_\rho = k_0 n_{inc}\sin\theta \) and the vertical wavenumbers \( \pm k_{z,j} \) (complex in lossy layers and beyond the critical angle); each is expanded by Jacobi–Anger as in oblique_plane_wave with its complex polarisation vector, \( a_n = i^n J_n(k_\rho r) \). kBottom is the wave from above on the reversed stack (incidence medium the substrate, layers reversed) mirrored z → −z: \( (E_r, v, E_z)(r, z) \mapsto (E_r, v, -E_z)(r, -z) \), curl \( (C_r, C_\varphi, C_z) \mapsto (-C_r, -C_\varphi, C_z) \). At θ = 0 only m = ±1 are nonzero. Polarisation as oblique_plane_wave on both sides: s has E along y, p has H along +y (on the bottom side the sign of the mirrored p wave is flipped accordingly), so a homogeneous stack gives oblique_plane_wave at θ_i = π − θ (top) and θ_i = θ (bottom). Cost per point: a few Bessel functions of one argument.

Exceptions
InvalidArgumentfor k0 ≤ 0, θ outside [0, π/2), grazing propagation in a layer (LayerStack::plane_wave) or kBottom on a lossy substrate.

◆ layered_conical_wave()

LayeredConicalWave hpfem::physics::layered_conical_wave ( const LayerStack< 2 > &  stack,
Real  k0,
Real  angle,
Real  azimuth,
Polarisation  pol,
Real  amplitude = 1.0 
)

The stack wave of unit amplitude |E| = amplitude at the angle angle from the normal and the azimuth azimuth about it, for the polarisation pol (s: E ⊥ plane of incidence). The downward wave alone is separated from the stack field by sampling it at two heights above the stack. Conventions (solver frame: x periodic, y the stack normal pointing into the incidence medium, z invariant): the incident wave vector is \( k = k_0n(\sin\theta\cos\varphi, -\cos\theta, \sin\theta\sin\varphi) \); the s amplitude is \( \hat s = k\times\hat y / |k\times\hat y| = (-\sin\varphi, 0, \cos\varphi) \) (at φ = 0 the invariant direction \( \hat z \), the E_z polarisation), the p amplitude \( \hat p = \hat k\times\hat s = (-\cos\theta\cos\varphi, -\sin\theta, -\cos\theta\sin\varphi) \); the downward wave has the phase 1 at the origin (x = 0 on the top interface), incident returns it in scaled components (physical amplitude times amplitude), field the stack field in the same components. The literature frame of gratings (x periodic, y invariant, z normal) is reached by swapping the last two components. ky is the normal wavenumber, not the literature's \( k_y = \beta \) (that is beta).

Exceptions
InvalidArgumentas LayerStack<3>::plane_wave.

◆ layered_conical_wave_from_substrate()

LayeredConicalWave hpfem::physics::layered_conical_wave_from_substrate ( const LayerStack< 2 > &  stack,
Real  k0,
Real  angle,
Real  azimuth,
Polarisation  pol,
Real  amplitude = 1.0 
)

The stack wave incident from the substrate of stack (lossless, isotropic layers and substrate): layered_conical_wave of the stack mirrored at its bottom interface (substrate on top, layers reversed), mirrored back (y → −y; the scaled field becomes (E_x, −E_y, v), the physical curl, a pseudo-vector, (−c_x, c_y, −c_z)). angle is the angle from the normal in the substrate, the wave vector \( k = k_0n_s(\sin\theta\cos\varphi, \cos\theta, \sin\theta\sin\varphi) \) points up; the same kx and β as the incidence from the cover at \( n_c\sin\theta_c = n_s\sin\theta \). incident is the upward wave of the substrate alone with the phase 1 at x = 0 on the bottom interface, ky its normal wavenumber \( k_0n_s\cos\theta \) (> 0), reflectance / transmittance those of the bare stack for this incidence. The s and p amplitudes are those of layered_conical_wave in the mirrored frame, mapped back: \( \hat s = (-\sin\varphi, 0, \cos\varphi) \), \( \hat p = (-\cos\theta\cos\varphi, \sin\theta, -\cos\theta\sin\varphi) \).

Exceptions
InvalidArgumentas LayerStack<3>::plane_wave of the mirrored stack (a lossy substrate, crystals).

◆ material_residual_derivative()

template<int Dim>
Vector hpfem::physics::material_residual_derivative ( const Scattering< Dim > &  problem,
const ScatteringSolution< Dim > &  solution,
mesh::Tag  tag 
)

Derivative of the full residual \( R = b - A e \) with respect to the relative permittivity of the cells with tag at fixed coefficients e: \( r_\varepsilon = k_0^2\big(M_{\text{tag}}\,e + \ell_{\text{tag}}(E^{inc})\big) \) (full size, on problem.dofs()). The adjoint mode pairs it with the adjoint, \( dQ/d\varepsilon = z^\top r_\varepsilon \) (material_sensitivity); the direct mode solves \( de/d\varepsilon = A^{-1} r_\varepsilon \) on the kept factorisation (KeptFactorisation::solve) for every observable at once (ADR-0012).

Exceptions
InvalidArgumentas material_sensitivity.

◆ material_sensitivity()

template<int Dim>
Complex hpfem::physics::material_sensitivity ( const Scattering< Dim > &  problem,
const ScatteringSolution< Dim > &  solution,
const Vector &  adjoint,
mesh::Tag  tag 
)

\( dQ/d\varepsilon_{\text{tag}} \) of the goal whose adjoint is adjoint, for the solution of the problem (scattered or total field as the formulation requires).

Exceptions
InvalidArgumentif no cell carries the tag, a tagged cell lies in the PML, or the vectors do not match the map.

◆ mie_cylinder_coefficients()

std::vector< Complex > hpfem::physics::mie_cylinder_coefficients ( Real  k,
Real  radius,
Real  refractive_index,
int  max_order 
)

Scattering coefficients \( c_n \), \( n = 0..\text{max\_order} \), of the scattered field \( H_z^{s} = \sum_n c_n H_n^{(1)}(kr)e^{in\varphi} \) for the incident \( H_z = e^{ikx} \) on a lossless cylinder of radius R and refractive index n_c in vacuum: \( c_n = i^n\,\frac{n_c J_n'(kR)J_n(n_c kR) - J_n(kR)J_n'(n_c kR)} {H_n^{(1)}(kR)J_n'(n_c kR) - n_c H_n^{(1)\prime}(kR)J_n(n_c kR)} \), with \( c_{-n} = c_n \) up to the sign of \( (-1)^n i^{-2n} \) (same modulus).

Exceptions
InvalidArgumentfor k, R, n_c ≤ 0 or max_order < 0.

◆ mie_cylinder_scattering_width()

Real hpfem::physics::mie_cylinder_scattering_width ( Real  k,
Real  radius,
Real  refractive_index,
int  max_order = -1 
)

Scattering width \( \sigma_{sca} = \frac{4}{k}\big(|c_0|^2 + 2\sum_{n\ge1}|c_n|^2\big) \) [m]: scattered power per unit length divided by the incident intensity. max_order defaults to a value converged for \( kR \lesssim 20 \).

◆ mie_sphere()

MieSphere hpfem::physics::mie_sphere ( Real  k,
Real  radius,
Complex  eps_r,
Real  background_index = 1.0,
int  max_order = -1 
)

Builds the series. max_order < 0 selects the Wiscombe-type cut-off \( N = \lceil x + 4 x^{1/3} + 10 \rceil \) (converged for the efficiencies and for the fields away from the surface; the near field at the surface may need more terms).

Exceptions
InvalidArgumentfor k, radius, background_index ≤ 0, Im ε_r < 0 or max_order = 0.

◆ modulated_gaussian()

TimeSignal hpfem::physics::modulated_gaussian ( Real  omega,
Real  t0,
Real  width 
)

Modulated Gaussian \( g(t) = \sin(\omega (t - t_0))\,\exp(-(t - t_0)^2 / (2 w^2)) \).

◆ move_nodes()

template<int Dim>
void hpfem::physics::move_nodes ( mesh::Mesh< Dim > &  mesh,
const NodeField &  velocity,
Real  t 
)

Moves every geometry node by t times its velocity (vertices with set_vertex, the edge nodes of a second-order mesh with set_edge_nodes), for parameter steps and finite differences.

Exceptions
InvalidArgumenton a mismatched shape.

◆ num_geometry_nodes()

template<int Dim>
Index hpfem::physics::num_geometry_nodes ( const mesh::Mesh< Dim > &  mesh)

Number of geometry nodes of the mesh: vertices plus edge nodes for order 2.

◆ oblique_plane_wave()

AxisymmetricField hpfem::physics::oblique_plane_wave ( Complex  amplitude,
Real  k,
Real  theta_i,
PlanePolarisation  polarisation,
int  m 
)

Order m of the plane wave \( E_0\,\hat p\,e^{ik\cdot x} \) with the wave vector \( k(\sin\theta_i, 0, \cos\theta_i) \) (angle θ_i from the axis, in the x–z plane) and the polarisation \( \hat p = \hat y \) (s) or \( (\cos\theta_i, 0, -\sin\theta_i) \) (p). The Jacobi–Anger expansion \( e^{ik_\perp\rho\cos\varphi} = \sum_n i^n J_n(k_\perp\rho)e^{in\varphi} \) gives, with \( a_n = i^n J_n(k_\perp\rho) \) and \( k_\perp = k\sin\theta_i \), \( E_{\rho,m} = \tfrac{p_x}{2}(a_{m-1} + a_{m+1}) + \tfrac{p_y}{2i}(a_{m-1} - a_{m+1}) \), \( E_{\varphi,m} = -\tfrac{p_x}{2i}(a_{m-1} - a_{m+1}) + \tfrac{p_y}{2}(a_{m-1} + a_{m+1}) \), \( E_{z,m} = p_z a_m \), all times \( E_0 e^{ikz\cos\theta_i} \), in the scaled components \( (E_r, v = -i r E_\varphi, E_z) \). At θ_i = 0 only m = ±1 survive (axial_plane_wave). The orders decouple on a body of revolution; the full response is the sum over m, which converges once |m| exceeds \( k_\perp \) times the radius of the scatterer.

◆ plane_wave()

template<int Dim>
IncidentField< Dim > hpfem::physics::plane_wave ( const assembly::ComplexVector< Dim > &  amplitude,
const Point< Dim > &  wave_vector 
)

Plane wave \( E_0 e^{i k\cdot x} \) with real wave vector k [1/m] and complex amplitude \( E_0 \perp k \) (any polarisation, including circular via complex components).

Exceptions
InvalidArgumentif the amplitude is not transverse or k = 0.

◆ plane_wave< 2 >()

template IncidentField< 2 > hpfem::physics::plane_wave< 2 > ( const assembly::ComplexVector< 2 > &  ,
const Point< 2 > &   
)
extern

◆ plane_wave< 3 >()

template IncidentField< 3 > hpfem::physics::plane_wave< 3 > ( const assembly::ComplexVector< 3 > &  ,
const Point< 3 > &   
)
extern

◆ plane_wave_intensity()

Real hpfem::physics::plane_wave_intensity ( Real  amplitude,
const materials::Material &  medium 
)

Intensity \( |E_0|^2 / (2 Z) \) [W/m^2] of a plane wave of amplitude \( |E_0| \) [V/m] in a medium with impedance \( Z = Z_0\sqrt{\mu_r/\varepsilon_r} \) (real part).

◆ plane_wave_sweep()

template<int Dim>
std::vector< ScatteringSolution< Dim > > hpfem::physics::plane_wave_sweep ( const Scattering< Dim > &  problem,
std::span< const Point< Dim > >  wave_vectors,
const std::function< assembly::ComplexVector< Dim >(const Point< Dim > &)> &  polarisation 
)

Plane waves of the given wave vectors (|k| = k0 n_background) with the polarisation polarisation(k) (must be transverse): the angle sweep of a scatterometry setup.

◆ plane_wave_sweep< 2 >()

template std::vector< ScatteringSolution< 2 > > hpfem::physics::plane_wave_sweep< 2 > ( const Scattering< 2 > &  ,
std::span< const Point< 2 > >  ,
const std::function< assembly::ComplexVector< 2 >(const Point< 2 > &)> &   
)
extern

◆ plane_wave_sweep< 3 >()

template std::vector< ScatteringSolution< 3 > > hpfem::physics::plane_wave_sweep< 3 > ( const Scattering< 3 > &  ,
std::span< const Point< 3 > >  ,
const std::function< assembly::ComplexVector< 3 >(const Point< 3 > &)> &   
)
extern

◆ point_value_functional()

template<int Dim>
Functional< Dim > hpfem::physics::point_value_functional ( const Point< Dim > &  x,
const assembly::ComplexVector< Dim > &  weight 
)

Point value \( Q(E) = E(x)\cdot w \) (w not conjugated).

◆ point_value_functional< 2 >()

template Functional< 2 > hpfem::physics::point_value_functional< 2 > ( const Point< 2 > &  ,
const assembly::ComplexVector< 2 > &   
)
extern

◆ point_value_functional< 3 >()

template Functional< 3 > hpfem::physics::point_value_functional< 3 > ( const Point< 3 > &  ,
const assembly::ComplexVector< 3 > &   
)
extern

◆ power_balance()

PowerBalance hpfem::physics::power_balance ( const Scattering< 2 > &  problem,
const ScatteringSolution< 2 > &  solution,
const Surface< 2 > &  reflection,
Real  period,
Real  kn_incident,
Real  incident_amplitude = 1.0,
const Surface< 2 > *  transmission = nullptr,
int  extra_order = 2 
)

The balance of a solution: reflection is a Surface::plane in the incidence medium with the normal away from the structure, transmission the same in the substrate or null; period the Bloch period along the surface, kn_incident the normal wavenumber (> 0) of the incident plane wave of amplitude incident_amplitude in the incidence medium (its intensity times cos θ times the period is the incident power). The absorbed power integrates the total field with rules of degree 2p + extra_order.

◆ poynting_flux() [1/2]

template<int Dim>
Real hpfem::physics::poynting_flux ( const fespace::NedelecDofMap< Dim > &  dofs,
const Vector &  e_h,
Real  omega,
const materials::MaterialMap &  materials,
const Surface< Dim > &  surface,
int  extra_order = 2 
)

Flux of a discrete field with the rule degree 2p + extra_order.

◆ poynting_flux() [2/2]

template<int Dim>
Real hpfem::physics::poynting_flux ( const mesh::Mesh< Dim > &  mesh,
const Surface< Dim > &  surface,
const SurfaceField< Dim > &  field,
Real  omega,
const materials::MaterialMap &  materials,
int  order 
)

Time-averaged power flux \( \int_S \tfrac12\,\mathrm{Re}(E\times\bar H)\cdot n\,ds \) of the sampled field through the surface, \( H = (i\omega\mu_0\mu_r)^{-1}\nabla\times E \) with the permeability of the inside cell. [W] in 3D, [W/m] in 2D.

◆ poynting_flux< 2 >() [1/2]

template Real hpfem::physics::poynting_flux< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const Vector &  ,
Real  ,
const materials::MaterialMap &  ,
const Surface< 2 > &  ,
int   
)
extern

◆ poynting_flux< 2 >() [2/2]

template Real hpfem::physics::poynting_flux< 2 > ( const mesh::Mesh< 2 > &  ,
const Surface< 2 > &  ,
const SurfaceField< 2 > &  ,
Real  ,
const materials::MaterialMap &  ,
int   
)
extern

◆ poynting_flux< 3 >() [1/2]

template Real hpfem::physics::poynting_flux< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const Vector &  ,
Real  ,
const materials::MaterialMap &  ,
const Surface< 3 > &  ,
int   
)
extern

◆ poynting_flux< 3 >() [2/2]

template Real hpfem::physics::poynting_flux< 3 > ( const mesh::Mesh< 3 > &  ,
const Surface< 3 > &  ,
const SurfaceField< 3 > &  ,
Real  ,
const materials::MaterialMap &  ,
int   
)
extern

◆ region_normal_velocity()

template<int Dim>
NodeField hpfem::physics::region_normal_velocity ( const mesh::Mesh< Dim > &  mesh,
mesh::Tag  tag 
)

Velocity of the uniform normal growth of the cells with tag: on every node of the region's boundary (the facets against other tags or the domain boundary) the unit outward normal averaged over the adjacent boundary facets (measure weighted); edge nodes of a second-order mesh take the mean of their edge's vertices; zero elsewhere.

Exceptions
InvalidArgumentif no cell carries the tag.

◆ resonance_adjoint()

template<int Dim>
ModeAdjoint hpfem::physics::resonance_adjoint ( const Resonance< Dim > &  problem,
const ResonantMode &  mode 
)

The adjoint of a mode of Resonance (the mode itself; one mass assembly).

Exceptions
InvalidArgumentif the field does not match the DoF map.

◆ resonance_adjoint< 2 >()

template ModeAdjoint hpfem::physics::resonance_adjoint< 2 > ( const Resonance< 2 > &  ,
const ResonantMode &   
)
extern

◆ resonance_adjoint< 3 >()

template ModeAdjoint hpfem::physics::resonance_adjoint< 3 > ( const Resonance< 3 > &  ,
const ResonantMode &   
)
extern

◆ resonance_derivative_from()

ResonanceDerivative hpfem::physics::resonance_derivative_from ( Complex  omega,
Complex  dlambda,
Complex  dlambda_domega = {} 
)

The derivative of ω, Q and the wavelength from the derivative \( \partial_p\hat\lambda \) of the eigenvalue of the pencil at the mode's ω. With dispersive materials the resonance solves \( \hat\lambda(\omega, p) = (\omega/c_0)^2 \), where the pencil's eigenvalue \( \hat\lambda \) depends on ω through \( \varepsilon(\omega) \):

\[ \frac{d\omega}{dp} = \frac{\partial_p\hat\lambda}{2\omega/c_0^2 - \partial_\omega\hat\lambda},\qquad \partial_\omega\hat\lambda = \sum_t \frac{\partial\hat\lambda}{\partial\varepsilon_t}\,\varepsilon_t'(\omega) \]

(dlambda_domega, from the material derivatives of the dispersive tags); 0 (the default) for a linear pencil, \( d\omega/dp = c_0\,\partial_p\hat\lambda/(2k_0) \). dlambda of the result is the total change of \( (\omega/c_0)^2 \).

◆ resonance_material_derivative()

template<int Dim>
ResonanceDerivative hpfem::physics::resonance_material_derivative ( const Resonance< Dim > &  problem,
const ResonantMode &  mode,
const ModeAdjoint &  adjoint,
mesh::Tag  tag 
)

\( d/d\varepsilon_r \) of the cells with tag (complex, holomorphic: the derivative with respect to Im ε is i times it; cells in the PML keep their stretch).

Exceptions
InvalidArgumentif no cell has the tag or the sizes do not match.

◆ resonance_material_derivative< 2 >()

template ResonanceDerivative hpfem::physics::resonance_material_derivative< 2 > ( const Resonance< 2 > &  ,
const ResonantMode &  ,
const ModeAdjoint &  ,
mesh::Tag   
)
extern

◆ resonance_material_derivative< 3 >()

template ResonanceDerivative hpfem::physics::resonance_material_derivative< 3 > ( const Resonance< 3 > &  ,
const ResonantMode &  ,
const ModeAdjoint &  ,
mesh::Tag   
)
extern

◆ resonance_pencil()

template<int Dim>
std::unique_ptr< RieszPencil > hpfem::physics::resonance_pencil ( const Resonance< Dim > &  problem)

The pencil of a Resonance problem: PEC DoFs removed, hanging-node constraints applied, exactly as Resonance::solve builds it, so its poles are the modes of that solve.

◆ resonance_pencil< 2 >()

template std::unique_ptr< RieszPencil > hpfem::physics::resonance_pencil< 2 > ( const Resonance< 2 > &  )
extern

◆ resonance_pencil< 3 >()

template std::unique_ptr< RieszPencil > hpfem::physics::resonance_pencil< 3 > ( const Resonance< 3 > &  )
extern

◆ resonance_shape_derivative()

template<int Dim>
ResonanceDerivative hpfem::physics::resonance_shape_derivative ( const Resonance< Dim > &  problem,
const ResonantMode &  mode,
const ModeAdjoint &  adjoint,
const NodeField &  velocity,
Real  relative_step = 1e-6 
)

Derivative along a mesh velocity (array (num_geometry_nodes, Dim), ADR-0011), by one central directional difference of the element matrices per moving cell (largest node displacement relative_step cell diameters).

Exceptions
InvalidArgumentif the sizes do not match or the step is not positive.

◆ resonance_shape_derivative< 2 >()

template ResonanceDerivative hpfem::physics::resonance_shape_derivative< 2 > ( const Resonance< 2 > &  ,
const ResonantMode &  ,
const ModeAdjoint &  ,
const NodeField &  ,
Real   
)
extern

◆ resonance_shape_derivative< 3 >()

template ResonanceDerivative hpfem::physics::resonance_shape_derivative< 3 > ( const Resonance< 3 > &  ,
const ResonantMode &  ,
const ModeAdjoint &  ,
const NodeField &  ,
Real   
)
extern

◆ s_parameters()

template<int Dim>
SParameters hpfem::physics::s_parameters ( const fespace::NedelecDofMap< Dim > &  dofs,
ScatteringSetup< Dim >  setup 
)

Solves the problem once per propagating channel (unit incoming amplitude on that channel, none elsewhere; the setup's own amplitudes are ignored) and collects the outgoing amplitudes. Lossless, reciprocal structures give a symmetric unitary S.

Exceptions
InvalidArgumentif the setup has no ports.

◆ s_parameters< 2 >()

template SParameters hpfem::physics::s_parameters< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
ScatteringSetup< 2 >   
)
extern

◆ s_parameters< 3 >()

template SParameters hpfem::physics::s_parameters< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
ScatteringSetup< 3 >   
)
extern

◆ sample_field() [1/3]

SampledField hpfem::physics::sample_field ( const ConicalResonance &  problem,
const ConicalResonantMode &  mode,
const mesh::PointLocator< 2 > &  locator,
std::span< const Point< 2 > >  points,
const SamplingOptions &  options = {} 
)

A conical resonant mode (E, H with the mode's complex ω, or S), physical components; options.scattered must be false.

◆ sample_field() [2/3]

SampledField hpfem::physics::sample_field ( const ConicalScattering &  problem,
const ConicalSolution &  solution,
const mesh::PointLocator< 2 > &  locator,
std::span< const Point< 2 > >  points,
const SamplingOptions &  options = {} 
)

The same for the conical solver: rows (E_x, E_y, E_z), physical components.

◆ sample_field() [3/3]

template<int Dim>
SampledField hpfem::physics::sample_field ( const Scattering< Dim > &  problem,
const ScatteringSolution< Dim > &  solution,
const mesh::PointLocator< Dim > &  locator,
std::span< const Point< Dim > >  points,
const SamplingOptions &  options = {} 
)

Total (or scattered) field of a scattering solution at the points, in parallel. The locator must be built on the problem's mesh. O(N) point locations and evaluations.

Exceptions
InvalidArgumentif the locator belongs to another mesh.

◆ sample_field< 2 >()

template SampledField hpfem::physics::sample_field< 2 > ( const Scattering< 2 > &  ,
const ScatteringSolution< 2 > &  ,
const mesh::PointLocator< 2 > &  ,
std::span< const Point< 2 > >  ,
const SamplingOptions &   
)
extern

◆ sample_field< 3 >()

template SampledField hpfem::physics::sample_field< 3 > ( const Scattering< 3 > &  ,
const ScatteringSolution< 3 > &  ,
const mesh::PointLocator< 3 > &  ,
std::span< const Point< 3 > >  ,
const SamplingOptions &   
)
extern

◆ scatter_orders()

AxisymmetricOrders hpfem::physics::scatter_orders ( const fespace::NedelecDofMap< 2 > &  meridian,
const fespace::DofMap< 2 > &  azimuthal,
AxisymmetricScatteringSetup  setup,
const std::function< AxisymmetricField(int)> &  incident_of_order,
int  max_order,
const Surface< 2 > &  surface,
Real  tolerance = 1e-6 
)

Solves the scattering problem of setup for the orders m = 0, ±1, ±2, … with the incident component incident_of_order(m), stopping when |m| ≥ 2 and the power of both ±m through surface falls below tolerance times the total so far, or at max_order. The setup's azimuthal_order and incident are overwritten per order.

Exceptions
InvalidArgumentfor max_order < 0 or a negative tolerance.

◆ set_material_tensors()

template<int Dim>
void hpfem::physics::set_material_tensors ( assembly::MaxwellForm< Dim > &  form,
const materials::Material &  material,
const pml::PmlBox< Dim > *  pml 
)

Sets form.inverse_permeability and form.permittivity for the medium material, stretched by pml if it is not null (identity inside the interior box). Isotropic media keep the scalar path; a tensor medium uses materials::permittivity_tensor<Dim> (and the stretch \( \tilde\varepsilon_{ij} = \varepsilon_{ij}\det\Lambda/(s_i s_j) \)), which equals the scalar path for \( \varepsilon = \varepsilon_r I \) up to round-off.

Exceptions
AnisotropicUnsupportedin 2D for a tensor that couples the plane to z.

◆ shape_derivative()

template<int Dim>
Complex hpfem::physics::shape_derivative ( const Scattering< Dim > &  problem,
const ScatteringSolution< Dim > &  solution,
const Functional< Dim > &  functional,
const NodeField &  velocity,
Real  relative_step = 1e-6,
Real  functional_step = 1e-6 
)

\( dQ/dp \) of the goal of functional for the mesh velocity V of a parameter: one adjoint solve, the node gradient paired with V, plus the directional derivative of the functional vector along V (central differences with the step functional_step times the largest cell diameter on moved copies of the mesh). The exact derivative of the discrete goal up to the truncation of the differences; test_shape_sensitivity.cpp compares it with finite differences of the solve to 1e-5.

◆ shape_gradient()

template<int Dim>
ComplexNodeField hpfem::physics::shape_gradient ( const Scattering< Dim > &  problem,
const ScatteringSolution< Dim > &  solution,
const Vector &  adjoint,
Real  relative_step = 1e-6 
)

\( \partial Q/\partial x_{n,d} \) for every geometry node and coordinate.

Exceptions
InvalidArgumentif the vectors do not match the map.

◆ shape_residual_derivative()

template<int Dim>
Vector hpfem::physics::shape_residual_derivative ( const Scattering< Dim > &  problem,
const ScatteringSolution< Dim > &  solution,
const NodeField &  velocity,
Real  relative_step = 1e-6 
)

Directional derivative of the full residual \( R = b - A e \) along the mesh velocity V at fixed coefficients e: \( r_V = \sum_K \frac{d}{dt}\big[b_K(x + tV) - A_K(x + tV)\,e_K \big]_{t=0} \) (full size), by one central difference of the element residuals per cell whose nodes move (the largest node displacement relative_step times the cell diameter; the other cells are skipped). The direct mode of the shape derivatives (ADR-0012): \( de/dp = A^{-1} r_V \) on the kept factorisation (KeptFactorisation::solve) and \( dQ/dp = q^\top de + (\partial q/\partial x\cdot V)^\top e \) (functional_shape_derivative) for every observable at once; the adjoint mode pairs it with the adjoint, \( z^\top r_V \) = shape_sensitivity(shape_gradient(...), V) up to the truncation of the differences. The caveats of ADR-0011 apply (V vanishes on Bloch faces and on facets with non-zero Dirichlet data).

Exceptions
InvalidArgumentif the vectors do not match the map, the velocity does not match the geometry nodes, the step is not positive or a perturbed cell degenerates.

◆ shape_sensitivity()

Complex hpfem::physics::shape_sensitivity ( const ComplexNodeField &  gradient,
const NodeField &  velocity 
)

\( dQ/dp = \sum_{n,d} (\partial Q/\partial x_{n,d})\,V_{n,d} \) for the mesh velocity V of a parameter.

Exceptions
InvalidArgumenton mismatched shapes.

◆ solve_many()

template<int Dim>
std::vector< ScatteringSolution< Dim > > hpfem::physics::solve_many ( const Scattering< Dim > &  problem,
std::span< const IncidentField< Dim > >  incidents 
)

Solutions for several incident fields with one factorisation.

◆ solve_many< 2 >()

template std::vector< ScatteringSolution< 2 > > hpfem::physics::solve_many< 2 > ( const Scattering< 2 > &  ,
std::span< const IncidentField< 2 > >   
)
extern

◆ solve_many< 3 >()

template std::vector< ScatteringSolution< 3 > > hpfem::physics::solve_many< 3 > ( const Scattering< 3 > &  ,
std::span< const IncidentField< 3 > >   
)
extern

◆ superpose_far_field()

AxisymmetricFarField hpfem::physics::superpose_far_field ( const std::vector< AxisymmetricFarField > &  patterns,
const std::vector< int > &  orders,
Real  phi 
)

Far-field pattern of the sum of orders at the azimuth φ: \( F(\theta, \varphi) = \sum_m F_m(\theta)\,e^{im\varphi} \) in the spherical components (the patterns must share the polar angles). The radiated power of the result is that of the full field.

Exceptions
InvalidArgumentif the patterns do not share their angles.

◆ surface_quadrature()

template<int Dim>
std::vector< SurfacePoint< Dim > > hpfem::physics::surface_quadrature ( const mesh::Mesh< Dim > &  mesh,
const Surface< Dim > &  surface,
int  order 
)

Quadrature of the given degree on every facet of the surface (Gauss–Legendre on edges, collapsed Gauss–Jacobi on faces), mapped through the cell geometry, so curved facets get their curved measure and normals.

◆ surface_quadrature< 2 >()

template std::vector< SurfacePoint< 2 > > hpfem::physics::surface_quadrature< 2 > ( const mesh::Mesh< 2 > &  ,
const Surface< 2 > &  ,
int   
)
extern

◆ surface_quadrature< 3 >()

template std::vector< SurfacePoint< 3 > > hpfem::physics::surface_quadrature< 3 > ( const mesh::Mesh< 3 > &  ,
const Surface< 3 > &  ,
int   
)
extern

◆ to_literature_frame()

ConicalVector hpfem::physics::to_literature_frame ( const ConicalVector &  v)

Solver frame → literature frame, \( (v_x, v_y, v_z) \mapsto (v_x, -v_z, v_y) \).

◆ triangulate_field() [1/3]

TriangulatedField< 2 > hpfem::physics::triangulate_field ( const ConicalResonance &  problem,
const ConicalResonantMode &  mode,
int  subdivisions,
const SamplingOptions &  options = {} 
)

The same for a conical resonant mode.

◆ triangulate_field() [2/3]

TriangulatedField< 2 > hpfem::physics::triangulate_field ( const ConicalScattering &  problem,
const ConicalSolution &  solution,
int  subdivisions,
const SamplingOptions &  options = {} 
)

The same for the conical solver.

◆ triangulate_field() [3/3]

template<int Dim>
TriangulatedField< Dim > hpfem::physics::triangulate_field ( const Scattering< Dim > &  problem,
const ScatteringSolution< Dim > &  solution,
int  subdivisions,
const SamplingOptions &  options = {} 
)

Total (or scattered) field on the subdivisions-fold subdivided mesh (options.bloch_wrap and interface_side do not apply: every sub-vertex belongs to its parent cell).

Exceptions
InvalidArgumentif subdivisions < 1.

◆ triangulate_field< 2 >()

template TriangulatedField< 2 > hpfem::physics::triangulate_field< 2 > ( const Scattering< 2 > &  ,
const ScatteringSolution< 2 > &  ,
int  ,
const SamplingOptions &   
)
extern

◆ triangulate_field< 3 >()

template TriangulatedField< 3 > hpfem::physics::triangulate_field< 3 > ( const Scattering< 3 > &  ,
const ScatteringSolution< 3 > &  ,
int  ,
const SamplingOptions &   
)
extern

◆ vacuum_wavenumber()

Real hpfem::physics::vacuum_wavenumber ( Real  omega)
inlinenoexcept

Vacuum wavenumber \( k_0 = \omega / c_0 \) [1/m] of the angular frequency ω [rad/s].