Skip to content

NonlinearSolve stalls when jacobian is singular #635

@oscardssmith

Description

@oscardssmith
julia> using NonlinearSolve

julia> f(u, p) = [u[1]^2 - 2u[1] + 1, sum(u)]
f (generic function with 1 method)

julia> prob = NonlinearProblem(f, [1.0, 1.0])
NonlinearProblem with uType Vector{Float64}. In-place: false
u0: 2-element Vector{Float64}:
 1.0
 1.0

julia> sol = solve(prob)
retcode: Stalled
u: 2-element Vector{Float64}:
 1.0
 1.0

julia> sol.resid
2-element Vector{Float64}:
 0.0
 2.0

We should probably do something if our initial step doesn't change anything. Possibly epsilon perturbation? possibly warn via the Verbosity system (@jClugstor)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions