Public Member Functions | Protected Attributes | List of all members
o2scl::ode_step< vec_y_t, vec_dydx_t, vec_yerr_t, func_t > Class Template Referenceabstract

ODE stepper base [abstract base]. More...

#include <ode_step.h>

Inheritance diagram for o2scl::ode_step< vec_y_t, vec_dydx_t, vec_yerr_t, func_t >:
o2scl::ode_rk8pd_gsl< vec_y_t, vec_dydx_t, vec_yerr_t, func_t > o2scl::ode_rkck_gsl< vec_y_t, vec_dydx_t, vec_yerr_t, func_t > o2scl::ode_rkf45_gsl< vec_y_t, vec_dydx_t, vec_yerr_t, func_t >

Public Member Functions

virtual int get_order ()
 Return the order of the ODE stepper. More...
 
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)=0
 Perform an integration step. More...
 

Protected Attributes

int order
 The order of the ODE stepper.
 

Detailed Description

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_funct11>
class o2scl::ode_step< vec_y_t, vec_dydx_t, vec_yerr_t, func_t >

Definition at line 41 of file ode_step.h.

Member Function Documentation

◆ get_order()

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_funct11>
virtual int o2scl::ode_step< vec_y_t, vec_dydx_t, vec_yerr_t, func_t >::get_order ( )
inlinevirtual

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

Definition at line 66 of file ode_step.h.

◆ step()

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_funct11>
virtual int o2scl::ode_step< vec_y_t, vec_dydx_t, vec_yerr_t, func_t >::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 
)
pure virtual

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 O2scl implementations allow yout=y and dydx_out=dydx if necessary

Implemented in o2scl::ode_rk8pd_gsl< vec_y_t, vec_dydx_t, vec_yerr_t, func_t >, o2scl::ode_rkck_gsl< vec_y_t, vec_dydx_t, vec_yerr_t, func_t >, o2scl::ode_rkck_gsl< vec_t, vec_t, vec_t, func_t >, and o2scl::ode_rkf45_gsl< vec_y_t, vec_dydx_t, vec_yerr_t, func_t >.


The documentation for this class was generated from the following file:

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).