An non-adaptive stepper implementation of astep_base. More...
#include <astep_nonadapt.h>
This class simply calls the specified ODE stepper without any attempt to modify the size of the step. It is primarily useful to allow for simple comparisons between adaptive and non-adaptive solution or to proceed with a solution in places where an adaptive stepper is failing.
To modify the ODE stepper which is used, use the function astep_base::set_step().
Definition at line 55 of file astep_nonadapt.h.
Public Member Functions | |
virtual int | astep (double &x, double xlimit, double &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 . More... | |
virtual int | astep_derivs (double &x, double xlimit, double &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 derivs with derivatives. More... | |
virtual int | astep_full (double x, double xlimit, double &x_out, 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) |
Make an adaptive integration step of the system derivs . More... | |
![]() | |
virtual int | astep (double &x, double xlimit, double &h, size_t n, boost::numeric::ublas::vector< double > &y, boost::numeric::ublas::vector< double > &dydx_out, boost::numeric::ublas::vector< double > &yerr, ode_funct &derivs)=0 |
Make an adaptive integration step of the system derivs . More... | |
virtual int | astep_derivs (double &x, double xlimit, double &h, size_t n, boost::numeric::ublas::vector< double > &y, boost::numeric::ublas::vector< double > &dydx, boost::numeric::ublas::vector< double > &yerr, ode_funct &derivs)=0 |
Make an adaptive integration step of the system derivs with derivatives. More... | |
virtual int | astep_full (double x, double xlimit, double &x_out, double &h, size_t n, boost::numeric::ublas::vector< double > &y, boost::numeric::ublas::vector< double > &dydx, boost::numeric::ublas::vector< double > &yout, boost::numeric::ublas::vector< double > &yerr, boost::numeric::ublas::vector< double > &dydx_out, ode_funct &derivs)=0 |
Make an adaptive integration step of the system derivs with derivatives. More... | |
int | set_step (ode_step< boost::numeric::ublas::vector< double >, boost::numeric::ublas::vector< double >, boost::numeric::ublas::vector< double >, ode_funct > &step) |
Set stepper. More... | |
Protected Attributes | |
size_t | msize |
The allocated vector size. | |
vec_dydx_t | dydx_int |
Internal storage for dydx. More... | |
![]() | |
ode_step< boost::numeric::ublas::vector< double >, boost::numeric::ublas::vector< double >, boost::numeric::ublas::vector< double >, ode_funct > * | stepp |
Pointer to the stepper being used. | |
Additional Inherited Members | |
![]() | |
int | verbose |
Set output level. | |
ode_rkck_gsl< boost::numeric::ublas::vector< double >, boost::numeric::ublas::vector< double >, boost::numeric::ublas::vector< double >, ode_funct > | def_step |
The default stepper. | |
|
inlinevirtual |
This attempts to take a step of size h
from the point x
of an n-dimensional
system derivs
starting with y
. On exit, x
and y
contain the new values at the end of the step, h
contains the size of the step, dydx_out
contains the derivative at the end of the step, and yerr
contains 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 input y
may still have been modified by the base stepper.
Definition at line 103 of file astep_nonadapt.h.
|
inlinevirtual |
This attempts to take a step of size h
from the point x
of an n-dimensional
system derivs
starting with y
and given the initial derivatives dydx
. On exit, x
, y
and dydx
contain the new values at the end of the step, h
contains the size of the step, dydx
contains the derivative at the end of the step, and yerr
contains 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 inputs y
and dydx
may still have been modified by the base stepper.
Definition at line 139 of file astep_nonadapt.h.
|
inlinevirtual |
This function performs an adaptive integration step with the n-dimensional
system derivs
and parameter pa
. It Begins at x
with initial stepsize h
, ensuring that the step goes no farther than xlimit
. At the end of the step, the size of the step taken is h
and the new value of x
is in x_out
. Initially, the function values and derivatives should be specified in y
and dydx
. The function values, derivatives, and the error at the end of the step are given in yout
, yerr
, and dydx_out
. Unlike in ode_step
objects, the objects y
, yout
, dydx
, and dydx_out
must 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.
Definition at line 174 of file astep_nonadapt.h.
|
protected |
Definition at line 72 of file astep_nonadapt.h.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).