Skip to content
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

Error when the last integration step is smaller than dtmin #924

Closed
radlicka opened this issue Jan 4, 2023 · 0 comments · Fixed by SciML/OrdinaryDiffEq.jl#2098
Closed

Comments

@radlicka
Copy link

radlicka commented Jan 4, 2023

The step size algorithm checks the size of the last integration step and when it is lower than dtmin the warning is displayed and integration is terminated. I understand that it is not a typical case but it causes random code errors. A simple example is below.
Tomas

using DifferentialEquations
# Simple example from DifferentialEquation.jl documentation
f(u,p,t) = 1.01*u
u0 = 1/2
tspan = (0.0,1.0)
prob = ODEProblem(f,u0,tspan)
sol = solve(prob, Tsit5(), reltol=1e-8, abstol=1e-8)
# Change tspan to end integration 1.0e-6 after sol.t[end-1] - the last step is 1e-6
tspan=(0.0,sol.t[end-1]+1e-6)
prob = ODEProblem(f,u0,tspan)
# when the dtmin is higher than the last step (>1.0e-6) the warning is displayed and the integration is terminated
sol = solve(prob, Tsit5(), reltol=1e-8, abstol=1e-8,dtmin=1e-5);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant