numerics-ode 0.1.0

Research-grade ODE solvers: Euler, RK4, Adams-Bashforth (2-step), Dormand-Prince (RK45 adaptive) — pure Rust, no dependencies
Documentation
  • Coverage
  • 100%
    18 out of 18 items documented1 out of 9 items with examples
  • Size
  • Source code size: 21.79 MB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 500.65 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • SuperInstance/numerics-ode
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • SuperInstance

numerics-ode

Research-grade ordinary differential equation (ODE) solvers implemented in pure Rust with zero external dependencies.

Solvers

  • Euler — First-order explicit method. Simple but only O(h) accurate.
  • RK4 — Classical fourth-order Runge-Kutta. O(h⁴) global error.
  • Adams-Bashforth — Second-order two-step explicit multistep method. O(h²).
  • Dormand-Prince — Embedded RK4(5) with adaptive step-size control. O(h⁴/⁵).

System support

All solvers support both scalar ODEs (dy/dx = f(x, y) where y: f64) and systems of ODEs (dy/dx = f(x, &y) where y: Vec<f64>).

Example

use numerics_ode::rk4;

let f = |_x: f64, y: f64| y; // dy/dx = y
let (xs, ys) = rk4::solve(&f, 0.0, 1.0, 1.0, 100);
assert!((ys[100] - (1.0_f64).exp()).abs() < 1e-8);