Skip to main content

SplitFunction

Trait SplitFunction 

Source
pub trait SplitFunction<F: IntegrateFloat>: Send + Sync {
    // Required methods
    fn explicit_part(&self, t: F, y: ArrayView1<'_, F>) -> Array1<F>;
    fn implicit_part(&self, t: F, y: ArrayView1<'_, F>) -> Array1<F>;
    fn jacobian_implicit(&self, t: F, y: ArrayView1<'_, F>) -> Array2<F>;
    fn dimension(&self) -> usize;
}
Expand description

Trait for systems split into explicit (non-stiff) and implicit (stiff) parts.

The ODE is written as dy/dt = f_E(t, y) + f_I(t, y).

Implementors must provide:

  • explicit_part: the non-stiff right-hand side f_E
  • implicit_part: the stiff right-hand side f_I
  • jacobian_implicit: the Jacobian ∂f_I/∂y (needed by implicit solvers)
  • dimension: the number of equations

Required Methods§

Source

fn explicit_part(&self, t: F, y: ArrayView1<'_, F>) -> Array1<F>

Non-stiff (explicit) part of the right-hand side

Source

fn implicit_part(&self, t: F, y: ArrayView1<'_, F>) -> Array1<F>

Stiff (implicit) part of the right-hand side

Source

fn jacobian_implicit(&self, t: F, y: ArrayView1<'_, F>) -> Array2<F>

Jacobian of the implicit part ∂f_I/∂y (n×n matrix)

Source

fn dimension(&self) -> usize

Number of equations

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§