num::verlet¶
Defined in header <ode/ode.hpp>
template <typename Accel = accel_fn, typename State = vec<real>>
requires vector_space<State> && std::invocable<Accel &, const State &, State &>
basic_verlet_steps<Accel, State> verlet(Accel accel, State q0, State v0,
ode_params p = {});
Return the steps of the velocity Verlet method, computed as they are read: \(\ddot{q} = a(q)\).
Notes¶
Energy drift stays bounded over long runs.