Repository navigation
Description
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
#894: the direct-LU path keeps a fresh interface-law operator each it…
#894 review: the test bounds increments, covers the mesh's own tail a…
test_1106: the serial band count is recorded per host
Review round 1 (#348): keep the pinned row's pattern; the pin is a pr…
lmoresi commentedon Nov 11, 2026
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
Direct-LU rotated solve: zero the pinned row after the pressure-mean …
lmoresi commentedon Nov 11, 2026
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_residualzeroed 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:
Fix: dccb83d on
bugfix/rotated-lu-pressure-pin-348zeroes 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
Merge pull request #1054 from underworldcode/bugfix/rotated-lu-pressu…
lmoresi commentedon Nov 11, 2026
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