Explicit

Trait Explicit 

Source
pub trait Explicit<Y, U>
where Self: InterpolateSolution<Y, U> + OdeSolver<Y, U>, Y: Tensor, for<'a> &'a Y: Mul<Scalar, Output = Y> + Sub<&'a Y, Output = Y>, U: TensorVec<Item = Y>,
{ const SLOPES: usize; // Required methods fn dt_beta(&self) -> Scalar; fn dt_expn(&self) -> Scalar; // Provided methods fn integrate( &self, function: impl FnMut(Scalar, &Y) -> Result<Y, String>, time: &[Scalar], initial_condition: Y, ) -> Result<(Vector, U, U), IntegrationError> { ... } fn time_step(&self, error: Scalar, dt: &mut Scalar) { ... } }
Expand description

Base trait for explicit ordinary differential equation solvers.

Required Associated Constants§

Required Methods§

Source

fn dt_beta(&self) -> Scalar

Returns the multiplier for adaptive time steps.

Source

fn dt_expn(&self) -> Scalar

Returns the exponent for adaptive time steps.

Provided Methods§

Source

fn integrate( &self, function: impl FnMut(Scalar, &Y) -> Result<Y, String>, time: &[Scalar], initial_condition: Y, ) -> Result<(Vector, U, U), IntegrationError>

Solves an initial value problem by explicitly integrating a system of ordinary differential equations.

\frac{dy}{dt} = f(t, y),\quad y(t_0) = y_0
Source

fn time_step(&self, error: Scalar, dt: &mut Scalar)

Provides the adaptive time step as a function of the error.

h_{n+1} = \beta h \left(\frac{e_\mathrm{tol}}{e_{n+1}}\right)^{1/p}

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<Y, U> Explicit<Y, U> for BogackiShampine
where Self: OdeSolver<Y, U>, Y: Tensor, for<'a> &'a Y: Mul<Scalar, Output = Y> + Sub<&'a Y, Output = Y>, U: TensorVec<Item = Y>,

Source§

const SLOPES: usize = 4usize

Source§

impl<Y, U> Explicit<Y, U> for DormandPrince
where Self: OdeSolver<Y, U>, Y: Tensor, for<'a> &'a Y: Mul<Scalar, Output = Y> + Sub<&'a Y, Output = Y>, U: TensorVec<Item = Y>,

Source§

const SLOPES: usize = 7usize

Source§

impl<Y, U> Explicit<Y, U> for Verner8
where Self: OdeSolver<Y, U>, Y: Tensor, for<'a> &'a Y: Mul<Scalar, Output = Y> + Sub<&'a Y, Output = Y>, U: TensorVec<Item = Y>,

Source§

const SLOPES: usize = 13usize

Source§

impl<Y, U> Explicit<Y, U> for Verner9
where Self: OdeSolver<Y, U>, Y: Tensor, for<'a> &'a Y: Mul<Scalar, Output = Y> + Sub<&'a Y, Output = Y>, U: TensorVec<Item = Y>,

Source§

const SLOPES: usize = 16usize