numra-ode 0.1.3

ODE and DAE solvers for Numra: DoPri5, Tsit5, Verner 6/7/8, Radau5, ESDIRK 3/4/5, BDF, plus forward sensitivity analysis.
Documentation

numra-ode

ODE and DAE solvers for the Numra workspace — with forward sensitivity, event detection, and automatic stiffness handling.

Crates.io docs.rs

Solves initial-value problems dy/dt = f(t, y), y(t0) = y0 with explicit Runge-Kutta, implicit Runge-Kutta, and multistep methods. Includes forward sensitivity analysis, DAE consistent-initialization, structural index reduction, event handling, and parameter-uncertainty propagation.

Example

use numra_ode::{DoPri5, OdeProblem, Solver, SolverOptions};

// Lorenz system
let problem = OdeProblem::new(
    |_t, y: &[f64], dydt: &mut [f64]| {
        let (sigma, rho, beta) = (10.0, 28.0, 8.0 / 3.0);
        dydt[0] = sigma * (y[1] - y[0]);
        dydt[1] = y[0] * (rho - y[2]) - y[1];
        dydt[2] = y[0] * y[1] - beta * y[2];
    },
    0.0, 20.0, vec![1.0, 1.0, 1.0],
);

let opts = SolverOptions::default().rtol(1e-8);
let result = DoPri5::solve(&problem, 0.0, 20.0, &[1.0, 1.0, 1.0], &opts).unwrap();

What's in this crate

Solver families:

Family Solvers
Explicit Runge-Kutta (non-stiff) DoPri5, Tsit5, Vern6, Vern7, Vern8
Implicit Runge-Kutta (stiff) Radau5, Esdirk32, Esdirk43, Esdirk54
Multistep Bdf (variable order 1–5)
Automatic selection Auto, auto_solve, auto_solve_with_hints

Additional capabilities:

  • Forward sensitivity: ParametricOdeSystem, solve_forward_sensitivity, SensitivityResult
  • DAEs: DaeProblem, compute_consistent_initial, structural index reduction (reduce_dae_problem, analyze_dae_index)
  • Events: zero-crossing detection with state resets (bouncing_ball-style)
  • Uncertainty: UncertainParam, solve_with_uncertainty, solve_monte_carlo
  • Diagnostics: SolverStats on every result (accepted/rejected steps, function/Jacobian/LU evaluations)

Composes with

ODE trajectories from this crate flow into:

  • numra-interp for cubic-spline / Akima resampling of the trajectory onto arbitrary points
  • numra-integrate for quadrature of functions defined on the trajectory
  • numra-fft for spectral analysis of the solution
  • numra-signal for peak detection and filtering on the solution
  • numra-ocp for parameter estimation of ODE models against measured data

See interop workflows for verified end-to-end examples.

Install

[dependencies]
numra-ode = "0.1"

Or pull in the whole Numra workspace via the umbrella crate:

[dependencies]
numra = "0.1"

Documentation

License

Numra Academic & Research License (Non-Commercial). Academic and research use is free; commercial use requires a separate license — contact contact@spectralautomata.com. See LICENSE.