The control function examines the proposed change to the solution and its error estimate produced by a stepping function and attempts to determine the optimal step-size for a user-specified level of error.
The step-size adjustment procedure for this method begins by computing the desired error level D_i for each component,
D_i = eps_abs + eps_rel * (a_y |y_i| + a_dydt h |y'_i|)
and comparing it with the observed error E_i = |yerr_i|. If the observed error E exceeds the desired error level D by more than 10% for any component then the method reduces the step-size by an appropriate factor,
h_new = h_old * S * (D/E)^(1/q)
where q is the consistency order of method (e.g. q=4 for 4(5) embedded RK), and S is a safety factor of 0.9. The ratio D/E is taken to be the maximum of the ratios D_i/E_i.
If the observed error E is less than 50% of the desired error level D for the maximum ratio D_i/E_i then the algorithm takes the opportunity to increase the step-size to bring the error in line with the desired level,
h_new = h_old * S * (E/D)^(1/(q+1))
This encompasses all the standard error scaling methods.
gsl_odeiv_control_standard_new
but with an absolute error
which is scaled for each component by the array scale_abs.
The formula for D_i for this control object is,
D_i = eps_abs * s_i + eps_rel * (a_y |y_i| + a_dydt h |y'_i|)
where s_i is the i-th component of the array scale_abs. The same error control heuristic is used by the Matlab ODE suite.
GSL_ODEIV_HADJ_DEC
. If the error is sufficiently small then
h may be increased and GSL_ODEIV_HADJ_INC
is returned. The
function returns GSL_ODEIV_HADJ_NIL
if the step-size is
unchanged. The goal of the function is to estimate the largest
step-size which satisfies the user-specified accuracy requirements for
the current point.
printf("control method is '%s'\n", gsl_odeiv_control_name (c));
would print something like control method is 'standard'