Module cw

Module cw 

Source
Expand description

Cylindrical vector waves: mode labels, translation coefficients of mode pairs, expansion matrices between bases and over lattices, and the conversion to spherical waves.

Upstream: treams.cw, and treams.special.tl_vcw and tl_vcw_r.

FileContentsUpstream
polar.rspolar_translation and polar_translation_array of one order difference, tl_vcw and translate of one mode pairspecial.tl_vcw, tl_vcw_r, cw.translate
cartesian.rscartesian_translation: one coefficient at a Cartesian displacement, with its derivativestreams-rs extension
expansion.rsexpansion() and lattice_expansionExpand, ExpandLattice, cw.translate_periodic
to_sw.rsto_sw() and to_sw_matrixcw.to_sw, Expand to a spherical basis

Conventions:

  • A translation from a source position to a destination position takes the displacement destination - source. Lattice sums run over source - destination, the argument of crate::lattice::sum.
  • Two modes couple only at equal axial wavenumbers kz and equal polarization indices pol. kz is an exact label: the coupling compares it bit for bit.
  • pol is the polarization index, 0 or 1, with the meanings of crate::sw.
  • Radial::Regular and Radial::Singular are the treams modetype values ‘regular’ and ‘singular’.
  • In CartesianTranslation, every field other than value holds the derivative of value with respect to the input it is named after; position holds the derivatives with respect to the displacement components.

The inline tests modules check how each file computes its results; the physical and adjoint identities of translations and expansions are in properties/waves.rs.

Modules§

cartesian 🔒
Cartesian cylindrical-wave translation and analytic derivatives.
expansion 🔒
Cylindrical expansion matrices between bases and over periodic arrays, with analytic pullbacks. Entries that share a CouplingKey share one coefficient, evaluated once.
polar 🔒
Cylindrical translation coefficients in polar coordinates, of one order difference and of one mode pair, with analytic pullbacks.
to_sw 🔒
Regular cylindrical-to-spherical conversion, including displaced positions.

Structs§

CartesianTranslation
Translation coefficient and its continuous derivatives, with the axial wavenumbers of both modes moving together.
ExpansionResidual
What expansion saves for its pullback: the bases, the wavenumbers, the radial kind and the distinct couplings.
LatticeExpansionResidual
What lattice_expansion saves for its pullback: the bases, the wavenumbers, the lattice, the split and the distinct couplings.
Mode
One cylindrical-wave mode: axial wavenumber kz, order m and polarization index pol.
PolarTranslationResidual
What polar_translation_array saves for its pullback: the orders, the radial kind and the four arguments, each stored once when it is one value for all outputs.
ToSwResidual
What to_sw_matrix saves for its pullback: the bases, the wavenumbers and the polarization convention. The pullback recomputes the derivatives of every entry.

Functions§

cartesian_translation
Translation coefficient of the source mode from to the destination mode to, with its derivatives.
expansion
Construct a cylindrical expansion matrix in the supplied mode order.
lattice_expansion
Periodic cylindrical coupling with exact axial/polarization selection and cached orders.
polar_translation
Cylindrical translation in (k_rho*rho, phi, z, kz) with a fixed order difference, the kernel of tl_vcw. The two axial labels must move together; unequal labels are uncoupled.
polar_translation_array
Evaluate a broadcast array of cylindrical polar translation coefficients; orders holds order differences, as in polar_translation.
tl_vcw
Cylindrical translation coefficient of the mode pair (qz, m) to (kz, mu).
to_sw
Cylindrical-to-spherical coefficient of a sphere and an axis at one position, with fixed mode labels.
to_sw_matrix
Expand regular cylindrical waves around arbitrary spherical expansion positions: the matrix maps cylindrical input amplitudes to regular spherical amplitudes.
translate
Cylindrical translation coefficient of one polarized mode pair.
transverse 🔒
Transverse wavenumber sqrt(k² - kz²) on the branch with nonnegative imaginary part.
transverse_wavenumber 🔒
transverse of a complex wavenumber and a real axial wavenumber.

Type Aliases§

Basis
Cylindrical modes at Cartesian expansion positions.