ImplicitZerothOrder

Trait ImplicitZerothOrder 

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

Zeroth-order implicit ordinary differential equation solvers.

Required Methods§

Source

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

Provided Methods§

Source

fn integrate( &self, function: impl FnMut(Scalar, &Y) -> Result<Y, IntegrationError>, time: &[Scalar], initial_condition: Y, solver: impl ZerothOrderRootFinding<Y>, ) -> Result<(Vector, U, U), 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", so this trait is not object safe.

Implementors§

Source§

impl<Y, U> ImplicitZerothOrder<Y, U> for BackwardEuler
where Y: Tensor, for<'a> &'a Y: Mul<Scalar, Output = Y> + Sub<&'a Y, Output = Y>, U: TensorVec<Item = Y>,

Source§

impl<Y, U> ImplicitZerothOrder<Y, U> for Midpoint
where Y: Tensor, for<'a> &'a Y: Mul<Scalar, Output = Y> + Add<&'a Y, Output = Y> + Sub<&'a Y, Output = Y>, U: TensorVec<Item = Y>,

Source§

impl<Y, U> ImplicitZerothOrder<Y, U> for Trapezoidal
where Y: Tensor, for<'a> &'a Y: Mul<Scalar, Output = Y> + Add<&'a Y, Output = Y> + Sub<&'a Y, Output = Y>, U: TensorVec<Item = Y>,