Struct sir_ddft::SZDDFT2DIVP
source · pub struct SZDDFT2DIVP { /* private fields */ }
Expand description
Initial value problem for the SZ-DDFT model in two spatial dimensions
Note: The model is technically a PDE, but is transformed to a high-dimensional ODE via the finite difference method.
Implementations§
source§impl SZDDFT2DIVP
impl SZDDFT2DIVP
sourcepub fn new(
sir_params: SZParameters,
diff_params: SZDiffusionParameters,
ddft_params: SZDDFTParameters,
state: SZStateSpatial2D,
num_threads: usize
) -> Self
pub fn new( sir_params: SZParameters, diff_params: SZDiffusionParameters, ddft_params: SZDDFTParameters, state: SZStateSpatial2D, num_threads: usize ) -> Self
Creates a new IVP for the SIR DDFT model
Note that for now only square grid (i.e. n x n
grid points) with equal lattice spacing
in x and y are supported!
sourcepub fn get_result(&self) -> (f64, SZStateSpatial2DBorrowed<'_>)
pub fn get_result(&self) -> (f64, SZStateSpatial2DBorrowed<'_>)
Get current time and state
Note that the type of the return value is not SIRStateSpatial2D, but a similar construct with references
sourcepub fn clone_state(&self) -> Vec<f64>
pub fn clone_state(&self) -> Vec<f64>
Raw read access to the state (used in profiling)
Trait Implementations§
source§impl<S> ODEIVP<S, f64> for SZDDFT2DIVP
impl<S> ODEIVP<S, f64> for SZDDFT2DIVP
source§fn rhs(&mut self, _: f64, y: &[f64], rhs: &mut [f64])
fn rhs(&mut self, _: f64, y: &[f64], rhs: &mut [f64])
Returns right hand side (i.e. the value of
f
) of IVP y'=f(t,y)
source§fn initial_state(&mut self) -> (f64, Vec<f64>)
fn initial_state(&mut self) -> (f64, Vec<f64>)
Returns initial state
(t_0, y_0)
such that y(t_0) = y_0
Auto Trait Implementations§
impl Freeze for SZDDFT2DIVP
impl !RefUnwindSafe for SZDDFT2DIVP
impl Send for SZDDFT2DIVP
impl !Sync for SZDDFT2DIVP
impl Unpin for SZDDFT2DIVP
impl !UnwindSafe for SZDDFT2DIVP
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