2.3 KiB
fdfd
::: meanas.fdfd
Core operator layers
::: meanas.fdfd.functional
::: meanas.fdfd.operators
::: meanas.fdfd.solvers
::: meanas.fdfd.scpml
::: meanas.fdfd.farfield
Bloch magnetic materials
Bloch state vectors store the transverse Fourier coefficients of magnetic flux
B = mu * H. They equal H when permeability is omitted. Pass the same mu
to bloch.hmn_2_hxyz(...) and bloch.hmn_2_exyz(...) when converting solved
vectors to fields. The eigensolver uses the projected mu**-1 energy metric
for finite positive real permeability, including anisotropic and spatially
varying profiles. Its preconditioner remains finite at the Gamma point.
Far-field normalization
The near-to-far transform includes the cell area dx * dy, so normalized
far-field amplitudes describe a Fourier integral and converge under spatial
refinement. This changes amplitudes previously returned as unweighted FFT sums.
The inverse applies the matching Fourier quadrature and returns spacings for
the requested output shape. Both transforms center their origins at index
size // 2; padding and cropping preserve that sample. The inverse does not
modify input spectra.
SCPML conventions
stretch_with_scpml now uses -1 for the low-index face and +1 for the
high-index face, matching CPML and propagation conventions. It returns copied
widths by default; pass copy=False to request mutation explicitly.
Both SCPML builders accept kappa_function(depth) for real stretching and
max_imag_ratio to limit the final dimensionless abs(Im(s))/Re(s). Start a
mode-solver convergence study with max_imag_ratio=1.0: overly strong imaginary
stretching can produce above-light-line PML artifacts. The cap is not a general
spectral guarantee, and weaker absorption can increase boundary reflections.
Check domain size, PML thickness, strength, mode localization, and residuals.
The general scattering profile remains uncapped by default.
uniform_grid_scpml builds unit widths by applying stretch_with_scpml to
both faces of each enabled axis. Both builders divide imaginary grading by
physical layer thickness and sample electric widths at cell centers and
magnetic widths at cell edges. This corrects the uniform builder's previous
thickness-independent strength and reversed E/H sample offsets; retune existing
uniform-builder profiles using domain/PML convergence checks.