Class ode_rkck_gsl (o2scl)¶
-
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_rkck_gsl : public o2scl::ode_step<boost::numeric::ublas::vector<double>, boost::numeric::ublas::vector<double>, boost::numeric::ublas::vector<double>, ode_funct, double>¶ Cash-Karp embedded Runge-Kutta ODE stepper (GSL)
Based on [Cash90] .
There is an example for the usage of this class in
examples/ex_ode.cppdocumented 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¶
-
size_t ndim¶
Size of allocated vectors.
Storage for the coefficients
-
inline ode_rkck_gsl()¶
-
inline virtual ~ode_rkck_gsl()¶
-
inline virtual int step(fp_t x, fp_t 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
yand the derivative indydx(which must be computed beforehand) at the pointx, take a step of sizehgiving the result inyout, the uncertainty inyerr, and the new derivative indydx_outusing functionderivsto calculate derivatives. The parametersyoutandyand the parametersdydx_outanddydxmay refer to the same object.If
derivsalways 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.
-
vec_dydx_t k2¶