Class astep_boost (o2scl)¶
-
template<class step_t, 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 astep_boost : public o2scl::astep_base<boost::numeric::ublas::vector<double>, boost::numeric::ublas::vector<double>, boost::numeric::ublas::vector<double>, ode_funct, double>¶ Adaptive stepper based on Boost.
Note
This class is experimental
Public Functions
-
inline astep_boost()¶
-
inline virtual ~astep_boost()¶
-
inline virtual int astep(fp_t &x, fp_t xlimit, fp_t &h, size_t n, vec_y_t &y, vec_dydx_t &dydx_out, vec_yerr_t &yerr, func_t &derivs)¶
Make an adaptive integration step of the system
derivs.This attempts to take a step of size
hfrom the pointxof ann-dimensionalsystemderivsstarting withy. On exit,xandycontain the new values at the end of the step,hcontains the size of the step,dydx_outcontains the derivative at the end of the step, andyerrcontains the estimated error at the end of the step.If the base stepper returns a non-zero value, that value is passed on as the return value of
astep(), though the inputymay still have been modified by the base stepper.
-
inline virtual int astep_derivs(fp_t &x, fp_t xlimit, fp_t &h, size_t n, vec_y_t &y, vec_dydx_t &dydx, vec_yerr_t &yerr, func_t &derivs)¶
Make an adaptive integration step of the system
derivswith derivatives.This attempts to take a step of size
hfrom the pointxof ann-dimensionalsystemderivsstarting withyand given the initial derivativesdydx. On exit,x,yanddydxcontain the new values at the end of the step,hcontains the size of the step,dydxcontains the derivative at the end of the step, andyerrcontains the estimated error at the end of the step.If the base stepper returns a non-zero value, that value is passed on as the return value of
astep(), though the inputsyanddydxmay still have been modified by the base stepper.
-
inline virtual int astep_full(fp_t x, fp_t xlimit, fp_t &x_out, 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)¶
Make an adaptive integration step of the system
derivs.This function performs an adaptive integration step with the
n-dimensionalsystemderivsand parameterpa. It Begins atxwith initial stepsizeh, ensuring that the step goes no farther thanxlimit. At the end of the step, the size of the step taken ishand the new value ofxis inx_out. Initially, the function values and derivatives should be specified inyanddydx. The function values, derivatives, and the error at the end of the step are given inyout,yerr, anddydx_out. Unlike inode_stepobjects, the objectsy,yout,dydx, anddydx_outmust all be distinct.If the base stepper returns a non-zero value, that value is passed on as the return value of
astep(), though the output parameters may still have been modified by the base stepper.
-
inline astep_boost()¶