GR Engine
A physics engine in curved space-time
 All Classes Files Functions Variables
Public Member Functions | Protected Attributes | List of all members
Integrator Class Referenceabstract

Base class implementing a numerical integrator. More...

#include <numeric.h>

Inheritance diagram for Integrator:
DPIntegrator RK4Integrator

Public Member Functions

 Integrator (double stepSize=0.01)
 Constructor. More...
 
virtual ~Integrator ()
 Virtual destructor.
 
virtual StateVector next (StateVector state, DiffEq *equation, double step=0.0)=0
 Function returning the next value of the state. More...
 
void setStepSize (double)
 Sets the default step size.
 
void resetStepSize ()
 Resets the step size to the value passed to the constructor.
 
double getStepSize ()
 Returns the default step size.
 

Protected Attributes

double stepSize
 Default step size.
 
double initStepSize
 Step size which was given to the constructor (for resetting purposes)
 

Detailed Description

Base class implementing a numerical integrator.

Class represents an integrator, which calculates the state of the system based on the initial state and a time step. Overloading this class allows implementation of various integrating algorithms.

Constructor & Destructor Documentation

Integrator::Integrator ( double  stepSize = 0.01)

Constructor.

Parameters
stepSizeInitial step size

Member Function Documentation

virtual StateVector Integrator::next ( StateVector  state,
DiffEq equation,
double  step = 0.0 
)
pure virtual

Function returning the next value of the state.

Parameters
stateInitial state
equationDifferential equation to be used for propagation
stepStep size. Defaults to 0.0.
Returns
Next value of the state vector.

Implemented in DPIntegrator, and RK4Integrator.


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