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

autoswitch solvers can cause the stiff solver to fail #2198

Closed
oscardssmith opened this issue May 17, 2024 · 0 comments · Fixed by #2204
Closed

autoswitch solvers can cause the stiff solver to fail #2198

oscardssmith opened this issue May 17, 2024 · 0 comments · Fixed by #2204
Assignees
Labels

Comments

@oscardssmith
Copy link
Contributor

julia>  using OrdinaryDiffEq
julia> function exrober(du, u, p, t)
           y₁, y₂, y₃ = u
           k₁, k₂, k₃ = p
           du .= vcat([-k₁ * y₁ + k₃ * y₂ * y₃,
             k₁ * y₁ - k₃ * y₂ * y₃ - k₂ * y₂^2,
             k₂ * y₂^2], u[4:end])
       end
julia> prob1 = ODEProblem(exrober, vcat([1,0,0], ones(470)),(0.0,100.0),(0.04,3e7,1e4))
julia> prob2 = ODEProblem(exrober, vcat([1,0,0], ones(480)),(0.0,100.0),(0.04,3e7,1e4))
julia> solve(prob1, AutoTsit5(FBDF())) #works
julia> solve(prob2, AutoTsit5(FBDF())) #hits maxiters, tries to switch to FBDF but the FBDF nonlinear solve never converges
julia> solve(prob2, FBDF()) #works
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant