ls1-MarDyn
ls1-MarDyn molecular dynamics code
Public Types | Public Member Functions | List of all members
Leapfrog Class Reference

Implementation of the rotational leapfrog integration scheme. More...

#include <Leapfrog.h>

Inheritance diagram for Leapfrog:
Integrator

Public Types

enum  { STATE_UNKNOWN = 0 , STATE_NEW_TIMESTEP = 1 , STATE_PRE_FORCE_CALCULATION = 2 , STATE_POST_FORCE_CALCULATION = 3 }
 

Public Member Functions

 Leapfrog (double timestepLength)
 The constructor.
 
 ~Leapfrog ()
 The destructor.
 
virtual void readXML (XMLfileUnits &xmlconfig)
 Read in XML configuration for leapfrog integrator and all its included objects. More...
 
virtual void init ()
 
void eventForcesCalculated (ParticleContainer *molCont, Domain *domain)
 steps between the force calculation and the end of the time step More...
 
void eventNewTimestep (ParticleContainer *molCont, Domain *domain)
 performs all steps that can be done before new forces are needed More...
 
- Public Member Functions inherited from Integrator
 Integrator ()
 The constructor.
 
 Integrator (double timestepLength)
 
virtual ~Integrator ()
 The destructor.
 
void setTimestepLength (double dt)
 set the time between two time steps
 
double getTimestepLength ()
 get the time between two time steps
 

Additional Inherited Members

- Protected Attributes inherited from Integrator
double _timestepLength
 time between time step n and time step (n+1)
 

Detailed Description

Implementation of the rotational leapfrog integration scheme.

TODO: unnecessarily complicated and cluttered:

This Leapfrog integrator is implemented as a deterministic finite automaton (DFA):

For details about the algorithm see David Fincham's paper "Leapfrog rotational algorithms". [1]

Member Function Documentation

◆ eventForcesCalculated()

void Leapfrog::eventForcesCalculated ( ParticleContainer molCont,
Domain domain 
)
virtual

steps between the force calculation and the end of the time step

checks whether the current state of the integrator allows that this method is called

Implements Integrator.

◆ eventNewTimestep()

void Leapfrog::eventNewTimestep ( ParticleContainer molCont,
Domain domain 
)
virtual

performs all steps that can be done before new forces are needed

checks whether the current state of the integrator allows that this method is called

Implements Integrator.

◆ init()

void Leapfrog::init ( )
virtual

Initialize Integrator

Implements Integrator.

◆ readXML()

void Leapfrog::readXML ( XMLfileUnits xmlconfig)
virtual

Read in XML configuration for leapfrog integrator and all its included objects.

The following xml object structure is handled by this method:

<integrator type="Leapfrog" >
<timestep>DOUBLE</timestep>
</integrator>

Implements Integrator.


The documentation for this class was generated from the following files: