Skip to content

num::yoshida4

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_yoshida4_steps<Accel, State> yoshida4(Accel accel, State q0, State v0,
                                            ode_params p = {});

Lazy fourth-order Yoshida trajectory for \(\ddot{q} = a(q)\).

A symmetric composition of three velocity-Verlet substeps, so it stays symplectic.