gsl_astep Class Template Reference

#include <gsl_astep.h>

Inheritance diagram for gsl_astep:

adapt_step

Detailed Description

template<class param_t, class func_t = ode_funct<param_t>, class vec_t = ovector_view, class alloc_vec_t = ovector, class alloc_t = ovector_alloc>
class gsl_astep< param_t, func_t, vec_t, alloc_vec_t, alloc_t >

Adaptive ODE stepper (GSL).

To modify the ODE stepper which is used, use the adapt_step::set_step().

Todo:
Finish implementing the scaled "control"
Idea for future:
Fix so that memory allocation/deallocation is performed only when necessary
Idea for future:
Allow user to find out how many steps were taken, etc.

Definition at line 51 of file gsl_astep.h.


Public Member Functions

template<class svec_t>
int set_scale (size_t nscal, const svec_t &scale)
 Set the scaling for each differential equation.
virtual int astep (double &x, double &h, double xmax, size_t n, vec_t &y, param_t &pa, func_t &derivs)
 Make an adaptive integration step of the system derivs.
virtual int astep_derivs (double &x, double &h, double xmax, size_t n, vec_t &y, vec_t &dydx, param_t &pa, func_t &derivs)
 Make an adaptive integration step of the system derivs.

Data Fields

gsl_ode_control con
 Control specification.

Protected Member Functions

int hadjust (size_t dim, unsigned int ord, const vec_t &y, vec_t &yerr, vec_t &yp, double *h)
 Automatically adjust step-size.
int evolve_apply (gsl_odeiv_evolve *e, size_t nvar, param_t &pa, func_t &derivs, double *t, double t1, double *h, vec_t &y)
 Apply the evolution for the next adaptive step.

Protected Attributes

size_t ndim
 Size of allocated vectors.
alloc_t ao
 Memory allocator for objects of type alloc_vec_t.
size_t sdim
 Number of scalings.
double * scale_abs
 Scalings.

Data Structures

struct  gsl_ode_control
 Control structure for gsl_astep [public typedef]. More...
class  gsl_odeiv_evolve
 The evolution object for gsl_astep [protected subclass]. More...

Member Function Documentation

virtual int astep ( double &  x,
double &  h,
double  xmax,
size_t  n,
vec_t &  y,
param_t &  pa,
func_t &  derivs 
) [inline, virtual]

Make an adaptive integration step of the system derivs.

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 and h contains the size of the step.

Reimplemented from adapt_step.

Definition at line 339 of file gsl_astep.h.

virtual int astep_derivs ( double &  x,
double &  h,
double  xmax,
size_t  n,
vec_t &  y,
vec_t &  dydx,
param_t &  pa,
func_t &  derivs 
) [inline, virtual]

Make an adaptive integration step of the system derivs.

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 and h contains the size of the step.

Reimplemented from adapt_step.

Definition at line 382 of file gsl_astep.h.


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

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page