Skip to main content

ImplicitZerothOrder

Trait ImplicitZerothOrder 

Source
pub trait ImplicitZerothOrder<Y, U, V, T = Time>
where Self: FixedStep<T> + OdeIntegrator<Y, U>, Y: Differentiate<T> + Tensor, U: TensorVec<Item = Y>, V: TensorVec<Item = Derivative<Y, T>>,
{ // Required method fn residual( &self, function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, IntegrationError>, t: Quantity<T>, y: &Y, t_trial: Quantity<T>, y_trial: &Y, dt: Quantity<T>, ) -> Result<Y, String>; // Provided method fn integrate( &self, function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, IntegrationError>, time: &[Quantity<T>], initial_condition: Y, solver: impl ZerothOrderRootFinding<Y, Y>, ) -> Result<(Times<T>, U, V), IntegrationError> { ... } }
Expand description

Implicit integrators for ordinary differential equations using zeroth-order root-finding.

Required Methods§

Source

fn residual( &self, function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, IntegrationError>, t: Quantity<T>, y: &Y, t_trial: Quantity<T>, y_trial: &Y, dt: Quantity<T>, ) -> Result<Y, String>

Provided Methods§

Source

fn integrate( &self, function: impl FnMut(Quantity<T>, &Y) -> Result<Derivative<Y, T>, IntegrationError>, time: &[Quantity<T>], initial_condition: Y, solver: impl ZerothOrderRootFinding<Y, Y>, ) -> Result<(Times<T>, U, V), IntegrationError>

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

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

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> ImplicitZerothOrder<Y, U, V, T> for BackwardEuler
where Y: Differentiate<T> + Tensor, Derivative<Y, T>: Mul<Quantity<T>, Output = Y>, for<'a> &'a Y: Sub<&'a Y, Output = Y>, U: TensorVec<Item = Y>, V: TensorVec<Item = Derivative<Y, T>>,

Source§

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

Source§

impl<Y, U, V, T> ImplicitZerothOrder<Y, U, V, T> for Trapezoidal
where Y: Differentiate<T> + Tensor, Derivative<Y, T>: Mul<Quantity<T>, Output = Y>, for<'a> &'a Y: Sub<&'a Y, Output = Y>, U: TensorVec<Item = Y>, V: TensorVec<Item = Derivative<Y, T>>,