Struct HelmholtzConfig
pub struct HelmholtzConfig {
pub dims: [usize; 3],
pub spacing_m: [f64; 3],
pub omega_rad_s: f64,
pub phase_speed_m_s: f64,
pub attenuation_np_m: f64,
pub stencil: HelmholtzStencil,
pub boundary: HelmholtzBoundary,
}Expand description
Configuration for the 3D Helmholtz operator $(\nabla^2 + k^2)\hat{p} = -\hat{s}$.
Fields§
§dims: [usize; 3]Grid dimensions (nx, ny, nz).
spacing_m: [f64; 3]Grid spacing (dx, dy, dz) in metres.
omega_rad_s: f64Angular frequency $\omega = 2\pi f$ in $\text{rad}\cdot\text{s}^{-1}$ ($\omega \ge 0$).
phase_speed_m_s: f64Phase speed $c(\omega) > 0$ in $\text{m}\cdot\text{s}^{-1}$.
attenuation_np_m: f64Attenuation coefficient $\alpha(\omega) \ge 0$ in $\text{Np}\cdot\text{m}^{-1}$.
stencil: HelmholtzStencilStencil discretization kind.
boundary: HelmholtzBoundaryBoundary condition kind.
Implementations§
§impl HelmholtzConfig
impl HelmholtzConfig
pub fn validate(&self) -> Result<Complex64, NumericalError>
pub fn validate(&self) -> Result<Complex64, NumericalError>
Validate grid dimensions, spacing, and physical wavenumber parameters.
pub fn wavenumber(&self) -> Complex64
pub fn wavenumber(&self) -> Complex64
Complex wavenumber $k = \frac{\omega}{c(\omega)} + i\alpha(\omega)$ in $\text{m}^{-1}$.
pub fn wavenumber_squared(&self) -> Complex64
pub fn wavenumber_squared(&self) -> Complex64
Squared complex wavenumber $k^2$.
pub const fn node_count(&self) -> usize
pub const fn node_count(&self) -> usize
Total grid node count nx * ny * nz.
Trait Implementations§
§impl Clone for HelmholtzConfig
impl Clone for HelmholtzConfig
§fn clone(&self) -> HelmholtzConfig
fn clone(&self) -> HelmholtzConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for HelmholtzConfig
§impl Debug for HelmholtzConfig
impl Debug for HelmholtzConfig
§impl PartialEq for HelmholtzConfig
impl PartialEq for HelmholtzConfig
impl StructuralPartialEq for HelmholtzConfig
Auto Trait Implementations§
impl Freeze for HelmholtzConfig
impl RefUnwindSafe for HelmholtzConfig
impl Send for HelmholtzConfig
impl Sync for HelmholtzConfig
impl Unpin for HelmholtzConfig
impl UnsafeUnpin for HelmholtzConfig
impl UnwindSafe for HelmholtzConfig
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