Struct sir_ddft::SIRDDFT2DIVP [−][src]
pub struct SIRDDFT2DIVP { /* fields omitted */ }
Initial value problem for the SIR-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
impl SIRDDFT2DIVP
[src]
pub fn new(
sir_params: SIRParameters,
diff_params: SIRDiffusionParameters,
ddft_params: SIRDDFTParameters,
state: SIRStateSpatial2D,
num_threads: usize
) -> Self
[src]
sir_params: SIRParameters,
diff_params: SIRDiffusionParameters,
ddft_params: SIRDDFTParameters,
state: SIRStateSpatial2D,
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!
pub fn add_time(&mut self, time: f64)
[src]
Increase integration time
pub fn get_result(&self) -> (f64, SIRStateSpatial2DBorrowed<'_>)
[src]
Get current time and state
Note that the type of the return value is not SIRStateSpatial2D, but a similar construct with references
pub fn clone_state(&self) -> Vec<f64>
[src]
Raw read access to the state (used in profiling)
pub fn set_state(&mut self, state: &[f64])
[src]
Raw write access to the state (used in profiling)
Trait Implementations
impl<S> ODEIVP<S> for SIRDDFT2DIVP
[src]
Auto Trait Implementations
impl !RefUnwindSafe for SIRDDFT2DIVP
impl Send for SIRDDFT2DIVP
impl !Sync for SIRDDFT2DIVP
impl Unpin for SIRDDFT2DIVP
impl !UnwindSafe for SIRDDFT2DIVP
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,