Skip to main content

OdeSystem

Trait OdeSystem 

Source
pub trait OdeSystem {
    // Required method
    fn ode_rhs(&self, t: f64, y: &[f64], dydt: &mut [f64]);
}
Expand description

Trait representing the right-hand side of an ODE system dy/dt = f(t, y).

Implement this trait to define a system of ordinary differential equations for use with AdaptiveIntegrator and other solvers.

Required Methods§

Source

fn ode_rhs(&self, t: f64, y: &[f64], dydt: &mut [f64])

Evaluate the right-hand side of the ODE system.

§Arguments
  • t - Current time.
  • y - Current state vector (length n).
  • dydt - Output derivative vector (length n, must be filled).

Implementors§