Skip to content

Direct-LU rotated path does not converge on a split-fault contact solve (slip 4-5% off) #899

Open

Description

@lmoresi

The opt-in direct-LU rotated path (solver._rotated_use_lu = True) does not converge on a split-fault contact solve. Its slip differs from the multigrid path's by 4-5%. This holds with or without a fault interface law, and with a linear or a velocity-dependent viscosity.

Measured on bugfix/fac-live-block-solver 24e754f (development fc67b65 plus #892), serial. The fixture is test_1090's: a fault split in place over a welded 1/8, 1/16 box, sheared by its walls, with petsc_use_pressure_nullspace = True and tolerance 1e-8. The multigrid path is set_custom_fmg over the base levels.

fault law viscosity path converged Newton increments final rnorm peak slip
viscous, 1.0 1 multigrid yes 1 3.4e-10 0.13762
viscous, 1.0 1 direct LU no 50 (cap) 2.3e-05 0.13239
frictionless 1 + 50 |v|² multigrid yes 6 7.1e-11 0.23796
frictionless 1 + 50 |v|² direct LU no 50 (cap) 4.7e-05 0.22664
viscous, 1.0 1 + 50 |v|² multigrid yes 6 3.8e-11 0.22065
viscous, 1.0 1 + 50 |v|² direct LU no 50 (cap) 3.5e-05 0.20964

Even the linear case, which the multigrid path solves in one increment, stalls on the LU path at rnorm ~2e-5 for all 50 increments. The test of the LU path in test_1018 (test_the_rotated_solve_reports_its_own_convergence[True]) is free slip with no fault. Not yet isolated: whether the naive pressure pin (_naive_pressure_pin) and the pressure null space of the closed box disagree once the mesh is split, or whether the fault contact's constraint rows meet the pin some other way. #348 is the same path's pin at np > 1.

Probe (~/+Simulations/fac_892/rotated_894/lu_variants.py <law> <nonlinear 0|1>):

import sys
import numpy as np, sympy
import underworld3 as uw
from underworld3.utilities import custom_mg
from underworld3.utilities.fault_contact import fault_slip

law = float(sys.argv[1]); nonlin = int(sys.argv[2])
TRACE = np.array([[0.3, 0.45], [0.7, 0.55]])
base = uw.meshing.UnstructuredSimplexBox(minCoords=(0, 0), maxCoords=(1, 1), cellSize=1 / 8,
                                         regular=False, qdegree=2, refinement=1)
levels = base._coarse_level_meshes()[:-1] + [base]
for use_lu in (False, True):
    mesh = base.add_fault(("Flt", TRACE))
    x, y = mesh.X
    v = uw.discretisation.MeshVariable(f"v{int(use_lu)}", mesh, 2, degree=2)
    p = uw.discretisation.MeshVariable(f"p{int(use_lu)}", mesh, 1, degree=1)
    s = uw.systems.Stokes(mesh, velocityField=v, pressureField=p)
    for wall in ("Bottom", "Top", "Left", "Right"):
        s.add_dirichlet_bc((y - sympy.Rational(1, 2), 0), wall)
    s.add_fault_bc(law, "Flt")
    s.petsc_use_pressure_nullspace = True
    s.constitutive_model = uw.constitutive_models.ViscousFlowModel
    s.constitutive_model.Parameters.shear_viscosity_0 = (
        (1 + 50 * (v.sym[0] ** 2 + v.sym[1] ** 2)) if nonlin else 1)
    s.tolerance = 1e-8
    if use_lu:
        s._rotated_use_lu = True
    else:
        custom_mg.set_custom_fmg(s, levels, field_id=0)
    s.solve()
    info = s._rotated_freeslip_info
    _s, V, _l = fault_slip(s, "Flt", info)
    print(f"use_lu {use_lu}: converged {info['converged']}, increments "
          f"{info['nonlinear_iterations']}, rnorm {info['rnorm']:.3e}, peak slip {np.abs(V).max():.10f}")

Found while fixing #894 (bugfix/rotated-interface-operator-refresh), whose test carries this case as a strict expected failure.

Underworld development team with AI support from Claude Code

Activity

  1. added
    bug
    on Oct 30, 2026
  2. added 3 commits that reference this issue on Oct 30, 2026
  3. added a commit that references this issue on Nov 11, 2026
  4. lmoresi commented on Nov 11, 2026

    @lmoresi
    MemberAuthor

    Root cause, from the pre-PR review of the #348 branch (bugfix/rotated-lu-pressure-pin-348, measured on hyperion; the review record goes on that PR when it opens):

    The direct-LU rotated path fixes the pressure gauge by pinning one pressure row. That is a valid gauge only where constant pressure is an exact null mode of the constrained operator. On a split fault it is not, so the pinned row replaces a real equation and the solve converges to a different problem, still reporting convergence. With no pin, this issue's linear case converges in 1 increment to the multigrid slip to 10 digits, and test_1088's xfail passes at np 1 and 2. With the pin it stalls at 2.3e-5, as in the table above.

    The same cause gives the LU rotation residue in #968's check A, and 0.5–4.5 % velocity errors on a tilted given normal, an open top and a pressure Dirichlet condition.

    We track the fix under #348, re-scoped to "the LU pressure pin: pin only where constant pressure is a true null mode". Changing when the LU path pins is a solver-behaviour change and goes to Louis with evidence before it merges. The #348 branch now documents the limitation.

    Underworld development team with AI support from Claude Code

  5. lmoresi commented on Nov 11, 2026

    @lmoresi
    MemberAuthor

    Correction to the comment above: the root cause is narrower, and it is not the pin replacing a real equation.

    On test_1088's fault box, constant pressure is an exact null mode of the operator the direct path factors, left and right, interface tangent included (|A·1| and |Aᵀ·1| ≈ 1e-17). A dense SVD gives one singular value at 1.4e-14 and the next at 2.9e-5, and every pinned variant is nonsingular. So any pressure row is a valid pin there.

    The bug is in the residual. rotated_residual zeroed the pinned row and then subtracted the pressure-residual mean (petsc_use_pressure_nullspace). The pinned row's residual became a mean that shifted every other pressure equation. An interior pin has no residual there to spread. The lowest pressure row on this mesh is a wall corner beside the Dirichlet lift, where it does.

    Measured, serial, linear viscous law:

    pin converged increments velocity vs multigrid
    pressure row 0 (wall corner, the default) no 50 5.8e-2
    pressure row 5 no 50 2.1e-3
    pressure row 40 yes 1 1.0e-12
    pressure row 100 yes 1 1.0e-12
    pressure row 200 no 50 3.9e-2
    no pin yes 1 1.0e-12
    row 0, zeroed after the projection yes 1 1.0e-12

    Fix: dccb83d on bugfix/rotated-lu-pressure-pin-348 zeroes the pinned row after the projection. test_1088's direct-LU case loses its xfail and fails with the old order.

    Cases where constant pressure is not a null mode remain under #348: an open top (|A·1|/|abs(A)·1| = 0.15), a given normal that is not the wall's (1.5e-2), or a pressure Dirichlet condition. There the pin does replace a real equation (velocity 0.5 % and 24-61 % off).

    Underworld development team with AI support from Claude Code

  6. added
    fixed-in-PR
    and removed
    fixed-in-PR
    on Nov 11, 2026
  7. added a commit that references this issue on Nov 11, 2026
  8. added
    fixed-in-development
    on Nov 11, 2026
  9. lmoresi commented on Nov 11, 2026

    @lmoresi
    MemberAuthor

    Fixed in development by #1054, merge commit 8417977. The direct-LU residual now zeroes the pinned row after the pressure-mean projection. test_1088's fault case and test_1156's Dirichlet-wall case guard it. Left open until release.

    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

    bugfixed-in-development

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions