earthsciencekit.integrators#
Validated access to SciPy initial-value integration.
- earthsciencekit.integrators.integrate_ode(rhs, initial, time, *, names=None, units=None, rtol=1e-08, atol=1e-10, method='RK45')[source]#
Integrate a real initial-value system and retain the requested samples.
- Parameters:
rhs (callable) –
rhs(t, state)returns derivatives with the same vector shape as state.initial (array_like, shape (m,)) – State at the first supplied time, in the units specified by
units.time (array_like, shape (n,)) – Strictly increasing output times in seconds, with at least two samples.
names (sequence of str or None) – State labels; defaults are x0, x1, … and dimensionless unit labels.
units (sequence of str or None) – State labels; defaults are x0, x1, … and dimensionless unit labels.
rtol (float) – Positive finite scalar solver tolerances; atol uses each state’s units.
atol (float) – Positive finite scalar solver tolerances; atol uses each state’s units.
method (str) – One of RK23, RK45, DOP853, Radau, BDF or LSODA.
- Returns:
Immutable sampled states. Numerical solver errors raise ValueError.
- Return type:
Notes
SciPy adapts its internal steps; the output grid is not the integration step. Solver tolerances do not validate a physical model or guarantee conservation.