If I run an integrator to the end with step! and call check_error I get ReturnCode.Success (sol.retcode is ReturnCode.Default). The docstring for check_error! states:
Same as check_error but also set solution's return code
However it doesn't set the solution's return code, but leaves it on ReturnCode.Default. I see solve!handles this case specifically and therefore doesn't see this issue.
Not sure what the best fix is. The return code is not set due to this if condition being false:
Describe the bug π
If I run an integrator to the end with
step!
and callcheck_error
I getReturnCode.Success
(sol.retcode
isReturnCode.Default
). The docstring forcheck_error!
states:However it doesn't set the solution's return code, but leaves it on
ReturnCode.Default
. I seesolve!
handles this case specifically and therefore doesn't see this issue.Not sure what the best fix is. The return code is not set due to this if condition being false:
https://github.com/SciML/SciMLBase.jl/blob/d947bed3aa31cdf54791930cd8272306d6bd0f20/src/integrator_interface.jl#L646
Should that condition perhaps be removed? Or are integration interface users expected to convert Default to Success themselves?
Minimal Reproducible Example π