Skip to content

Solver Reference Table

A reference table for ODE, SDE, and DDE solver types exported by Numra. For optimization, quadrature, interpolation, and other numerical APIs, see the main chapters and the inventory file docs/audit/public-api-method-inventory.md in the Numra repository.

SolverOrderEmbeddedStagesFSALImport
DoPri5547Nonumra::ode::DoPri5
Tsit5547Yesnumra::ode::Tsit5
Vern6659Nonumra::ode::Vern6
Vern77610Nonumra::ode::Vern7
Vern88713Nonumra::ode::Vern8
  • DoPri5: General-purpose default. The “workhorse” for non-stiff problems. Good for rtol ~ 1e-6 to 1e-8.

  • Tsit5: Slightly more efficient than DoPri5 thanks to the FSAL property (the last stage of step n is the first stage of step n+1, saving one RHS call per step). Preferred when many steps are needed.

  • Vern6: When you need 6th-order accuracy. Good for rtol ~ 1e-8 to 1e-10.

  • Vern7: High-accuracy problems. Good for rtol ~ 1e-10 to 1e-12.

  • Vern8: Maximum accuracy for non-stiff problems. Most efficient at very tight tolerances (rtol < 1e-12).

SolverOrderStagesL-stableA-stableImport
ESDIRK322(1)3YesYesnumra::ode::Esdirk32
ESDIRK433(2)4YesYesnumra::ode::Esdirk43
ESDIRK544(3)6YesYesnumra::ode::Esdirk54
Radau553YesYesnumra::ode::Radau5
  • ESDIRK32: Mildly stiff problems where 2nd-order accuracy suffices.

  • ESDIRK43: Moderate stiffness with 3rd-order accuracy.

  • ESDIRK54: Stiff problems requiring 4th-order accuracy.

  • Radau5: The gold standard for severely stiff problems and DAEs. Handles stiffness ratios exceeding 10^11 (Robertson problem).

SolverOrderTypeImport
Bdf1-5 (variable)BDFnumra::ode::Bdf
SolverStrategyImport
AutoStarts explicit, switches to implicit if stiffnumra::ode::Auto
SolverStrong orderWeak orderImport
EulerMaruyama0.51.0numra::sde::EulerMaruyama
Milstein1.01.0numra::sde::Milstein
Sra11.0–1.5 (adaptive; additive noise)numra::sde::Sra1
Sra22.0 (adaptive)numra::sde::Sra2

These types implement the literature’s strong-order-1.5 / weak-order-2 SRA-style adaptive schemes (see numra-sde and algorithm references). Older drafts incorrectly used a different spelling; the public Rust types are Sra1 and Sra2 only.

SolverOrderImport
MethodOfSteps5(4) embedded RK internallynumra::dde::MethodOfSteps

The DDE integrator is exposed as MethodOfSteps (method of steps with an embedded Dormand–Prince pair). Do not use non-exported legacy type names from older drafts.

For decision-oriented guidance beyond these tables, see the method cards.

use numra::ode::{DoPri5, Solver, OdeProblem, SolverOptions};
let problem = OdeProblem::new(
|t, y: &[f64], dydt: &mut [f64]| {
dydt[0] = -y[0];
},
0.0, 10.0,
vec![1.0],
);
let options = SolverOptions::default()
.rtol(1e-8)
.atol(1e-10);
let result = DoPri5::solve(&problem, 0.0, 10.0, &[1.0], &options).unwrap();
OptionDefaultBuilder methodDescription
rtol1e-6.rtol(v)Relative tolerance
atol1e-9.atol(v)Absolute tolerance
h0Auto.h0(v)Initial step size
h_maxInfinity.h_max(v)Maximum step size
h_min1e-14.h_min(v)Minimum step size
max_steps100,000.max_steps(n)Maximum number of steps
output timesNonesee belowOutput at specific times
dense_outputfalse.dense()Enable dense output
events[].event(box)Event functions

To specify output times, use the t_eval builder method with a Vec<S>.

FieldTypeDescription
tVec<S>Time points
yVec<S>Solution (row-major: y[i*dim + j])
dimusizeSystem dimension
statsSolverStatsPerformance statistics
successboolWhether integration succeeded
messageStringError message if failed
eventsVec<Event<S>>Detected events
MethodReturnsDescription
y_final()Option<Vec<S>>Final state vector
t_final()Option<S>Final time
y_at(i)&[S]State at time index i
component(j)Vec<S>j-th variable over all times
iter()Iterator(t, &[S]) pairs
n_steps()usizeNumber of time steps
FieldDescription
n_acceptAccepted steps
n_rejectRejected steps
n_jacJacobian computations
n_luLU decompositions