Struct FluidFdtdState
pub struct FluidFdtdState {
pub step_index: u64,
pub p: Vec<f64>,
pub vx: Vec<f64>,
pub vy: Vec<f64>,
pub vz: Vec<f64>,
pub prev_vx: Vec<f64>,
pub prev_vy: Vec<f64>,
pub prev_vz: Vec<f64>,
pub cpml_psi: Vec<f64>,
}Expand description
Complete restartable state for the 3D staggered fluid acoustic FDTD solver.
Fields§
§step_index: u64Current step index $n$.
p: Vec<f64>Cell-centered pressure $p^n(i,j,k)$ in Pa.
vx: Vec<f64>Face-centered velocity $v_x^{n+1/2}(i+1/2,j,k)$ in m/s.
vy: Vec<f64>Face-centered velocity $v_y^{n+1/2}(i,j+1/2,k)$ in m/s.
vz: Vec<f64>Face-centered velocity $v_z^{n+1/2}(i,j,k+1/2)$ in m/s.
prev_vx: Vec<f64>Prior half-step velocity $v_x^{n-1/2}$ for exact temporal collocation at $t = n\Delta t$.
prev_vy: Vec<f64>Prior half-step velocity $v_y^{n-1/2}$ for exact temporal collocation at $t = n\Delta t$.
prev_vz: Vec<f64>Prior half-step velocity $v_z^{n-1/2}$ for exact temporal collocation at $t = n\Delta t$.
cpml_psi: Vec<f64>CPML auxiliary memory variables $\psi_{v_x}, \psi_{v_y}, \psi_{v_z}, \psi_{p_x}, \psi_{p_y}, \psi_{p_z}$.
Implementations§
§impl FluidFdtdState
impl FluidFdtdState
pub fn new(cfg: &FluidFdtdConfig) -> Result<FluidFdtdState, NumericalError>
pub fn new(cfg: &FluidFdtdConfig) -> Result<FluidFdtdState, NumericalError>
Allocate a zero-initialized state for the given validated solver configuration.
pub fn encode_restart_bytes(&self) -> Vec<u8> ⓘ
pub fn encode_restart_bytes(&self) -> Vec<u8> ⓘ
Serialize complete internal and boundary state for deterministic bitwise restart (C02-C09).
pub fn decode_restart_bytes(
cfg: &FluidFdtdConfig,
bytes: &[u8],
) -> Result<FluidFdtdState, NumericalError>
pub fn decode_restart_bytes( cfg: &FluidFdtdConfig, bytes: &[u8], ) -> Result<FluidFdtdState, NumericalError>
Reconstruct complete state from deterministic restart bytes.
Trait Implementations§
§impl Clone for FluidFdtdState
impl Clone for FluidFdtdState
§fn clone(&self) -> FluidFdtdState
fn clone(&self) -> FluidFdtdState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for FluidFdtdState
impl Debug for FluidFdtdState
§impl PartialEq for FluidFdtdState
impl PartialEq for FluidFdtdState
impl StructuralPartialEq for FluidFdtdState
Auto Trait Implementations§
impl Freeze for FluidFdtdState
impl RefUnwindSafe for FluidFdtdState
impl Send for FluidFdtdState
impl Sync for FluidFdtdState
impl Unpin for FluidFdtdState
impl UnsafeUnpin for FluidFdtdState
impl UnwindSafe for FluidFdtdState
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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