Next: ODE Example programs, Previous: Adaptive Step-size Control, Up: Ordinary Differential Equations
The highest level of the system is the evolution function which combines the results of a stepping function and control function to reliably advance the solution forward over an interval (t_0, t_1). If the control function signals that the step-size should be decreased the evolution function backs out of the current step and tries the proposed smaller step-size. This process is continued until an acceptable step-size is found.
This function returns a pointer to a newly allocated instance of an evolution function for a system of dim dimensions.
This function advances the system (e, dydt) from time t and position y using the stepping function step. The new time and position are stored in t and y on output. The initial step-size is taken as h, but this will be modified using the control function c to achieve the appropriate error bound if necessary. The routine may make several calls to step in order to determine the optimum step-size. If the step-size has been changed the value of h will be modified on output. The maximum time t1 is guaranteed not to be exceeded by the time-step. On the final time-step the value of t will be set to t1 exactly.
If the user-supplied functions defined in the system dydt return a status other than
GSL_SUCCESS
the step will be aborted. In this case, t and y will be restored to their pre-step values and the error code from the user-supplied function will be returned. To distinguish between error codes from the user-supplied functions and those fromgsl_odeiv_evolve_apply
itself, any user-defined return values should be distinct from the standard GSL error codes.