pub struct PolarTranslation {
terms: Vec<(i32, Complex)>,
order: i32,
degrees: [i32; 2],
radial: Radial,
}Expand description
Fixed spherical mode-pair couplings shared across displacements and pullbacks.
Upstream: treams.sw.translate of one mode pair, which combines
treams.special.tl_vsw_A and tl_vsw_B (tl_vsw_rA and tl_vsw_rB for regular
waves).
Fields§
§terms: Vec<(i32, Complex)>Degree and weight of each term.
order: i32Order difference source.m - destination.m, shared by all terms.
degrees: [i32; 2]Smallest and largest term degree.
radial: RadialImplementations§
Source§impl PolarTranslation
impl PolarTranslation
Sourcepub fn new(
destination: Mode,
source: Mode,
helicity: bool,
radial: Radial,
) -> Result<Self>
pub fn new( destination: Mode, source: Mode, helicity: bool, radial: Radial, ) -> Result<Self>
Prepare one mode pair in helicity or parity polarization.
Sourcefn radial_row<const N: usize>(&self, z: Jet<N>) -> Result<Option<Vec<Jet<N>>>>
fn radial_row<const N: usize>(&self, z: Jet<N>) -> Result<Option<Vec<Jet<N>>>>
Spherical radial jets z_p(kr) of the term degrees, indexed by p minus the
smallest degree, or None when each term evaluates its own.
Outgoing functions come from one AMOS sequence over the degree range. Regular
derivatives outside the series region evaluate each single value once and
share j_p between the value of degree p and the derivative of p - 1,
so they equal those of crate::special::spherical_radial bitwise.
Sourcefn evaluate<const N: usize>(&self, args: [Complex; 3]) -> Result<Jet<N>>
fn evaluate<const N: usize>(&self, args: [Complex; 3]) -> Result<Jet<N>>
The coefficient sum_p weight_p z_p(kr) P_p^order(cos theta) e^(i order phi) at
args = [kr, theta, phi], with the derivatives with respect to the N leading
arguments.
Sourcefn evaluate_jets<const N: usize>(&self, args: [Jet<N>; 3]) -> Result<Jet<N>>
fn evaluate_jets<const N: usize>(&self, args: [Jet<N>; 3]) -> Result<Jet<N>>
One numerical kernel for value-only, coordinate and directional jets.
Sourcepub fn is_self_term(radial: Radial, kr: Complex) -> bool
pub fn is_self_term(radial: Radial, kr: Complex) -> bool
Whether the polarized coefficient of radial waves at the radial argument kr is
the self term, which is zero: singular waves with |kr| < 1e-16, which includes
coinciding expansion centres. The tl_vsw_* coefficients have no such rule.
Upstream: treams.sw.translate, which returns zero there.
Differences: treams returns this zero for any mode labels, such as l = 0 or
polarization 2; the sw.translate ufunc checks the labels first and rejects those.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PolarTranslation
impl RefUnwindSafe for PolarTranslation
impl Send for PolarTranslation
impl Sync for PolarTranslation
impl Unpin for PolarTranslation
impl UnwindSafe for PolarTranslation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.