pub(crate) struct WaveSet {
basis: MultipoleBasis,
ks: [Complex; 2],
helicity: bool,
radial: Radial,
normalizations: Vec<Complex>,
radial_table_len: usize,
harmonic_tables: Vec<Option<SolidTable>>,
radial_ranges: Vec<Option<(u32, u32)>>,
}Expand description
Evaluates the waves of a multipole basis at any point, for one pair of medium wavenumbers, polarization convention and radial kind.
Fields§
§basis: MultipoleBasis§ks: [Complex; 2]§helicity: bool§radial: Radial§normalizations: Vec<Complex>Point-independent normalization of each spherical mode; empty for cylinders.
radial_table_len: usizeScaled radial functions cached per position and wavenumber: the largest spherical degree plus three, or zero for cylinders.
harmonic_tables: Vec<Option<SolidTable>>Dense harmonic recurrences per (position, wavenumber). Sparse mode sets and interleaved centres use single harmonics instead of repeatedly filling tables.
radial_ranges: Vec<Option<(u32, u32)>>Degree ranges whose outgoing radial values share one Hankel sequence, selected independently of mode order so column permutations retain the same values.
Implementations§
Source§impl WaveSet
impl WaveSet
fn write_state(&self, writer: &mut Writer)
Sourcefn read_state(reader: &mut Reader<'_>) -> Result<Self>
fn read_state(reader: &mut Reader<'_>) -> Result<Self>
Rebuild only basis-dependent normalization and recurrence plans. Sampling values and derivatives remains the responsibility of the later operation.
pub(crate) fn new( basis: MultipoleBasis, ks: [Complex; 2], helicity: bool, radial: Radial, ) -> Result<Self>
Sourcefn of_valid_basis(
basis: MultipoleBasis,
ks: [Complex; 2],
helicity: bool,
radial: Radial,
) -> Result<Self>
fn of_valid_basis( basis: MultipoleBasis, ks: [Complex; 2], helicity: bool, radial: Radial, ) -> Result<Self>
Self::new for a basis that has passed validate.
pub(crate) fn cache<const N: usize>(&self) -> SampleCache<N>
Sourcefn wavenumber(&self, pol: u8) -> usize
fn wavenumber(&self, pol: u8) -> usize
Index of the wavenumber of polarization pol; equal wavenumbers share one.
Sourcepub(crate) fn wave<const N: usize>(
&self,
i: usize,
point: [f64; 3],
cache: &mut SampleCache<N>,
) -> Result<(VectorWave, [Complex; 3])>
pub(crate) fn wave<const N: usize>( &self, i: usize, point: [f64; 3], cache: &mut SampleCache<N>, ) -> Result<(VectorWave, [Complex; 3])>
Wave i at point and, for cylindrical waves at level WITH_AXIAL, its
axial-wavenumber derivative. Derivatives are evaluated only above VALUES.
Sourcefn cached_parts<const N: usize>(
&self,
pidx: usize,
wavenumber: usize,
mode: Mode,
point: [f64; 3],
cache: &mut SampleCache<N>,
) -> Result<[VectorWave; 2]>
fn cached_parts<const N: usize>( &self, pidx: usize, wavenumber: usize, mode: Mode, point: [f64; 3], cache: &mut SampleCache<N>, ) -> Result<[VectorWave; 2]>
The spherical parts of mode at point from the cached radial functions and
a scaled solid harmonic. It rejects what spherical_wave rejects: a wavenumber whose
square underflows and a relative position that overflows.
Sourcefn sampled_operator<const N: usize>(
&self,
points: &[[f64; 3]],
value: impl Fn(usize, usize, VectorWave, [Complex; 3]) -> [Complex; 3] + Sync,
) -> Result<DMatrix<Complex>>
fn sampled_operator<const N: usize>( &self, points: &[[f64; 3]], value: impl Fn(usize, usize, VectorWave, [Complex; 3]) -> [Complex; 3] + Sync, ) -> Result<DMatrix<Complex>>
Sample an operator with shared radial and harmonic work per point. Both the primal and its pushforward write directly into column-major storage.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WaveSet
impl RefUnwindSafe for WaveSet
impl Send for WaveSet
impl Sync for WaveSet
impl Unpin for WaveSet
impl UnwindSafe for WaveSet
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.