-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
Description
See #19:
Finally, I want to point out that Scipy's odeint does automatic switching between stiff and non-stiff methods and can return method choice and step size information for every step,
sol, info = scipy.integrate.odeint(f, y0, t, (), jac, full_output=True)
step_size_per_step = info['hu']
method_used_per_step = info['mused']
stiff_steps = (method_used_per_step == 2).sum()
non_stiff_steps = sol.size - stiff_steps
# etc
given your API, it would be straightforward to provide this as a fallback when PyGSL is not available (and looking at PyGSL's website does not inspire confidence as a long-term dependency).
This might require a slight redefinition of our solver selection criteria if automatic switching between solvers cannot be disabled in Scipy. Note that Scipy essentially wraps the ODEPACK solver library.