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_Eimplicit_part: the stiff right-hand side f_Ijacobian_implicit: the Jacobian ∂f_I/∂y (needed by implicit solvers)dimension: the number of equations
Required Methods§
Sourcefn explicit_part(&self, t: F, y: ArrayView1<'_, F>) -> Array1<F>
fn explicit_part(&self, t: F, y: ArrayView1<'_, F>) -> Array1<F>
Non-stiff (explicit) part of the right-hand side
Sourcefn implicit_part(&self, t: F, y: ArrayView1<'_, F>) -> Array1<F>
fn implicit_part(&self, t: F, y: ArrayView1<'_, F>) -> Array1<F>
Stiff (implicit) part of the right-hand side
Sourcefn jacobian_implicit(&self, t: F, y: ArrayView1<'_, F>) -> Array2<F>
fn jacobian_implicit(&self, t: F, y: ArrayView1<'_, F>) -> Array2<F>
Jacobian of the implicit part ∂f_I/∂y (n×n matrix)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".