#include <eulersolver.h>
Inheritance diagram for GenericEulerSolver:
Public Types | |
typedef int(*) | Function (double t, const double y[], double f[], void *params) |
Public Member Functions | |
GenericEulerSolver (double stepSize, bool adaptive) | |
GenericEulerSolver (int dimension, Function function, void *params, double stepSize, bool adaptive) | |
GenericEulerSolver (const GenericEulerSolver &eulerSolver) | |
void | setDimension (int dimension) |
double | stepSize () const |
void | setStepSize (double stepSize) |
void | doCalcFn (double *t, double y[], double f[]=0) |
bool | doEvolve (double *t, double t1, double y[], double yerr[]) |
QString | solverType () const |
int | dimension () const |
Function | function () const |
virtual void | setFunction (Function function) |
void * | params () const |
virtual void | setParams (void *params) |
double | toleranceAbs () const |
virtual void | setToleranceAbs (double toleranceAbs) |
double | toleranceRel () const |
virtual void | setToleranceRel (double toleranceRel) |
double | localError () const |
double | localErrorRatio () const |
const QString & | name () const |
void | setName (const QString &name) |
See http://en.wikipedia.org/wiki/Numerical_ordinary_differential_equations#The_Euler_method and http://en.wikipedia.org/wiki/Adaptive_step_size
typedef int(*) Function(double t, const double y[], double f[], void *params) [inherited] |
Callback function type
GenericEulerSolver | ( | double | stepSize, | |
bool | adaptive | |||
) |
Constructs GenericEulerSolver
GenericEulerSolver | ( | int | dimension, | |
Function | function, | |||
void * | params, | |||
double | stepSize, | |||
bool | adaptive | |||
) |
Constructs GenericEulerSolver
GenericEulerSolver | ( | const GenericEulerSolver & | eulerSolver | ) |
Copy constructor
void setDimension | ( | int | dimension | ) | [virtual] |
Set ODE dimension
Reimplemented from Solver.
double stepSize | ( | ) | const [inline] |
Set step size
Reimplemented in EulerSolver, and AdaptiveEulerSolver.
void setStepSize | ( | double | stepSize | ) | [inline] |
Get step size
Reimplemented in EulerSolver.
void doCalcFn | ( | double * | t, | |
double | y[], | |||
double | f[] = 0 | |||
) | [virtual] |
Calculate function value
Implements Solver.
bool doEvolve | ( | double * | t, | |
double | t1, | |||
double | y[], | |||
double | yerr[] | |||
) | [virtual] |
QString solverType | ( | ) | const [inline, inherited] |
Get solver type
int dimension | ( | ) | const [inline, inherited] |
Get ODE dimension
Function function | ( | ) | const [inline, inherited] |
Get callback function
virtual void setFunction | ( | Function | function | ) | [inline, virtual, inherited] |
Set callback function
void* params | ( | ) | const [inline, inherited] |
Get callback function params
virtual void setParams | ( | void * | params | ) | [inline, virtual, inherited] |
Set callback function params
Reimplemented in GslGenericSolver.
double toleranceAbs | ( | ) | const [inline, inherited] |
Get absolute allowed local tolerance
virtual void setToleranceAbs | ( | double | toleranceAbs | ) | [inline, virtual, inherited] |
Set absolute allowed local tolerance
Reimplemented in GslGenericSolver.
double toleranceRel | ( | ) | const [inline, inherited] |
Get relative allowed local tolerance
virtual void setToleranceRel | ( | double | toleranceRel | ) | [inline, virtual, inherited] |
Set relative allowed local tolerance
Reimplemented in GslGenericSolver.
double localError | ( | ) | const [inline, inherited] |
Get error estimation from last step
double localErrorRatio | ( | ) | const [inline, inherited] |
Get local tolerance calculated at last step
const QString& name | ( | ) | const [inline, inherited] |
Returns name of the object
void setName | ( | const QString & | name | ) | [inline, inherited] |
Set name of the object