GR Engine
A physics engine in curved space-time
 All Classes Files Functions Variables
Public Member Functions | List of all members
RK4Integrator Class Reference

Class implementing an RK4 numerical integrator. More...

#include <rk4integrator.h>

Inheritance diagram for RK4Integrator:
Integrator

Public Member Functions

 RK4Integrator (double stepSize=0.01)
 Constructor. More...
 
 ~RK4Integrator ()
 Destructor.
 
StateVector next (StateVector state, DiffEq *equation, double step=0.0)
 Function calculating the next state. More...
 
- Public Member Functions inherited from Integrator
 Integrator (double stepSize=0.01)
 Constructor. More...
 
virtual ~Integrator ()
 Virtual destructor.
 
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.
 

Additional Inherited Members

- Protected Attributes inherited from Integrator
double stepSize
 Default step size.
 
double initStepSize
 Step size which was given to the constructor (for resetting purposes)
 

Detailed Description

Class implementing an RK4 numerical integrator.

Constructor & Destructor Documentation

RK4Integrator::RK4Integrator ( double  stepSize = 0.01)

Constructor.

Parameters
stepSizeDefault step size

Member Function Documentation

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

Function calculating the next state.

Parameters
stateCurrent state
equationThe differential equation to be used
stepStep size. If 0 (default), the default step size is used.

Implements Integrator.


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