Trait sir_ddft::ode::ODEIVP[][src]

pub trait ODEIVP<S> {
    fn rhs(&mut self, t: f64, y: &[f64]) -> Vec<f64>;
fn initial_state(&mut self) -> (f64, Vec<f64>);
fn end_step(&mut self, t: f64, y: &[f64], solver: &S) -> StopCondition;
fn final_state(&mut self, t: f64, y: Vec<f64>); }

General trait implementing an initial value problem in the form of an ordinary differential equation

Note: The generic type S can be used to pass additional information from the solver to the post-step processing. To prevent infinite recursion on trait bound checking, it is not constrained to ExplicitODESolver. Any other type is useless in this context anyway.

Required methods

fn rhs(&mut self, t: f64, y: &[f64]) -> Vec<f64>[src]

Returns right hand side (i.e. the value of f) of IVP y'=f(t,y)

fn initial_state(&mut self) -> (f64, Vec<f64>)[src]

Returns initial state (t_0, y_0) such that y(t_0) = y_0

fn end_step(&mut self, t: f64, y: &[f64], solver: &S) -> StopCondition[src]

Called at the end of each integration step (and once for t_0)

fn final_state(&mut self, t: f64, y: Vec<f64>)[src]

Called at the end of integration giving back the state taken in initial_state

Loading content...

Implementors

impl<S> ODEIVP<S> for SIRDDFT1DIVP[src]

impl<S> ODEIVP<S> for SIRDDFT2DIVP[src]

impl<S> ODEIVP<S> for SIRDiffusion1DIVP[src]

impl<S> ODEIVP<S> for SIRDiffusion2DIVP[src]

impl<S> ODEIVP<S> for SIRODEIVP[src]

Loading content...