Trait peroxide::numerical::ode::ODE

source ·
pub trait ODE<E: Environment> {
    type Records;
    type Param;
    type ODEMethod;

    // Required methods
    fn mut_update(&mut self);
    fn integrate(&mut self) -> Self::Records;
    fn set_initial_condition<T: Real>(&mut self, init: State<T>) -> &mut Self;
    fn set_boundary_condition<T: Real>(
        &mut self,
        bound1: (State<T>, BoundaryCondition),
        bound2: (State<T>, BoundaryCondition)
    ) -> &mut Self;
    fn set_step_size(&mut self, dt: f64) -> &mut Self;
    fn set_method(&mut self, method: Self::ODEMethod) -> &mut Self;
    fn set_stop_condition(&mut self, f: fn(_: &Self) -> bool) -> &mut Self;
    fn has_stopped(&self) -> bool;
    fn set_times(&mut self, n: usize) -> &mut Self;
    fn check_enough(&self) -> bool;
    fn set_env(&mut self, env: E) -> &mut Self;
}
Expand description

ODE solver

  • Records : Type of container to contain results
  • Param : Type of parameter
  • ODEMethod : Explicit or Implicit

Required Associated Types§

Required Methods§

source

fn mut_update(&mut self)

source

fn integrate(&mut self) -> Self::Records

source

fn set_initial_condition<T: Real>(&mut self, init: State<T>) -> &mut Self

source

fn set_boundary_condition<T: Real>( &mut self, bound1: (State<T>, BoundaryCondition), bound2: (State<T>, BoundaryCondition) ) -> &mut Self

source

fn set_step_size(&mut self, dt: f64) -> &mut Self

source

fn set_method(&mut self, method: Self::ODEMethod) -> &mut Self

source

fn set_stop_condition(&mut self, f: fn(_: &Self) -> bool) -> &mut Self

source

fn has_stopped(&self) -> bool

source

fn set_times(&mut self, n: usize) -> &mut Self

source

fn check_enough(&self) -> bool

source

fn set_env(&mut self, env: E) -> &mut Self

Object Safety§

This trait is not object safe.

Implementors§