Class ode_rkf45_gsl (o2scl)¶
-
template<class
vec_y_t
= boost::numeric::ublas::vector<double>, classvec_dydx_t
= vec_y_t, classvec_yerr_t
= vec_y_t, classfunc_t
= ode_funct>
classo2scl
::
ode_rkf45_gsl
: public o2scl::ode_step<boost::numeric::ublas::vector<double>, boost::numeric::ublas::vector<double>, boost::numeric::ublas::vector<double>, ode_funct>¶ Runge-Kutta-Fehlberg embedded Runge-Kutta ODE stepper (GSL)
Based on [Hairer09].
- Todo:
Check this because it may not give exact dydt_out.
Storage for the intermediate steps
-
vec_dydx_t
k2
¶
-
vec_dydx_t
k3
¶
-
vec_dydx_t
k4
¶
-
vec_dydx_t
k5
¶
-
vec_dydx_t
k6
¶
-
size_t
ndim
¶ Size of allocated vectors.
Storage for the coefficients
-
double
ah
[5]¶
-
double
b3
[2]¶
-
double
b4
[3]¶
-
double
b5
[4]¶
-
double
b6
[5]¶
-
double
c1
¶
-
double
c3
¶
-
double
c4
¶
-
double
c5
¶
-
double
c6
¶
-
double
ec
[7]¶
-
ode_rkf45_gsl
()¶
-
~ode_rkf45_gsl
()¶
-
int
step
(double x, double h, size_t n, vec_y_t &y, vec_dydx_t &dydx, vec_y_t &yout, vec_yerr_t &yerr, vec_dydx_t &dydx_out, func_t &derivs)¶ Perform an integration step.
Given initial value of the n-dimensional function in
y
and the derivative indydx
(which must be computed beforehand) at the pointx
, take a step of sizeh
giving the result inyout
, the uncertainty inyerr
, and the new derivative indydx_out
using functionderivs
to calculate derivatives. The parametersyout
andy
and the parametersdydx_out
anddydx
may refer to the same object.If
derivs
always returns zero, then this function will also return zero. If not,step()
will return the first non-zero value which was obtained in a call toderivs
. The error handler is never called.