All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
VerletIntegrator Class Reference

This is an Integrator which simulates a System using the leap-frog Verlet algorithm. More...

`#include <VerletIntegrator.h>`

Inheritance diagram for VerletIntegrator:

## Public Member Functions

| VerletIntegrator (double stepSize)
| Create a VerletIntegrator. More...
void | step (int steps)
| Advance a simulation through time by taking a series of time steps. More...
Public Member Functions inherited from Integrator
| Integrator ()
virtual | ~Integrator ()
double | getStepSize () const
| Get the size of each time step, in picoseconds. More...
void | setStepSize (double size)
| Set the size of each time step, in picoseconds. More...
double | getConstraintTolerance () const
| Get the distance tolerance within which constraints are maintained, as a fraction of the constrained distance. More...
void | setConstraintTolerance (double tol)
| Set the distance tolerance within which constraints are maintained, as a fraction of the constrained distance. More...

## Protected Member Functions

void | initialize (ContextImpl &context)
| This will be called by the Context when it is created. More...
void | cleanup ()
| This will be called by the Context when it is destroyed to let the Integrator do any necessary cleanup. More...
std::vector< std::string > | getKernelNames ()
| Get the names of all Kernels used by this Integrator. More...
double | computeKineticEnergy ()
| Compute the kinetic energy of the system at the current time. More...
Protected Member Functions inherited from Integrator
virtual void | stateChanged (State::DataType changed)
| This will be called by the Context when the user modifies aspects of the context state, such as positions, velocities, or parameters. More...

## Additional Inherited Members

Protected Attributes inherited from Integrator
ContextImpl * | context
Context * | owner

## Detailed Description

This is an Integrator which simulates a System using the leap-frog Verlet algorithm.

## Constructor & Destructor Documentation

VerletIntegrator | ( | double | stepSize | ) |

explicit

Create a VerletIntegrator.

Parameters

  stepSize | the step size with which to integrate the system (in picoseconds)

## Member Function Documentation

void cleanup | ( |  | ) |

protectedvirtual

This will be called by the Context when it is destroyed to let the Integrator do any necessary cleanup.

It will also get called again if the application calls reinitialize() on the Context.

Reimplemented from Integrator.

double computeKineticEnergy | ( |  | ) |

protectedvirtual

Compute the kinetic energy of the system at the current time.

Implements Integrator.

std::vector<std::string> getKernelNames | ( |  | ) |

protectedvirtual

Get the names of all Kernels used by this Integrator.

Implements Integrator.

void initialize | ( | ContextImpl & | context | ) |

protectedvirtual

This will be called by the Context when it is created.

It informs the Integrator of what context it will be integrating, and gives it a chance to do any necessary initialization. It will also get called again if the application calls reinitialize() on the Context.

Implements Integrator.

void step | ( | int | steps | ) |

virtual

Advance a simulation through time by taking a series of time steps.

Parameters

  steps | the number of time steps to take

Implements Integrator.

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

- VerletIntegrator.h