DelayNumericalMethod

Trait DelayNumericalMethod 

Source
pub trait DelayNumericalMethod<const L: usize, T, Y, H>
where T: Real, Y: State<T>, H: Fn(T) -> Y,
{ // Required methods fn init<F>( &mut self, dde: &F, t0: T, tf: T, y0: &Y, phi: &H, ) -> Result<Evals, Error<T, Y>> where F: DDE<L, T, Y>; fn step<F>(&mut self, dde: &F, phi: &H) -> Result<Evals, Error<T, Y>> where F: DDE<L, T, Y>; fn t(&self) -> T; fn y(&self) -> &Y; fn t_prev(&self) -> T; fn y_prev(&self) -> &Y; fn h(&self) -> T; fn set_h(&mut self, h: T); fn status(&self) -> &Status<T, Y>; fn set_status(&mut self, status: Status<T, Y>); }
Expand description

Trait for DDE solvers.

Implemented by types that can solve DDEs via repeated calls to step.

Required Methods§

Source

fn init<F>( &mut self, dde: &F, t0: T, tf: T, y0: &Y, phi: &H, ) -> Result<Evals, Error<T, Y>>
where F: DDE<L, T, Y>,

Initialize the solver before integration

§Arguments
  • dde - System of DDEs to solve.
  • t0 - Initial time.
  • tf - Final time.
  • y0 - Initial state at t0.
  • phi - Initial history function phi(t) returning state Y for t <= t0.
§Returns
  • Result<Evals, Error<T, Y>> - Ok(evals) if initialization is successful, Err otherwise.
Source

fn step<F>(&mut self, dde: &F, phi: &H) -> Result<Evals, Error<T, Y>>
where F: DDE<L, T, Y>,

Advance the solution by one step

§Arguments
  • dde - System of DDEs to solve.
§Returns
  • Result<Evals, Error<T, Y>> - Ok(evals) if step is successful, Err otherwise.
Source

fn t(&self) -> T

Time of last accepted step

Source

fn y(&self) -> &Y

State at last accepted step

Source

fn t_prev(&self) -> T

Time of previous accepted step

Source

fn y_prev(&self) -> &Y

State at previous accepted step

Source

fn h(&self) -> T

Step size for next step

Source

fn set_h(&mut self, h: T)

Set step size for next step

Source

fn status(&self) -> &Status<T, Y>

Current solver status

Source

fn set_status(&mut self, status: Status<T, Y>)

Set solver status

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<const L: usize, T: Real, Y: State<T>, H: Fn(T) -> Y, const O: usize, const S: usize, const I: usize> DelayNumericalMethod<L, T, Y, H> for ExplicitRungeKutta<Delay, Adaptive, T, Y, O, S, I>

Source§

impl<const L: usize, T: Real, Y: State<T>, H: Fn(T) -> Y, const O: usize, const S: usize, const I: usize> DelayNumericalMethod<L, T, Y, H> for ExplicitRungeKutta<Delay, DormandPrince, T, Y, O, S, I>

Source§

impl<const L: usize, T: Real, Y: State<T>, H: Fn(T) -> Y, const O: usize, const S: usize, const I: usize> DelayNumericalMethod<L, T, Y, H> for ExplicitRungeKutta<Delay, Fixed, T, Y, O, S, I>