ls1-MarDyn
ls1-MarDyn molecular dynamics code
Leapfrog.h
1#ifndef LEAPFROG_H_
2#define LEAPFROG_H_
3
4#include "integrators/Integrator.h"
5
36class Leapfrog : public Integrator {
37public:
38
39 enum {
40 STATE_UNKNOWN = 0,
41 STATE_NEW_TIMESTEP = 1,
42 STATE_PRE_FORCE_CALCULATION = 2,
43 STATE_POST_FORCE_CALCULATION = 3
44 };
46 Leapfrog(double timestepLength);
47 Leapfrog(){}
48
50 ~Leapfrog();
51
52
62 virtual void readXML(XMLfileUnits& xmlconfig);
63
64 virtual void init();
65
69 void eventForcesCalculated(ParticleContainer* molCont, Domain* domain);
70
74 void eventNewTimestep(ParticleContainer* molCont, Domain* domain);
75
76private:
77
79 int _state;
80
85 void transition1to2(ParticleContainer* molCont, Domain* domain);
86
91 void transition2to3(ParticleContainer* molCont, Domain* domain);
93 void transition3to1(ParticleContainer* molCont, Domain* domain);
94
95};
96#endif /* LEAPFROG_H_ */
This class is used to read in the phasespace and to handle macroscopic values.
Definition: Domain.h:47
Update velocities and positions.
Definition: Integrator.h:32
Implementation of the rotational leapfrog integration scheme.
Definition: Leapfrog.h:36
void eventForcesCalculated(ParticleContainer *molCont, Domain *domain)
steps between the force calculation and the end of the time step
Definition: Leapfrog.cpp:35
virtual void init()
Definition: Leapfrog.cpp:21
~Leapfrog()
The destructor.
Definition: Leapfrog.cpp:26
virtual void readXML(XMLfileUnits &xmlconfig)
Read in XML configuration for leapfrog integrator and all its included objects.
Definition: Leapfrog.cpp:28
void eventNewTimestep(ParticleContainer *molCont, Domain *domain)
performs all steps that can be done before new forces are needed
Definition: Leapfrog.cpp:41
This Interface is used to get access to particles and pairs of particles.
Definition: ParticleContainer.h:69
XML file with unit attributes abstraction.
Definition: xmlfileUnits.h:25