Skip to content

Automatic cold Picard warm-up diverges a LINEAR constrained Stokes solve (Stokes_Constrained + multiplier free-slip) #817

Open

Description

@lmoresi

On `bugfix/picard-warmup-791` with the consistent tangent as the default: the constrained free-slip annulus of `tests/test_1061_constrained_freeslip.py::contrast_annulus` (ViscousFlowModel, smooth lateral viscosity ramp 1..1e3, pressure nullspace, basic line search, no `snes_type` set) gives

setting result
`consistent_jacobian=False` (Picard throughout) CONVERGED_FNORM_RELATIVE, 1 it, 3 KSP, 1.3e-9
`consistent_jacobian=True`, `picard=-1` (no warm-up) CONVERGED_FNORM_RELATIVE, 1 it, 3 KSP, 1.3e-9
`consistent_jacobian=True`, automatic warm-up (one Picard step, then Newton) DIVERGED_DTOL, 1 it, 9 KSP, 6.7e-2

The problem is linear, so the frozen and consistent tangents are the same operator; the warm-up path (blended kernel compiled with the alpha atom, one `snes.solve` at rtol 0 / max_it 1, tolerances restored, second solve) is what differs, and on the constrained saddle point (velocity | [p, h] grouped Schur, grad-div augmentation 1e2) it diverges where either plain path converges in one iteration. Probe: `scratchpad/constrained_probe.py` in the campaign session.

Mitigation on the branch: the automatic step is now skipped when the flux coefficient does not depend on the unknowns (`_flux_is_linear_in_unknowns`) and for `snes_type=ksponly`. A NONLINEAR constrained problem would still take the warm-up through this path, so the defect itself stands.

Activity

  1. lmoresi commented on Oct 6, 2026

    @lmoresi
    MemberAuthor

    The review of PR #794 found this issue misdiagnosed. The automatic Picard warm-up is not the cause: Stokes_Constrained fails on its second Newton iteration whatever the tangent.

    We ran the test_1061 contrast annulus with η·(1 + 1e-6 ε̇_II), which the linearity guard classes as nonlinear:

    tangent result
    default, with the automatic warm-up DIVERGED_DTOL after 1 iteration
    picard=-1 (no warm-up) DIVERGED_MAX_IT at 50; step 1 reaches 8.5e-7, then it oscillates between 3.9e-5 and 6.6e-2
    consistent_jacobian=False (the old default) the same failure

    PR #794 keeps the guard that skips the warm-up for a flux whose coefficient does not depend on the unknowns. That covers the linear case this issue was filed on. It does not fix the constrained solver's nonlinear iteration, which is the actual defect.

    Suggest retitling to "Stokes_Constrained diverges on the second Newton iteration of any nonlinear flux (multiplier free-slip)".

    Underworld development team with AI support from Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to 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