ndarray-odeint 0.5.1

solve ODE using rust-ndarray

ndarray-odeint

Crate docs.rs Build Status

solve ODE with rust-ndarray

Algorithms

  • explicit
    • Euler
    • Heun
    • classical 4th order Runge-Kutta
  • semi-implicit
    • stiff RK4

Models

Basic chaotic dynamics are implemented as examples

Example

use ndarray::rcarr1;
use itertools::iterate;
use ndarray_odeint::prelude::*;

let dt = 0.01;
let eom = Lorenz63::default();
let teo = explicit::rk4(eom, dt);
let ts = iterate(rcarr1(&[1.0, 0.0, 0.0]), |y| teo.iterate(y.clone()));
let end_time = 10000;
for v in ts.take(end_time) {
  println!("{:?}", &v);
}

Lorenz63 Attractor

Figures are plotted by matplotlib (see plot script).

Lyapunov Analysis

See Notebook

Accuracy Check

See Notebook

License

MIT-License, see LICENSE file.