Velocity Verlet — second order, symplectic, two acceleration evaluations.
a0 = f(x, v, t)
x += v · dt + 0.5 · a0 · dt²
vHalf = v + 0.5 · a0 · dt
a1 = f(x, vHalf, t + dt)
v = vHalf + 0.5 · a1 · dt
§38's recommendation for conservative particle systems. The second evaluation
needs a velocity that is not yet known, so the half-step velocity is used —
the standard treatment, exact for velocity-independent forces and first-order
accurate in the velocity-dependent term. It is exact for constant
acceleration.
The caller's state is written once, at the end: the second evaluation sees a
scratch state, so a hooked position/velocity fires its change hook exactly
once per step.
Velocity Verlet — second order, symplectic, two acceleration evaluations.
§38's recommendation for conservative particle systems. The second evaluation needs a velocity that is not yet known, so the half-step velocity is used — the standard treatment, exact for velocity-independent forces and first-order accurate in the velocity-dependent term. It is exact for constant acceleration.
The caller's
stateis written once, at the end: the second evaluation sees a scratch state, so a hooked position/velocity fires its change hook exactly once per step.