Module vectorwaves

Module vectorwaves 

Source
Expand description

Vector waves one at a time: the vector spherical harmonics and the spherical, cylindrical and plane vector waves in their local component frames, with pullbacks.

Upstream: treams.special.vsh_X, vsh_Y, vsh_Z, vsw_*, vcw_*, vpw_* and sph_harm.

vector_wave evaluates one wave of a Family at six complex arguments, vector_wave_pullback gives the gradients of all six, and vector_wave_array broadcasts both over arrays of labels and arguments. Spherical waves are in spherical components (r, theta, phi), cylindrical waves in (rho, phi, z) and plane waves in Cartesian components, as in treams.

The inline tests module checks the waves against the Cartesian fields of crate::fields, their pullbacks against finite differences, the small-argument branches and the normalization of the harmonics.

Structsยง

VectorWaveResidual
What vector_wave_array saves for its pullback: the family, the labels, the convention and the arguments, each one value for all outputs or one per output.
WaveLabel
The integer labels of one vector wave.

Enumsยง

Family
The kind of vector wave vector_wave evaluates.

Constantsยง

PARALLEL ๐Ÿ”’
Vector-wave arrays evaluate in parallel from this many elements.

Functionsยง

angular ๐Ÿ”’
The normalized scalar spherical harmonic Y_lm(theta, phi) and, if tangential and l > 0, the angular functions pi = m Y_lm / sin(theta) and tau = dY_lm / dtheta, both divided by sqrt(l (l + 1)): [Y, pi, tau], or [Y, 0, 0] otherwise.
checked ๐Ÿ”’
cylindrical ๐Ÿ”’
Cylindrical M and N waves at (kz, krr, phi, z, k), or their helicity combinations; krr is k_rho rho, as in upstream vcw_*.
evaluate ๐Ÿ”’
fixed_plane_pullback ๐Ÿ”’
Pullback to (k, r) of a plane wave p exp(i kยทr), given the polarization jet p in the wave vector.
fixed_plane_pushforward ๐Ÿ”’
Directional product of a shared polarization and the point-dependent phase.
harmonics ๐Ÿ”’
The scalar harmonic Y and, if tangential, the angular functions pi and tau of label; None when |m| > l.
plane ๐Ÿ”’
Plane wave p exp(i kยทr) at (kx, ky, kz, x, y, z), with the chain rule through the polarization p(k).
pullback_impl ๐Ÿ”’
vector_wave_pullback with derivatives in the first N arguments, the ones the family reads; the others get zero.
sph_harm
Scalar spherical harmonic Y_l^m(theta, phi) at the polar angle theta and the azimuth phi.
sph_harm_from_vsh_z
The scalar spherical harmonic Y = -i Z_r of a Family::HarmonicZ wave Z (treams.special.vsh_Z), whose only nonzero component is the radial one, Z_r = i Y.
sph_harm_from_vsh_z_pullback
Pullback of sph_harm_from_vsh_z: the Family::HarmonicZ wave cotangent [i cotangent, 0, 0] for the scalar-harmonic cotangent.
spherical ๐Ÿ”’
Spherical M and N waves at (kr, theta, phi), or their helicity combinations.
tangential ๐Ÿ”’
The tangential X and Y vector harmonics from [Y, pi, tau].
vector_wave
Evaluate a vector wave in its local component frame.
vector_wave_array
vector_wave over arrays of labels and arguments, each one value for all outputs or one per output; the residual keeps only the inputs.
vector_wave_pullback
The gradients of all six complex arguments of vector_wave for a cotangent of the wave. A real physical input takes the real part of its gradient.
vector_wave_pushforward
Directional derivative in the waveโ€™s six complex arguments. One jet slot propagates the supplied direction through the same kernels as the value.