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

IDA fails to solve when encountering algebraically inconsistent u after callback #449

Closed
topolarity opened this issue Feb 5, 2024 · 1 comment · Fixed by #448
Closed

Comments

@topolarity
Copy link

topolarity commented Feb 5, 2024

Extracted from SciML/OrdinaryDiffEq.jl#2127

IDA also appears to struggle to get past the first stop:

julia> using DiffEqCallbacks, Sundials, Plots
julia> f(du, u, p, t) = [du[1] - u[2], u[2] - p * sin(t)]
julia> prob = DAEProblem(DAEFunction(f), [0.0, 0.0], [0.0, 0.0], (0., 2π), 1,
                         callback=PresetTimeCallback(0:.3:2π, integ->(integ.p=-integ.p;)),
                         differential_vars=[true,false])
julia> sol = solve(prob, IDA())
julia> plot(sol; xlim=(0, 2π))

image

Originally posted by @topolarity in SciML/OrdinaryDiffEq.jl#2127 (comment)

@topolarity
Copy link
Author

Output:

[IDAS ERROR]  IDASolve
  At t = 0.3 and h = 2.38735e-08, the error test failed repeatedly or with |h| = hmin.

retcode: Unstable

@ChrisRackauckas chimed in already to help:

IDA has a reinitialization. It must not be reinitializable with your choice of initialize. Brown basic?

I don't know why this problem wouldn't be re-initializable, though. It's extremely smooth (linear in u[2]).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant