IVPStepper

Trait IVPStepper 

Source
pub trait IVPStepper<D: Dimension>: Sized
where DefaultAllocator: Allocator<Self::Field, D>,
{ type Error: Error + From<IVPError>; type Field: ComplexField + Copy; type RealField: RealField; type UserData: Clone; // Required methods fn step(&mut self) -> Step<Self::RealField, Self::Field, D, Self::Error>; fn time(&self) -> Self::RealField; }
Expand description

Implementing this trait is providing the main functionality of an initial value problem solver. This should be used only when implementing an IVPSolver, users should use the solver via the IVPSolver trait’s interface.

Required Associated Types§

Source

type Error: Error + From<IVPError>

Error type. IVPError must be able to convert to the error type.

Source

type Field: ComplexField + Copy

The field, complex or real, that the solver is operating on.

Source

type RealField: RealField

The real field associated with the solver’s Field.

Source

type UserData: Clone

Arbitrary data provided by the user for the derivative function It must be clone because for any intermediate time steps (e.g. in runge-kutta) gives the derivative function a clone of the params: only normal time steps get to update the internal UserData state

Required Methods§

Source

fn step(&mut self) -> Step<Self::RealField, Self::Field, D, Self::Error>

Step forward in the solver. The solver may request a step be redone, signal that the solution is finished, or give the value of the next solution value.

Source

fn time(&self) -> Self::RealField

Get the current time of the solver.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, N, D, T, F> IVPStepper<D> for EulerSolver<'a, N, D, T, F>
where N: ComplexField + Copy, D: Dimension, T: Clone, F: Derivative<N, D, T> + 'a, DefaultAllocator: Allocator<N, D>,

Source§

impl<'a, N, D, const O: usize, T, F> IVPStepper<D> for AdamsSolver<'a, N, D, O, T, F>
where D: Dimension, N: ComplexField + Copy, T: Clone, F: Derivative<N, D, T> + 'a, DefaultAllocator: Allocator<N, D>,

Source§

impl<'a, N, D, const O: usize, T, F> IVPStepper<D> for BDFSolver<'a, N, D, O, T, F>
where N: ComplexField + Copy, D: Dimension + DimMin<D, Output = D>, T: Clone, F: Derivative<N, D, T> + 'a, DefaultAllocator: Allocator<N, D> + Allocator<N, U1, D> + Allocator<N, D, D> + Allocator<(usize, usize), D>,

Source§

impl<'a, N, D, const O: usize, T, F> IVPStepper<D> for RungeKuttaSolver<'a, N, D, O, T, F>
where D: Dimension, N: ComplexField + Copy, T: Clone, F: Derivative<N, D, T> + 'a, DefaultAllocator: Allocator<N, D> + Allocator<N, Const<O>> + Allocator<N, D, Const<O>>,