Skip to content

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

@topolarity

Description

@topolarity

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions