Class implementing a Dormand-Prince numerical integrator. More...
#include <dpintegrator.h>
Public Member Functions | |
| DPIntegrator (double maxErr=0.000001, double stepSize=0.01, double minStep=0.0001, double maxStep=0.1) | |
| Constructor. More... | |
| ~DPIntegrator () | |
| Destructor. | |
| StateVector | next (StateVector state, DiffEq *equation, double step=0.0) |
| Function calculating the next state. More... | |
| double | getMaxErr () |
| Returns the error margin. | |
| double | getMinStep () |
| Returns the minimal step size. | |
| double | getMaxStep () |
| Returns the maximal step size. | |
| void | setMaxErr (double) |
| Sets the error margin. | |
| void | setMinStep (double) |
| Sets the minimal step size. | |
| void | setMaxStep (double) |
| Sets the maximal step size. | |
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) | |
Class implementing a Dormand-Prince numerical integrator.
The Dormand-Prince method is an adaptive method. After each step the step size is recalculated, so that the error will be just below the predefined error margin. The minimal and maximal step size can also be set.
| DPIntegrator::DPIntegrator | ( | double | maxErr = 0.000001, |
| double | stepSize = 0.01, |
||
| double | minStep = 0.0001, |
||
| double | maxStep = 0.1 |
||
| ) |
Constructor.
| maxErr | The error margin - if the error is larger than this margin, the step size is decreased. |
| stepSize | Default step size |
| minStep | Minimal step size |
| maxStep | Maximal step size |
|
virtual |
Function calculating the next state.
| state | Current state |
| equation | The differential equation to be used |
| step | Step size. If 0 (default), the default step size is used. |
Implements Integrator.
1.8.3.1