You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/integrator_interface.jl
+12-17Lines changed: 12 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -613,15 +613,13 @@ function check_error(integrator::DEIntegrator)
613
613
# This implementation is intended to be used for ODEIntegrator and
614
614
# SDEIntegrator.
615
615
ifisnan(integrator.dt)
616
-
if verbose
617
-
@warn("NaN dt detected. Likely a NaN value in the state, parameters, or derivative value caused this outcome.")
618
-
end
616
+
@SciMLMessage("NaN dt detected. Likely a NaN value in the state, parameters, or derivative value caused this outcome.", verbose, :dt_NaN)
619
617
return ReturnCode.DtNaN
620
618
end
621
619
if integrator.iter > opts.maxiters
622
-
if verbose
623
-
@warn("Interrupted. Larger maxiters is needed. If you are using an integrator for non-stiff ODEs or an automatic switching algorithm (the default), you may want to consider using a method for stiff equations. See the solver pages for more details (e.g. https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve/#Stiff-Problems).")
624
-
end
620
+
@SciMLMessage("Interrupted. Larger maxiters is needed. If you are using an integrator for non-stiff ODEs or an automatic switching algorithm (the default), you may want to consider using a method for stiff equations. See the solver pages for more details (e.g. https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve/#Stiff-Problems).",
621
+
verbose,
622
+
:max_iters)
625
623
return ReturnCode.MaxIters
626
624
end
627
625
@@ -637,39 +635,36 @@ function check_error(integrator::DEIntegrator)
EEst =", and step error estimate = $(integrator.EEst)"
643
641
else
644
642
EEst =""
645
643
end
646
-
@warn("dt($(integrator.dt)) <= dtmin($(opts.dtmin)) at t=$(integrator.t)$EEst. Aborting. There is either an error in your model specification or the true solution is unstable.")
647
-
end
644
+
"dt($(integrator.dt)) <= dtmin($(opts.dtmin)) at t=$(integrator.t)$EEst. Aborting. There is either an error in your model specification or the true solution is unstable."
645
+
end
648
646
return ReturnCode.DtLessThanMin
649
647
elseif!step_accepted && integrator.t isa AbstractFloat &&
650
648
abs(integrator.dt) <=abs(eps(integrator.t))
651
-
if verbose
649
+
650
+
@SciMLMessage(verbose, :dt_epsilon) do
652
651
ifisdefined(integrator, :EEst)
653
652
EEst =", and step error estimate = $(integrator.EEst)"
654
653
else
655
654
EEst =""
656
655
end
657
-
@warn("At t=$(integrator.t), dt was forced below floating point epsilon $(integrator.dt)$EEst. Aborting. There is either an error in your model specification or the true solution is unstable (or the true solution can not be represented in the precision of $(eltype(integrator.u))).")
656
+
"At t=$(integrator.t), dt was forced below floating point epsilon $(integrator.dt)$EEst. Aborting. There is either an error in your model specification or the true solution is unstable (or the true solution can not be represented in the precision of $(eltype(integrator.u)))."
0 commit comments