From ccf79edeb1abf5a8c144586ec5cf3c14bbe4bc25 Mon Sep 17 00:00:00 2001 From: oscarddssmith Date: Wed, 15 May 2024 11:02:19 -0400 Subject: [PATCH] only bail out as instable when dt is small or error is somewhat controlled --- src/integrator_interface.jl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/integrator_interface.jl b/src/integrator_interface.jl index 00424ffbc..9593baeb4 100644 --- a/src/integrator_interface.jl +++ b/src/integrator_interface.jl @@ -619,10 +619,15 @@ function check_error(integrator::DEIntegrator) end if integrator.opts.unstable_check(integrator.dt, integrator.u, integrator.p, integrator.t) - if integrator.opts.verbose - @warn("Instability detected. Aborting") + bigtol = max(integrator.opts.reltol, integrator.opts.abstol) + # only declare instability if the dt is very small + # or we have at least one digit of accuracy in the solution + if integrator.dt