An Integrator defines a method for simulating a System by integrating the equations of motion. More...
#include <Integrator.h>
Public Member Functions | |
virtual | ~Integrator () |
double | getStepSize () const |
Get the size of each time step, in picoseconds. | |
void | setStepSize (double size) |
Set the size of each time step, in picoseconds. | |
double | getConstraintTolerance () const |
Get the distance tolerance within which constraints are maintained, as a fraction of the constrained distance. | |
void | setConstraintTolerance (double tol) |
Set the distance tolerance within which constraints are maintained, as a fraction of the constrained distance. | |
virtual void | step (int steps)=0 |
Advance a simulation through time by taking a series of time steps. | |
Protected Member Functions | |
virtual void | initialize (ContextImpl &context)=0 |
This will be called by the Context when it is created. | |
virtual std::vector< std::string > | getKernelNames ()=0 |
Get the names of all Kernels used by this 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. | |
Friends | |
class | ContextImpl |
An Integrator defines a method for simulating a System by integrating the equations of motion.
This is an abstract class. Subclasses define particular integration methods.
Each Integrator object is bound to a particular Context which it integrates. This connection is specified by passing the Integrator as an argument to the constructor of the Context.
virtual ~Integrator | ( | ) | [inline, virtual] |
double getConstraintTolerance | ( | ) | const [inline] |
Get the distance tolerance within which constraints are maintained, as a fraction of the constrained distance.
virtual std::vector<std::string> getKernelNames | ( | ) | [protected, pure virtual] |
Get the names of all Kernels used by this Integrator.
Implemented in BrownianIntegrator, CustomIntegrator, LangevinIntegrator, VariableLangevinIntegrator, VariableVerletIntegrator, and VerletIntegrator.
double getStepSize | ( | ) | const [inline] |
Get the size of each time step, in picoseconds.
If this integrator uses variable time steps, the size of the most recent step is returned.
virtual void initialize | ( | ContextImpl & | context | ) | [protected, pure virtual] |
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.
Implemented in BrownianIntegrator, CustomIntegrator, LangevinIntegrator, VariableLangevinIntegrator, VariableVerletIntegrator, and VerletIntegrator.
void setConstraintTolerance | ( | double | tol | ) | [inline] |
Set the distance tolerance within which constraints are maintained, as a fraction of the constrained distance.
void setStepSize | ( | double | size | ) | [inline] |
Set the size of each time step, in picoseconds.
If this integrator uses variable time steps, the effect of calling this method is undefined, and it may simply be ignored.
size | the step size, measured in ps |
virtual void stateChanged | ( | State::DataType | changed | ) | [inline, protected, virtual] |
This will be called by the Context when the user modifies aspects of the context state, such as positions, velocities, or parameters.
This gives the Integrator a chance to discard cached information. This is only called when the user modifies information using methods of the Context object. It is not called when a ForceImpl object modifies state information in its updateContextState() method (unless the ForceImpl calls a Context method to perform the modification).
changed | this specifies what aspect of the Context was changed |
Reimplemented in CustomIntegrator.
virtual void step | ( | int | steps | ) | [pure virtual] |
Advance a simulation through time by taking a series of time steps.
steps | the number of time steps to take |
Implemented in BrownianIntegrator, CustomIntegrator, LangevinIntegrator, VariableLangevinIntegrator, VariableVerletIntegrator, and VerletIntegrator.
friend class ContextImpl [friend] |