Function rkf45::rkf45_adaptive
source · pub fn rkf45_adaptive(
y: &mut [f64],
dydt: &impl Fn(f64, &[f64]) -> Vec<f64>,
options: &AdaptiveOdeSolverOptions,
) -> Result<Vec<f64>, Error>
Expand description
Solves an initial value problem using RKF45 with adaptive time-stepping.
The method of error control and time step refinement are described in Press and Teukolsky’s Adaptive Stepsize Runge-Kutta Integration, Computers in Physics 6, 188 (1992).
Args:
y
: Slice containing the initial value of the solution. This will be updated in-place.dydt
: Function that evaluates the time derivative ofy
.options
: Specifies parameters for the solver.
Returns:
- Vector estimating total elementwise numerical error incurred by integration.