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

Classes

struct  BackwardWave
 A wave that violates the geometric stability condition of the coordinate-stretching PML. More...
 
class  PmlBox
 
struct  PmlProfile
 

Typedefs

template<int Dim>
using ComplexCoordinates = Eigen::Matrix< Complex, Dim, 1 >
 Per-axis complex stretch factors \( s_\xi \) or stretched coordinates.
 

Functions

template<int Dim>
std::optional< BackwardWave< Dim > > backward_wave (const assembly::PermittivityTensor< Dim > &eps, int axis, int samples=2048)
 

Typedef Documentation

◆ ComplexCoordinates

template<int Dim>
using hpfem::pml::ComplexCoordinates = typedef Eigen::Matrix<Complex, Dim, 1>

Per-axis complex stretch factors \( s_\xi \) or stretched coordinates.

Function Documentation

◆ backward_wave()

template<int Dim>
std::optional< BackwardWave< Dim > > hpfem::pml::backward_wave ( const assembly::PermittivityTensor< Dim > &  eps,
int  axis,
int  samples = 2048 
)

Geometric stability condition of a PML that stretches along axis in a homogeneous medium of relative permittivity eps (Bécache, Fauqueux & Joly 2003; ADR-0015 §2): every propagating wave must have the components of its phase and its group velocity along the stretching direction of the same sign, \( k_d\,v_{g,d} \ge 0 \), otherwise the stretch amplifies it. Checks the real part of eps (in 2D the in-plane block, waves with in-plane k and E, slowness curve \( k^T R^T\varepsilon^{-1}R\,k = k_0^2 \); in 3D both sheets of the Fresnel surface, group velocity along the Poynting vector \( \hat k|E|^2 - E(\hat k\cdot E) \)) on samples wave directions (a half circle in 2D, a Fibonacci hemisphere in 3D; k and −k give the same product). Isotropic media and uniaxial crystals with the optic axis along axis or perpendicular to it never fail; a tilted axis does, already for an ordinary uniaxial crystal, and so does an aligned biaxial crystal along its intermediate principal axis (near the optic axes the group velocity sweeps the cone of internal conical refraction). Directions with no propagating wave (metals, evanescent sheets) are skipped. A tilt below the sampling resolution (about \( \pi/\text{samples} \) in 2D) may go unnoticed; its amplification is correspondingly small.

Returns
the worst wave if the condition fails (worst < −1e-9), nothing otherwise.
Exceptions
InvalidArgumentfor an axis outside [0, Dim) or fewer than 8 samples.