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

pub trait IVPSolver<N: ComplexField, S: DimName>: Sized where
    DefaultAllocator: Allocator<N, S>, 
{ pub fn step<T: Clone, F: FnMut(N::RealField, &[N], &mut T) -> Result<VectorN<N, S>, String>>(
        &mut self,
        f: F,
        params: &mut T
    ) -> Result<IVPStatus<N, S>, 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<VectorN<N, S>>;
pub fn get_time(&self) -> Option<N::RealField>;
pub fn check_start(&self) -> Result<(), String>; pub fn solve_ivp<T: Clone, F: FnMut(N::RealField, &[N], &mut T) -> Result<VectorN<N, S>, String>>(
        self,
        f: F,
        params: &mut T
    ) -> Result<Vec<(N::RealField, VectorN<N, S>)>, 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, F: FnMut(N::RealField, &[N], &mut T) -> Result<VectorN<N, S>, String>>(
    &mut self,
    f: F,
    params: &mut T
) -> Result<IVPStatus<N, S>, 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<VectorN<N, S>>[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, F: FnMut(N::RealField, &[N], &mut T) -> Result<VectorN<N, S>, String>>(
    self,
    f: F,
    params: &mut T
) -> Result<Vec<(N::RealField, VectorN<N, S>)>, String>
[src]

Solve an initial value problem, consuming the solver

Loading content...

Implementors

impl<N: ComplexField, S: DimName> IVPSolver<N, S> for AdamsInfo<N, S> where
    DefaultAllocator: Allocator<N, S>, 
[src]

impl<N: ComplexField, S: DimName> IVPSolver<N, S> for BDFInfo<N, S> where
    DefaultAllocator: Allocator<N, S>, 
[src]

impl<N: ComplexField, S: DimName> IVPSolver<N, S> for Euler<N, S> where
    DefaultAllocator: Allocator<N, S>, 
[src]

impl<N: ComplexField, S: DimName, O: DimName> IVPSolver<N, S> for RKInfo<N, S, O> where
    DefaultAllocator: Allocator<N, S>,
    DefaultAllocator: Allocator<N, O>,
    DefaultAllocator: Allocator<N, O, O>,
    DefaultAllocator: Allocator<N, S, O>, 
[src]

Loading content...