Class ode_step (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_step
¶ ODE stepper base [abstract base].
Public Functions
-
ode_step
()¶
-
~ode_step
()¶
-
int
get_order
()¶ Return the order of the ODE stepper.
This is used, for example, by astep_gsl to adaptively adjust the stepsize.
-
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) = 0¶ Perform an integration step.
Given initial value of the n-dimensional function in
y
and the derivative indydx
(which must generally be computed beforehand) at the pointx
, take a step of sizeh
giving the result inyout
, the uncertainty at \( x+h \) inyerr
, and the new derivative at \( x+h \) indydx_out
using functionderivs
to calculate derivatives. Implementations which do not calculateyerr
and/ordydx_out
do not reference these variables so that a blankvec_t
can be given. All of the current implementations allowyout=y
anddydx_out=dydx
if necessary
Protected Attributes
-
int
order
¶ The order of the ODE stepper.
-