Class ode_rk8pd_gsl (o2scl)

O2scl : Class List

template<class vec_y_t = boost::numeric::ublas::vector<double>, class vec_dydx_t = vec_y_t, class vec_yerr_t = vec_y_t, class func_t = ode_funct, class fp_t = double>
class ode_rk8pd_gsl : public o2scl::ode_step<boost::numeric::ublas::vector<double>, boost::numeric::ublas::vector<double>, boost::numeric::ublas::vector<double>, ode_funct, double>

Embedded Runge-Kutta Prince-Dormand ODE stepper (GSL)

Based on [Prince81].

There is an example for the usage of this class in examples/ex_ode.cpp< documented in the Ordinary differential equations example.

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
vec_dydx_t k7
vec_dydx_t k8
vec_dydx_t k9
vec_dydx_t k10
vec_dydx_t k11
vec_dydx_t k12
vec_dydx_t k13
vec_y_t ytmp
size_t ndim

Size of allocated vectors.

Storage for the coefficients

double Abar[13]
double A[12]
double ah[10]
double b21
double b3[2]
double b4[3]
double b5[4]
double b6[5]
double b7[6]
double b8[7]
double b9[8]
double b10[9]
double b11[10]
double b12[11]
double b13[12]
inline ode_rk8pd_gsl()
inline virtual ~ode_rk8pd_gsl()
inline virtual 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 in dydx (which must be computed beforehand) at the point x, take a step of size h giving the result in yout, the uncertainty in yerr, and the new derivative in dydx_out using function derivs to calculate derivatives. The parameters yout and y and the parameters dydx_out and dydx 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 to derivs . The error handler is never called.