SciML / OrdinaryDiffEq.jl

High performance ordinary differential equation (ODE) and differential-algebraic equation (DAE) solvers, including neural ordinary differential equations (neural ODEs) and scientific machine learning (SciML)
https://diffeq.sciml.ai/latest/
Other
564 stars 211 forks source link

Questions on `integrator.success_iter` vs. `integrator.destats.naccept` #1464

Open ranocha opened 3 years ago

ranocha commented 3 years ago

Both integrator.success_iter and integrator.destats.naccept seem to contain the number of accepted steps/iterations - as far as I understand from their names and implementations. However, there is a subtly but important difference when trying to use them in, say, custom callbacks.

Thus, integrator.success_iter == integrator.destats.naccept - 1 at the end of the integration and whenever callbacks are called. If all steps are accepted, integrator.success_iter == integrator.iter - 1.

My questions are

ChrisRackauckas commented 3 years ago

success_iter is just needed by a few methods. It probably can be eliminated though.