num::ode_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 &>
symplectic_result ode_verlet(Accel accel, State q0, State v0, ode_params p = {},
const symp_observer_fn &observer = {});
Integrate by the velocity Verlet method, which is symplectic: \(\ddot{q} = a(q)\). observer(t, q, v) runs after each step.