[][src]Trait bacon_sci::ivp::IVPSolver

pub trait IVPSolver<N: ComplexField>: Sized {
    pub fn step<T: Clone>(
        &mut self,
        f: fn(_: N::RealField, _: &[N], _: &mut T) -> Result<DVector<N>, String>,
        params: &mut T
    ) -> Result<IVPStatus<N>, String>;
pub fn with_tolerance(self, tol: N::RealField) -> Result<Self, String>;
pub fn with_dt_max(self, max: N::RealField) -> Result<Self, String>;
pub fn with_dt_min(self, min: N::RealField) -> Result<Self, String>;
pub fn with_start(self, t_initial: N::RealField) -> Result<Self, String>;
pub fn with_end(self, t_final: N::RealField) -> Result<Self, String>;
pub fn with_initial_conditions(self, start: &[N]) -> Result<Self, String>;
pub fn build(self) -> Self;
pub fn get_initial_conditions(&self) -> Option<DVector<N>>;
pub fn get_time(&self) -> Option<N::RealField>;
pub fn check_start(&self) -> Result<(), String>; pub fn solve_ivp<T: Clone>(
        self,
        f: fn(_: N::RealField, _: &[N], _: &mut T) -> Result<DVector<N>, String>,
        params: &mut T
    ) -> Result<Vec<(N::RealField, DVector<N>)>, String> { ... } }

Trait defining what it means to be an IVP solver. solve_ivp is automatically implemented based on your step implementation.

Required methods

pub fn step<T: Clone>(
    &mut self,
    f: fn(_: N::RealField, _: &[N], _: &mut T) -> Result<DVector<N>, String>,
    params: &mut T
) -> Result<IVPStatus<N>, String>
[src]

Step forward in the solver. Returns if the solver is finished, produced an acceptable state, or needs to be redone.

pub fn with_tolerance(self, tol: N::RealField) -> Result<Self, String>[src]

Set the error tolerance for this solver.

pub fn with_dt_max(self, max: N::RealField) -> Result<Self, String>[src]

Set the maximum time step for this solver.

pub fn with_dt_min(self, min: N::RealField) -> Result<Self, String>[src]

Set the minimum time step for this solver.

pub fn with_start(self, t_initial: N::RealField) -> Result<Self, String>[src]

Set the initial time for this solver.

pub fn with_end(self, t_final: N::RealField) -> Result<Self, String>[src]

Set the end time for this solver.

pub fn with_initial_conditions(self, start: &[N]) -> Result<Self, String>[src]

Set the initial conditions for this solver.

pub fn build(self) -> Self[src]

Build this solver.

pub fn get_initial_conditions(&self) -> Option<DVector<N>>[src]

Return the initial conditions. Called once at the very start of solving.

pub fn get_time(&self) -> Option<N::RealField>[src]

Get the current time of the solver.

pub fn check_start(&self) -> Result<(), String>[src]

Make sure that every value that needs to be set is set before the solver starts

Loading content...

Provided methods

pub fn solve_ivp<T: Clone>(
    self,
    f: fn(_: N::RealField, _: &[N], _: &mut T) -> Result<DVector<N>, String>,
    params: &mut T
) -> Result<Vec<(N::RealField, DVector<N>)>, String>
[src]

Solve an initial value problem, consuming the solver

Loading content...

Implementors

impl<N: ComplexField> IVPSolver<N> for AdamsInfo<N>[src]

impl<N: ComplexField> IVPSolver<N> for RKInfo<N>[src]

impl<N: ComplexField> IVPSolver<N> for Euler<N>[src]

Loading content...