Skip to content

num::rk45

Defined in header <ode/ode.hpp>

template <typename RHS = ode_rhs_fn, typename State = vec<real>>
requires vector_space<State> && std::invocable<RHS &, real, const State &, State &>
basic_rk45_steps<RHS, State> rk45(RHS f, State y0, ode_params p = {});

Lazy adaptive Dormand--Prince 5(4) trajectory with PI step control.

The embedded pair estimates the local error and sets the step to meet rtol and atol. p supplies t0, tf, rtol, atol and max_steps.