Skip to content

NonlinearSolveAlg silently fails with quasi-Newton inner solvers (Broyden, Klement) #4283

Description

@singhharsh1708

NonlinearSolveAlg with Broyden never moves off u0:

using OrdinaryDiffEqSDIRK, NonlinearSolve
using OrdinaryDiffEqNonlinearSolve: NonlinearSolveAlg

prob = ODEProblem((du, u, p, t) -> (du .= -u), [1.0], (0.0, 1.0))
solve(prob, TRBDF2(nlsolve = NonlinearSolveAlg(Broyden())))

Unstable, u(1) = 1.0 after one accepted step, exact is 0.36787944. Klement() does the
same thing. NewtonRaphson() and TrustRegion() are fine on it.

Not a stiffness thing, it fails the same way on u' = diag(-L, -1) u at L = 1, 1e2, 1e4, 1e6.

It's also why FastShortcutNonlinearPolyalg dies (Unstable, relerr 1.41 on Robertson) where
RobustMultiNewton gets 5e-7. Both build the same 6 branch polyalg cache and both sit on
branch 1 the whole time, the only difference is FastShortcut's branch 1 is Broyden. Broyden
solves the stage system on its own fine, so it isn't the algorithm.

Is NonlinearSolveAlg supposed to work with Jacobian free inner solvers at all?

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