Repository navigation
A rotated datum lift measures convergence against the datum's scale (#883) - #1261
Conversation
…883) A cold start lifts the prescribed normal velocity in its first increment from u = 0, where the residual ignores the datum. Forced by the datum alone, r0 = 0 and the reference became the lifted iterate's residual (for a linear model, that increment's own Krylov residual); with a weak body force beside it, the reference stayed at the body force's scale. Either way the relative test could not pass after the lift and a second increment followed (measured: annulus, datum 0.1 cos 2 theta, 2 increments, references 7.1e-8 and 1.05e-4). The reference now includes the norm of the lifted right-hand side on the free rows, the forcing the datum exerts on the interior (1.72 here), and the linear solve converges in one increment. The re-referencing at iteration 1 is gone, and the continuation switch is no longer tested at the lift's iteration 0, matching the convergence test. rnorm0 is the first residual measured; the docstring says so. test_0883: both cases converge in one increment against a reference above 1. Underworld development team with AI support from Claude Code
|
Adversarial review, round 1 (head c66c359)
No findings. Issue state:
Underworld development team with AI support from Claude Code |
|
Second-desk review by H7 (a Claude review session running parallel probes on a 96-thread Linux workstation: Intel Xeon Gold 6240R, AVX-512, MPICH). The base is development e7e02b9, the merge base of the rotated batch (#1260, #1261, #1262, #1265, #1263). #1261, #1262, #1265 and #1263 change only Verdict: passes. Merge it first in the batch. MeasuredAnnulus, cell size 0.2, outer datum
So the datum cases take one increment and land within the tolerance. A small datum beside a body force changes neither the count nor the answer. Attacks that failed
Findings
Underworld development team with AI support from Claude Code |
|
One more measurement for this PR, from macOS (12-core Apple M4, serial), while probing UNFILED 36. The fixture is an annulus (inner radius 0.5, outer 1.0, cell size 0.2, qdegree 3), with rotated free slip on both walls, the datum
On this branch (6e37b7b) it converges in 1 increment, with 17 velocity and 7 pressure iterations. So on this platform development fails outright on the pure-datum case, where on Linux it converged in two increments. This branch fixes both. Plain free slip, with u.n = 0 and a body force, converges in 1 increment on both. Underworld development team with AI support from Claude Code |
Brings in #1261 (the datum lift reference), which this branch follows; the merge of rotated_bc.py is automatic. Underworld development team with AI support from Claude Code
A cold-start rotated free-slip solve that lifts a prescribed normal velocity (the datum) now measures convergence against the datum's own forcing. A linear solve converges in one increment instead of two.
What changes
On development.
consistent_jacobian="continuation", the switch could fire at the lift's iteration 0, where r0 = 0. The issue reports, without a measurement, that a datum-only solve then skips its Picard phase.Now.
zeroRowsColumns, the reference takes the larger of its value and the norm of the lifted right-hand side on the free rows: the forcing the datum exerts on the interior.rnorm0is the first residual measured; the docstring says so. For a datum-only cold start the solve report therefore gives noreduction(itsfnorm0is 0), where it gave a ratio to the lifted residual.Measured. Annulus, cell size 0.2, datum 0.1 cos 2θ on the outer wall, tolerance 1e-6; serial, macOS (12-core Apple M4).
The lifted iterate is the same on both branches (residual 7.12e-8 after the lift, to all printed digits). Development then took one more increment, to a residual of 1e-14. This branch stops at the lift, whose residual is 4e-8 of the new reference, within the 1e-6 tolerance.
This changes when a solve stops. A linear datum solve now ends one increment earlier, at the solve's own tolerance rather than past it. A nonlinear datum solve measures against a larger reference from its second increment on.
Tolerances and coordinate matches
None added. The test asserts the increment count (1) and that the final residual is within the solve's tolerance of the reference.
Tests
tests/test_0883_rotated_datum_lift_reference.py, level 2, tier B, two cases (datum alone, and a weak body force beside it):On development the same fixture gives 2 increments in both cases (the probe in the table above), so the test fails there.
Serial runs: the rotated slice (test_0207, 0846, 0883, 1018, 1058, 1061, 1066, 1092, 1113, 1131, 1136, 1143, 1158, 1159): 108 passed.
Not run: the parallel datum tests (
tests/parallel/test_1066_rotated_datum_parallel.pyand its neighbours). The new norm is collective, on a branch every rank takes together.Review
Adversarial review, below.
Issue state
#883: fixed by this branch (label fixed-in-PR).
Underworld development team with AI support from Claude Code