Skip to main content

Explicit

Trait Explicit 

Source
pub trait Explicit<Y, U, V, T = Time>
where Self: OdeIntegrator<Y, U>, Y: Differentiable<T> + Tensor, U: TensorVec<Item = Y>, V: TensorVec<Item = Derivative<Y, T>>,
{ const SLOPES: usize; // Required methods fn integrate( &self, function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, String>, time: &[Quantity<T>], initial_condition: Y, ) -> Result<(Times<T>, U, V), IntegrationError>; fn integrate_bounded( &self, function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, String>, bound: impl FnMut(Quantity<T>, &Y) -> Result<Spectrum<T>, String>, safety: Scalar, time: &[Quantity<T>], initial_condition: Y, ) -> Result<(Times<T>, U, V), IntegrationError>; }
Expand description

Explicit integrators for ordinary differential equations.

Required Associated Constants§

Required Methods§

Source

fn integrate( &self, function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, String>, time: &[Quantity<T>], initial_condition: Y, ) -> Result<(Times<T>, U, V), 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 integrate_bounded( &self, function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, String>, bound: impl FnMut(Quantity<T>, &Y) -> Result<Spectrum<T>, String>, safety: Scalar, time: &[Quantity<T>], initial_condition: Y, ) -> Result<(Times<T>, U, V), IntegrationError>

Solves an initial value problem like integrate, subject to a stability bound.

At each step, bound reports the fastest time scale of the right-hand side at the current state, and where its eigenvalues lie in the complex plane. The stability limit is that time scale times the extent of the method’s stability region along the reported direction. The time step may use at most the fraction safety of that limit, where safety is in $(0, 1]$. A fixed time step above it is an error, and an adaptive time step is reduced to it.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<Y, U, V, T> Explicit<Y, U, V, T> for conspire::math::integrate::BogackiShampineFixedStep
where Y: Differentiable<T> + Div<Quantity<T>, Output = Derivative<Y, T>> + Tensor, Derivative<Y, T>: Mul<Quantity<T>, Output = Y>, for<'a> &'a Y: Mul<Scalar, Output = Y> + Sub<&'a Y, Output = Y>, for<'a> &'a Derivative<Y, T>: Mul<Scalar, Output = Derivative<Y, T>> + Mul<Quantity<T>, Output = Y>, U: TensorVec<Item = Y>, V: TensorVec<Item = Derivative<Y, T>>,

Source§

impl<Y, U, V, T> Explicit<Y, U, V, T> for conspire::math::integrate::BogackiShampine
where Y: Differentiable<T> + Div<Quantity<T>, Output = Derivative<Y, T>> + Tensor, Derivative<Y, T>: Mul<Quantity<T>, Output = Y>, for<'a> &'a Y: Mul<Scalar, Output = Y> + Sub<&'a Y, Output = Y>, for<'a> &'a Derivative<Y, T>: Mul<Scalar, Output = Derivative<Y, T>> + Mul<Quantity<T>, Output = Y>, U: TensorVec<Item = Y>, V: TensorVec<Item = Derivative<Y, T>>,

Source§

impl<Y, U, V, T> Explicit<Y, U, V, T> for conspire::math::integrate::DormandPrinceFixedStep
where Y: Differentiable<T> + Tensor, Derivative<Y, T>: Mul<Quantity<T>, Output = Y>, for<'a> &'a Y: Mul<Scalar, Output = Y> + Sub<&'a Y, Output = Y>, for<'a> &'a Derivative<Y, T>: Mul<Scalar, Output = Derivative<Y, T>> + Mul<Quantity<T>, Output = Y>, U: TensorVec<Item = Y>, V: TensorVec<Item = Derivative<Y, T>>,

Source§

impl<Y, U, V, T> Explicit<Y, U, V, T> for conspire::math::integrate::DormandPrince
where Y: Differentiable<T> + Tensor, Derivative<Y, T>: Mul<Quantity<T>, Output = Y>, for<'a> &'a Y: Mul<Scalar, Output = Y> + Sub<&'a Y, Output = Y>, for<'a> &'a Derivative<Y, T>: Mul<Scalar, Output = Derivative<Y, T>> + Mul<Quantity<T>, Output = Y>, U: TensorVec<Item = Y>, V: TensorVec<Item = Derivative<Y, T>>,

Source§

impl<Y, U, V, T> Explicit<Y, U, V, T> for Euler
where Y: Differentiable<T> + Tensor, for<'a> &'a Derivative<Y, T>: Mul<Quantity<T>, Output = Y>, U: TensorVec<Item = Y>, V: TensorVec<Item = Derivative<Y, T>>,

Source§

impl<Y, U, V, T> Explicit<Y, U, V, T> for Heun
where Y: Differentiable<T> + Tensor, Derivative<Y, T>: Mul<Quantity<T>, Output = Y>, for<'a> &'a Derivative<Y, T>: Add<&'a Derivative<Y, T>, Output = Derivative<Y, T>> + Mul<Quantity<T>, Output = Y>, U: TensorVec<Item = Y>, V: TensorVec<Item = Derivative<Y, T>>,

Source§

impl<Y, U, V, T> Explicit<Y, U, V, T> for Midpoint
where Y: Differentiable<T> + Tensor, for<'a> &'a Derivative<Y, T>: Mul<Quantity<T>, Output = Y>, U: TensorVec<Item = Y>, V: TensorVec<Item = Derivative<Y, T>>,

Source§

impl<Y, U, V, T> Explicit<Y, U, V, T> for Ralston
where Y: Differentiable<T> + Tensor, Derivative<Y, T>: Mul<Quantity<T>, Output = Y>, for<'a> &'a Derivative<Y, T>: Add<Derivative<Y, T>, Output = Derivative<Y, T>> + Mul<Scalar, Output = Derivative<Y, T>> + Mul<Quantity<T>, Output = Y>, U: TensorVec<Item = Y>, V: TensorVec<Item = Derivative<Y, T>>,

Source§

impl<Y, U, V, T> Explicit<Y, U, V, T> for conspire::math::integrate::Verner8FixedStep
where Y: Differentiable<T> + Tensor, Derivative<Y, T>: Mul<Quantity<T>, Output = Y>, for<'a> &'a Y: Mul<Scalar, Output = Y> + Sub<&'a Y, Output = Y>, for<'a> &'a Derivative<Y, T>: Mul<Scalar, Output = Derivative<Y, T>> + Mul<Quantity<T>, Output = Y>, U: TensorVec<Item = Y>, V: TensorVec<Item = Derivative<Y, T>>,

Source§

const SLOPES: usize = 12

Source§

impl<Y, U, V, T> Explicit<Y, U, V, T> for conspire::math::integrate::Verner8
where Y: Differentiable<T> + Tensor, Derivative<Y, T>: Mul<Quantity<T>, Output = Y>, for<'a> &'a Y: Mul<Scalar, Output = Y> + Sub<&'a Y, Output = Y>, for<'a> &'a Derivative<Y, T>: Mul<Scalar, Output = Derivative<Y, T>> + Mul<Quantity<T>, Output = Y>, U: TensorVec<Item = Y>, V: TensorVec<Item = Derivative<Y, T>>,

Source§

const SLOPES: usize = 13

Source§

impl<Y, U, V, T> Explicit<Y, U, V, T> for conspire::math::integrate::Verner9FixedStep
where Y: Differentiable<T> + Tensor, Derivative<Y, T>: Mul<Quantity<T>, Output = Y>, for<'a> &'a Y: Mul<Scalar, Output = Y> + Sub<&'a Y, Output = Y>, for<'a> &'a Derivative<Y, T>: Mul<Scalar, Output = Derivative<Y, T>> + Mul<Quantity<T>, Output = Y>, U: TensorVec<Item = Y>, V: TensorVec<Item = Derivative<Y, T>>,

Source§

const SLOPES: usize = 15

Source§

impl<Y, U, V, T> Explicit<Y, U, V, T> for conspire::math::integrate::Verner9
where Y: Differentiable<T> + Tensor, Derivative<Y, T>: Mul<Quantity<T>, Output = Y>, for<'a> &'a Y: Mul<Scalar, Output = Y> + Sub<&'a Y, Output = Y>, for<'a> &'a Derivative<Y, T>: Mul<Scalar, Output = Derivative<Y, T>> + Mul<Quantity<T>, Output = Y>, U: TensorVec<Item = Y>, V: TensorVec<Item = Derivative<Y, T>>,

Source§

const SLOPES: usize = 16