Class ode_step (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_step

ODE stepper base [abstract base].

Subclassed by o2scl::ode_rkck_gsl< boost::numeric::ublas::vector< double >, boost::numeric::ublas::vector< double >, boost::numeric::ublas::vector< double >, ode_funct, double >, o2scl::ode_rkck_gsl< boost::numeric::ublas::vector< double >, boost::numeric::ublas::vector< double >, boost::numeric::ublas::vector< double >, ode_funct<>, double >, o2scl::ode_rkck_gsl< ubvector, ubvector, ubvector, ode_funct<>, double >, o2scl::ode_rkck_gsl< vector< double >, vector< double >, vector< double >, ode_funct, double >, o2scl::ode_rkck_gsl< solve_grid_mat_row, solve_grid_mat_row, solve_grid_mat_row, ode_funct_solve_grid, double >, o2scl::ode_rkck_gsl< std::vector< double >, std::vector< double >, std::vector< double >, ode_funct2, double >, o2scl::ode_boost< step_t, vec_y_t, vec_dydx_t, vec_yerr_t, func_t, fp_t >, o2scl::ode_rk8pd_gsl< vec_y_t, vec_dydx_t, vec_yerr_t, func_t, fp_t >, o2scl::ode_rkck_gsl< vec_y_t, vec_dydx_t, vec_yerr_t, func_t, fp_t >, o2scl::ode_rkf45_gsl< vec_y_t, vec_dydx_t, vec_yerr_t, func_t, fp_t >

Public Functions

inline ode_step()
inline virtual ~ode_step()
inline virtual int get_order()

Return the order of the ODE stepper.

This is used, for example, by astep_gsl to adaptively adjust the stepsize.

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) = 0

Perform an integration step.

Given initial value of the n-dimensional function in y and the derivative in dydx (which must generally be computed beforehand) at the point x, take a step of size h giving the result in yout, the uncertainty at \( x+h \) in yerr, and the new derivative at \( x+h \) in dydx_out using function derivs to calculate derivatives. Implementations which do not calculate yerr and/or dydx_out do not reference these variables so that a blank vec_t can be given. All of the current implementations allow yout=y and dydx_out=dydx if necessary

Protected Attributes

int order

The order of the ODE stepper.