Leapfrog integrator

class mdk::Leapfrog : public mdk::Integrator

Leapfrog integration algorithm.

Public Functions

inline explicit Leapfrog(double dt)
virtual void bind(Simulation &simulation) override

Bind an object to a simulation.

Parameters

simulationSimulation to bind the object to.

virtual void init() override

Initialize the state of the integrator.

virtual void integrate() override

Private Members

double dt = 0.005 * tau
Masses m
Vectors a_prev