Next: , Previous: Evolution, Up: Ordinary Differential Equations


26.5 Driver

The driver level is a high level wrapper that combines the evolution, control and stepper objects for easy use.

— Function: gsl_odeiv2_driver * gsl_odeiv2_driver_alloc_y_new (const gsl_odeiv2_system * sys, const gsl_odeiv2_step_type * T, const double hstart, const double epsabs, const double epsrel)

This function returns a pointer to a newly allocated instance of a driver object, with ODE system sys and stepper type T. hstart defines the initial step size. epsabs and epsrel are the absolute and relative error tolerances for all components, respectively.

— Function: gsl_odeiv2_driver * gsl_odeiv2_driver_alloc_scaled_new (const gsl_odeiv2_system * sys, const gsl_odeiv2_step_type * T, const double hstart, const double epsabs, const double epsrel, const double a_y, const double a_dydt, const double scale_abs[])

This function is otherwise similar to gsl_odeiv2_driver_alloc_y_new, but it allows definition of the desired error level D_i similarly to gsl_odeiv2_control_scaled_new with formula

— Function: int gsl_odeiv2_driver_set_hmin (gsl_odeiv2_driver * D, const double hmin)

The function sets a minimum for allowed step size hmin for driver D. Default value is 0.

— Function: int gsl_odeiv2_driver_set_hmax (gsl_odeiv2_driver * D, const double hmax)

The function sets a maximum for allowed step size hmax for driver D. Default value is GSL_DBL_MAX.

— Function: int gsl_odeiv2_driver_set_nmax (gsl_odeiv2_driver * D, const size_t hmin)

The function sets a maximum for allowed number of steps nmin for driver D. Default value of 0 sets no limit for steps.

— Function: int gsl_odeiv2_driver_apply (gsl_odeiv2_driver * D, double * t, const double t1, double y[])

This function evolves the driver system D from t to t1. Initially vector y should contain the values of dependent variables at point t. If the function is unable to complete the calculation, an error code from gsl_odeiv2_evolve_apply is returned, and t and y contain the values from last successful step. In case maximum number of steps is reached, a value of GSL_EMAXITER is returned. If the step size drops below a minimum value set with gsl_odeiv2_driver_set_hmin, the function returns with GSL_ENOPROG.

— Function: int gsl_odeiv2_driver_reset (gsl_odeiv2_driver * D)

This function resets the evolution and stepper objects.

— Function: int gsl_odeiv2_driver_free (gsl_odeiv2_driver * D)

This function frees the driver object, and the related evolution, stepper and control objects.