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ยง
- Vector
Wave Residual - What
vector_wave_arraysaves for its pullback: the family, the labels, the convention and the arguments, each one value for all outputs or one per output. - Wave
Label - The integer labels of one vector wave.
Enumsยง
- Family
- The kind of vector wave
vector_waveevaluates.
Constantsยง
- PARALLEL ๐
- Vector-wave arrays evaluate in parallel from this many elements.
Functionsยง
- angular ๐
- The normalized scalar spherical harmonic
Y_lm(theta, phi)and, iftangentialandl > 0, the angular functionspi = m Y_lm / sin(theta)andtau = dY_lm / dtheta, both divided bysqrt(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;krrisk_rho rho, as in upstreamvcw_*. - evaluate ๐
- fixed_
plane_ ๐pullback - Pullback to
(k, r)of a plane wavep exp(i kยทr), given the polarization jetpin the wave vector. - fixed_
plane_ ๐pushforward - Directional product of a shared polarization and the point-dependent phase.
- harmonics ๐
- The scalar harmonic
Yand, iftangential, the angular functionspiandtauoflabel;Nonewhen|m| > l. - plane ๐
- Plane wave
p exp(i kยทr)at(kx, ky, kz, x, y, z), with the chain rule through the polarizationp(k). - pullback_
impl ๐ vector_wave_pullbackwith derivatives in the firstNarguments, the ones the family reads; the others get zero.- sph_
harm - Scalar spherical harmonic
Y_l^m(theta, phi)at the polar anglethetaand the azimuthphi. - sph_
harm_ from_ vsh_ z - The scalar spherical harmonic
Y = -i Z_rof aFamily::HarmonicZwaveZ(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: theFamily::HarmonicZwave cotangent[i cotangent, 0, 0]for the scalar-harmoniccotangent. - 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_waveover 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_wavefor acotangentof 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.