ImplicitFirstOrder

Trait ImplicitFirstOrder 

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

First-order implicit ordinary differential equation solvers.

Required Methods§

Source

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

Provided Methods§

Source

fn integrate( &self, function: impl FnMut(Scalar, &Y) -> Result<Y, IntegrationError>, jacobian: impl FnMut(Scalar, &Y) -> Result<J, IntegrationError>, time: &[Scalar], initial_condition: Y, solver: impl FirstOrderRootFinding<Y, J, 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, J, U> ImplicitFirstOrder<Y, J, U> for BackwardEuler
where Y: Tensor, for<'a> &'a Y: Mul<Scalar, Output = Y> + Sub<&'a Y, Output = Y>, J: Tensor + TensorArray, U: TensorVec<Item = Y>,

Source§

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

Source§

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