example_pkg.schemes
Time steps for a particle in a force field: kick, drift and their leapfrog.
Driftclass#
class Drift(Scheme)Bases: Scheme
Move the position at the current velocity.
Numerics
update
Assumptions:
- velocity constant over the step
Kickclass#
class Kick(Scheme)Bases: Scheme
Change the velocity by the acceleration at the current position.
Numerics
update
Leapfrogclass#
class Leapfrog(Scheme)Bases: Scheme
Half a kick, a drift and half a kick: the velocity Verlet scheme.
Numerics
half kick
drift
kick
energy
Order of accuracy: x: 2, v: 2.
Assumptions:
- the acceleration depends on the position only
References:
- Hairer, Lubich and Wanner, Geometric Numerical Integration (2006), section I.1.4
Built from:
example_pkg.schemes.Kickexample_pkg.schemes.Drift
Schemeclass#
class Scheme(NumericalMethod)Bases: NumericalMethod
A one-step scheme for x'' = a(x).