Module basis

Module basis 

Source
Expand description

Multipole bases of modes at expansion positions, and the expansion gradients shared by the spherical and cylindrical families.

Upstream: treams.SphericalWaveBasis and treams.CylindricalWaveBasis. The gradients are a treams-rs extension.

An expansion entry depends on the displacement destination - source between two positions. Its position cotangent therefore adds to the destination position and subtracts from the source position (ExpansionGradient).

Structs§

Basis
Modes of one multipole family at Cartesian expansion positions; crate::sw::Basis and crate::cw::Basis name the two families.
ExpansionGradient
Expansion cotangents, separating destination and source position dependence.
LatticeExpansionGradient
Periodic coupling cotangents including the lattice geometry.

Enums§

MultipoleBasis
A spherical or cylindrical basis, for operations that accept either family: field evaluation, plane-wave expansion and the EBCM surface waves.

Traits§

ModeLabel
The mode label of one multipole family: crate::sw::Mode or crate::cw::Mode.

Functions§

add_pair_gradient 🔒
Pull the cotangent cot of an entry depending on the displacement destination[p] - source[q] (derivative position) and the medium wavenumber of polarization pol (derivative k) back into result.
pair_tangent 🔒
Contract an entry’s local derivatives with its position and medium directions.
validate_expansion_tangent 🔒
Validate the continuous directions shared by finite and lattice expansions.
validate_wavenumbers 🔒
Check the medium wavenumbers ks (negative, positive helicity) of a basis operation: both finite, nonzero unless allow_zero, and equal for parity polarizations (helicity false), because parity waves exist only in an achiral medium. Operations that never mix polarizations pass helicity = true.