pub struct SphericalWaveExpansion {
pub frequency: f64,
pub max_degree: u32,
pub te: Vec<C64>,
pub tm: Vec<C64>,
}Expand description
A spherical wave expansion truncated at degree N.
Fields§
§frequency: f64§max_degree: u32§te: Vec<C64>TE amplitudes α_nm, indexed by SphericalWaveExpansion::index.
tm: Vec<C64>TM amplitudes β_nm.
Implementations§
Source§impl SphericalWaveExpansion
impl SphericalWaveExpansion
Sourcepub fn index(n: u32, m: i32) -> usize
pub fn index(n: u32, m: i32) -> usize
The storage index of (n, m): n² − 1 + n + m (degrees from 1).
Sourcepub fn from_far_field<F>(
pattern: F,
frequency: f64,
max_degree: u32,
convention: TimeConvention,
) -> Result<Self, ErrorsJSL>
pub fn from_far_field<F>( pattern: F, frequency: f64, max_degree: u32, convention: TimeConvention, ) -> Result<Self, ErrorsJSL>
Expands a far-field pattern [F_θ, F_φ] (V, e^{−jkr}/r removed, in convention) up to
degree max_degree, projecting by Gauss-Legendre quadrature in θ and the trapezoid rule
in φ (exact for patterns band-limited to that degree).
Sourcepub fn far_field(
&self,
theta: f64,
phi: f64,
convention: TimeConvention,
) -> [C64; 2]
pub fn far_field( &self, theta: f64, phi: f64, convention: TimeConvention, ) -> [C64; 2]
The far-field pattern [F_θ, F_φ] in convention.
Sourcepub fn field_at(
&self,
r: f64,
theta: f64,
phi: f64,
convention: TimeConvention,
) -> [C64; 3]
pub fn field_at( &self, r: f64, theta: f64, phi: f64, convention: TimeConvention, ) -> [C64; 3]
The electric field [E_r, E_θ, E_φ] at a point outside the minimum sphere.
Sourcepub fn radiated_power(&self) -> f64
pub fn radiated_power(&self) -> f64
The radiated power (1/2η) ∫ |F|² dΩ from the coefficients (Parseval).
Sourcepub fn power_by_degree(&self) -> Vec<f64>
pub fn power_by_degree(&self) -> Vec<f64>
The fraction of power carried by each degree n = 1..=N.
Trait Implementations§
Source§impl Clone for SphericalWaveExpansion
impl Clone for SphericalWaveExpansion
Auto Trait Implementations§
impl Freeze for SphericalWaveExpansion
impl RefUnwindSafe for SphericalWaveExpansion
impl Send for SphericalWaveExpansion
impl Sync for SphericalWaveExpansion
impl Unpin for SphericalWaveExpansion
impl UnsafeUnpin for SphericalWaveExpansion
impl UnwindSafe for SphericalWaveExpansion
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
Mutably borrows from an owned value. Read more