Skip to content
Projects
These are the docs of the development version (the devel branch). See the docs of the latest release.

Time steps

The equations of example_pkg.schemes, declared on the code that implements them and checked by the tests.

Drift

classsource

Move the position at the current velocity.

update
xn+1=xn+vn Δtx^{n+1} = x^n + v^n\,\Delta t
Assumes
  • velocity constant over the step

Kick

classsource

Change the velocity by the acceleration at the current position.

update
vn+1=vn+a(xn) Δtv^{n+1} = v^n + a(x^n)\,\Delta t

Leapfrog

classsource

Half a kick, a drift and half a kick: the velocity Verlet scheme.

half kick
vn+1/2=vn+12a(xn) Δtv^{n+1/2} = v^n + \tfrac{1}{2} a(x^n)\,\Delta t
drift
xn+1=xn+vn+1/2 Δtx^{n+1} = x^n + v^{n+1/2}\,\Delta t
kick
vn+1=vn+1/2+12a(xn+1) Δtv^{n+1} = v^{n+1/2} + \tfrac{1}{2} a(x^{n+1})\,\Delta t
energy
∣H(xn,vn)−H(x0,v0)∣=O(Δt2)for all n\left|H(x^n, v^n) - H(x^0, v^0)\right| = \mathcal{O}(\Delta t^2) \quad \text{for all } n
Order
x: 2, v: 2
Assumes
  • the acceleration depends on the position only
References
  • Hairer, Lubich and Wanner, Geometric Numerical Integration (2006), section I.1.4
Built from