int (*f)(double*t, double*y, double*yp)
.
More...
Static Public Member Functions | |
static int | f (double *, double *y, double *yp) |
static void | setDimension (long idim) |
Sets the dimension of the VectorFunction argument. | |
static void | setFunction (VectorFunction *Fptr) |
Sets the VectorFunction instance whose evaluate(...) member function will be called. | |
Static Public Attributes | |
static VectorFunction * | fODE |
static DoubleVector | Vin |
static DoubleVector | Vout |
int (*f)(double*t, double*y, double*yp)
.
This function prototype is that required by the f2c translation of rkf45, a Runge-Kutta-Fehlberg 45 implementation.
Since the VectorFunction class has no explicit t dependence, the t argument is ignored in the evaluation process.
yp is determined from y using the evaluate member function of the associated VectorFunction.
Typical use:
Samples of setting the dimension and setting the function are
fortranODEfunction::setDimension(2); fortranODEfunction::setFunction(&F);
The function fortranODEfunction::f has type int (*f)(double*, double*, double*)
and so
fortranODEfunction::f
may be passed to function whose argument is a function pointer of that type.
Fortran routines require that the member function of a class passed into it be a static member function, hence there can only one instance of this class in use in a specific program.
Definition at line 61 of file fortranODEfunction.h.