#include <nonadapt_step.h>
To modify the ODE stepper which is used, use the function adapt_step::set_step().
Definition at line 49 of file nonadapt_step.h.
Public Member Functions | |
virtual int | astep (double &x, double &h, double xlimit, size_t n, vec_t &y, vec_t &u_dydx_out, vec_t &yerr, param_t &pa, func_t &derivs) |
Make an adaptive integration step of the system derivs . | |
virtual int | astep_full (double x, double &h, double xlimit, double &x_out, size_t n, vec_t &y, vec_t &dydx, vec_t &yout2, vec_t &yerr, vec_t &dydx_out, param_t &pa, func_t &derivs) |
Make an adaptive integration step of the system derivs . | |
virtual int | astep_derivs (double &x, double &h, double xlimit, size_t n, vec_t &y, vec_t &dydx, vec_t &yerr, param_t &pa, func_t &derivs) |
Make an adaptive integration step of the system derivs with derivatives. | |
Protected Attributes | |
size_t | msize |
The allocated vector size. | |
alloc_vec_t | dydx_int |
Internal storage for dydx. | |
alloc_t | ao |
Memory allocator for objects of type alloc_vec_t . |
virtual int astep | ( | double & | x, | |
double & | h, | |||
double | xlimit, | |||
size_t | n, | |||
vec_t & | y, | |||
vec_t & | u_dydx_out, | |||
vec_t & | yerr, | |||
param_t & | pa, | |||
func_t & | derivs | |||
) | [inline, virtual] |
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.
Implements adapt_step.
Definition at line 102 of file nonadapt_step.h.
virtual int astep_derivs | ( | double & | x, | |
double & | h, | |||
double | xlimit, | |||
size_t | n, | |||
vec_t & | y, | |||
vec_t & | dydx, | |||
vec_t & | yerr, | |||
param_t & | pa, | |||
func_t & | derivs | |||
) | [inline, virtual] |
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.
Implements adapt_step.
Definition at line 177 of file nonadapt_step.h.
virtual int astep_full | ( | double | x, | |
double & | h, | |||
double | xlimit, | |||
double & | x_out, | |||
size_t | n, | |||
vec_t & | y, | |||
vec_t & | dydx, | |||
vec_t & | yout2, | |||
vec_t & | yerr, | |||
vec_t & | dydx_out, | |||
param_t & | pa, | |||
func_t & | derivs | |||
) | [inline, virtual] |
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 odestep
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.
Implements adapt_step.
Definition at line 144 of file nonadapt_step.h.
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page