VariableStepExplicit

Trait VariableStepExplicit 

Source
pub trait VariableStepExplicit<Y, U>
where Self: InterpolateSolution<Y, U> + Explicit<Y, U> + VariableStep, Y: Tensor, for<'a> &'a Y: Mul<Scalar, Output = Y> + Sub<&'a Y, Output = Y>, U: TensorVec<Item = Y>,
{ // Required methods fn slopes( &self, function: impl FnMut(Scalar, &Y) -> Result<Y, String>, y: &Y, t: Scalar, dt: Scalar, k: &mut [Y], y_trial: &mut Y, ) -> Result<Scalar, String>; fn step( &self, function: impl FnMut(Scalar, &Y) -> Result<Y, String>, y: &mut Y, t: &mut Scalar, y_sol: &mut U, t_sol: &mut Vector, dydt_sol: &mut U, dt: &mut Scalar, k: &mut [Y], y_trial: &Y, e: Scalar, ) -> Result<(), String>; // Provided methods fn integrate_variable_step( &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

Variable-step explicit ordinary differential equation solvers.

Required Methods§

Source

fn slopes( &self, function: impl FnMut(Scalar, &Y) -> Result<Y, String>, y: &Y, t: Scalar, dt: Scalar, k: &mut [Y], y_trial: &mut Y, ) -> Result<Scalar, String>

Source

fn step( &self, function: impl FnMut(Scalar, &Y) -> Result<Y, String>, y: &mut Y, t: &mut Scalar, y_sol: &mut U, t_sol: &mut Vector, dydt_sol: &mut U, dt: &mut Scalar, k: &mut [Y], y_trial: &Y, e: Scalar, ) -> Result<(), String>

Provided Methods§

Source

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

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> VariableStepExplicit<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§

impl<Y, U> VariableStepExplicit<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§

impl<Y, U> VariableStepExplicit<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§

impl<Y, U> VariableStepExplicit<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>,