Struct FluidFdtdConfig
pub struct FluidFdtdConfig {
pub dims: [usize; 3],
pub spacing_m: [f64; 3],
pub dt_s: f64,
pub medium: FluidMedium,
pub boundary: FluidBoundaryCondition,
}Expand description
Configuration for the 3D staggered-grid fluid acoustic FDTD solver.
Fields§
§dims: [usize; 3]Grid cell counts (nx, ny, nz).
spacing_m: [f64; 3]Grid spacing (dx, dy, dz) in metres.
dt_s: f64Solver timestep $\Delta t$ in seconds.
medium: FluidMediumFluid medium properties.
boundary: FluidBoundaryConditionBoundary condition mode.
Implementations§
§impl FluidFdtdConfig
impl FluidFdtdConfig
pub fn validate(&self) -> Result<f64, NumericalError>
pub fn validate(&self) -> Result<f64, NumericalError>
Validate grid dimensions, spacing, boundary settings, and the 3D Courant stability gate.
pub const fn cell_count(&self) -> usize
pub const fn cell_count(&self) -> usize
Total number of cells nx * ny * nz.
pub fn max_stable_dt_s(&self) -> f64
pub fn max_stable_dt_s(&self) -> f64
Maximum stable timestep $\Delta t_{\max} = \frac{1}{c\sqrt{\Delta x^{-2}+\Delta y^{-2}+\Delta z^{-2}}}$.
Trait Implementations§
§impl Clone for FluidFdtdConfig
impl Clone for FluidFdtdConfig
§fn clone(&self) -> FluidFdtdConfig
fn clone(&self) -> FluidFdtdConfig
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 FluidFdtdConfig
§impl Debug for FluidFdtdConfig
impl Debug for FluidFdtdConfig
§impl PartialEq for FluidFdtdConfig
impl PartialEq for FluidFdtdConfig
impl StructuralPartialEq for FluidFdtdConfig
Auto Trait Implementations§
impl Freeze for FluidFdtdConfig
impl RefUnwindSafe for FluidFdtdConfig
impl Send for FluidFdtdConfig
impl Sync for FluidFdtdConfig
impl Unpin for FluidFdtdConfig
impl UnsafeUnpin for FluidFdtdConfig
impl UnwindSafe for FluidFdtdConfig
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