-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optionally return the smallest interval #170
Comments
This is possible, but would require some reworking of the convergence assessment functions to make it happen. At one point, the default for bracketing was bisection, but this was switched to the A42 method, as it typically takes far fewer steps. Do you know which method is called? There is an issue to consider, as to what to do when an exact 0 is found and not a zero crossing. |
|
Does #173 provide a reasonable interface for this purpose? It introduces an alternative function |
Thanks very much. Yes, this looks good. |
In DifferentialEquations.jl an issue is reported that could probably be solved with a missing option in Roots.jl:
DifferentialEquations.jl uses Roots.jl for event detection: The zero crossing of f(t) defines an event (where t is time). With a bracketing method an interval is computed [t1,t2] in which the root resides. For event handling of differential equations it is important that the root is returned that has an opposite sign as the zero crossing function had before the event. This means that as root t2 should be used, since it is guaranteed that
f(t2)*f(t1)<=0
. Roots.jl seems to return a more precise approximation of the roott1 <= tstar <= t2
, but there is no guarantee thatf(tstar)*f(t1) <= 0
.It would be very helpful for DifferentialEquations.jl if an option could be added to Roots.jl so that optionally the interval of the result point is also returned, something like:
(info to @ChrisRackauckas)
The text was updated successfully, but these errors were encountered: