Skip to content

test_1063: topography anchors from the traction, and an exact-solution convergence test (#826) - #1259

Merged
lmoresi merged 2 commits into
developmentfrom
tests/test-1063-topography-anchors-826
Nov 20, 2026
Merged

lmoresi merged 2 commits into
developmentfrom
tests/test-1063-topography-anchors-826

Conversation

@lmoresi

@lmoresi lmoresi commented Nov 20, 2026

Copy link
Copy Markdown
Member

What changed and why

Test-only. tests/parallel/test_1063_constrained_freeslip_parallel.py's macOS topography anchors were 1.8 % (ti) and 0.48 % (iso) off on the mesh they were recorded on, with the velocity matching to 4e-11 (#826; the integration desk's macOS run).

What moved the value: a9945bc (#617, 2026-09-03). topography() changed from the bare multiplier h to the full boundary traction h + r(u.n - g), the augmented-Lagrangian share included. The velocity is untouched. The anchors were recorded on 2026-08-15 (#568), before it. Confirmed from one solve on current code (Linux, 430 cells): the bare multiplier gives iso 37.8596 and ti 37.0762, matching the old macOS anchors to the 434/430-cell mesh difference, and the traction gives the current values.

Why the new number is right. The iso case is a single Fourier mode with an exact solution (zero slip at r = 1/2, free slip at r = 1, force 100 sin 3θ r̂). I derived it in closed form: velocity L2 0.616928007786, mean-stripped topography 37.7800672892. Relative errors on Linux:

cellSize (cells) velocity traction (topography() now) bare h (before #617)
0.12 (430) 4.1e-3 6.8e-3 2.1e-3
0.06 (1650) 1.55e-3 7.4e-4 7.1e-4
0.03 (6268) 4.5e-4 1.9e-4 2.2e-4

Both readouts converge to the exact value; they differ by r(u.n - g), the constraint residual times r, which vanishes with refinement. On this smooth case at the anchors' coarse mesh h happens to be closer, but the traction's error falls faster (order 3.2 then 2.0, against 1.6 and 1.7) and is the closer one by cellSize 0.03. The traction is what holds the boundary (the CBF identity in #617), and on SolCx h alone is off by 104 % (#617's measurement). TI has no exact solution; its two readouts converge to the same value (37.012 and 37.016 at cellSize 0.03).

So the anchors are regression gates on the coarse discrete answer, not accuracy claims: at cellSize 0.12 the topography is 0.7 % (iso) and 2 % (ti) from converged. The file's comment now says so.

Changes

  • macOS anchors re-recorded (434 cells) from the integration desk's macOS run: ti (0.3925981604187, 37.75254788356), iso (0.6194547793812, 38.04161797961).
  • Linux anchors kept: already the traction (recorded 2026-11-06); rerun here they agree to 1.2e-9.
  • macOS gauge anchor removed. It also held the bare multiplier (37.818; Linux's bare h is 37.817 and its traction 37.997) and passed only under the 1e-2 gate. No macOS traction value for it is to hand, so that mesh now skips the gauge anchor, and the skip message prints the values to record. For the integration desk: please re-record it from a macOS run (python tests/parallel/test_1063_constrained_freeslip_parallel.py gauge).
  • One anchor per mesh, still gated by accuracy_anchor's fingerprint match.
  • Gate tightened from 1e-2 to 1e-4 for all three anchors. The anchors are checked at np 2 to 4 against values recorded at np 1 or 2, so the gate cannot be tighter than the file's own partition reproducibility for the topography (1e-5); 1e-4 is ten times that and 70 times below the move this issue is about. A serial same-mesh gate could be 1e-8, but that is not what this check runs.
  • New test tests/test_1063_constrained_freeslip_exact_annulus.py (level 2, tier B): the exact solution, derived with sympy in the test with the steps in its docstring, plus a check that the derivation gives the recorded values. The solve at cellSize 0.06 and 0.03 asserts each error (bounds twice the measured) and the observed order between them (≥ 1.6; measured 1.8 velocity, 2.0 topography). About 95 s serially.

What was run

On a 96-thread Linux workstation (single system image, Intel Xeon Gold 6240R, MPICH):

What Result
new exact-annulus test, serial 2 passed, 97 s
tests/parallel/test_1063_constrained_freeslip_parallel.py, np 2 3 passed on both ranks (Linux anchors live at 1e-4)
tests/test_1063_constrained_traction.py, serial 1 passed
scripts/check_test_coverage.py OK, 494 files reachable

Not run

macOS (the re-recorded macOS anchors are the integration desk's numbers; the gauge anchor waits for its run); np 3 and 4; the full suite.

Fixes #826

Underworld development team with AI support from Claude Code

… exact solution

The iso case is a single Fourier mode with a closed-form solution (derived
in the test with sympy): velocity L2 0.616928007786, mean-stripped
topography 37.7800672892. Errors at cellSize 0.06 and 0.03 and the
observed order between them are asserted. About 95 s serially.

Underworld development team with AI support from Claude Code
…826)

topography() has returned the full boundary traction h + r(u.n - g) since
a9945bc (#617); the macOS anchors of 2026-08-15 held the bare multiplier.
Re-recorded from the integration desk's macOS run. The macOS gauge anchor
held the bare multiplier too and is removed until re-recorded on macOS.
The anchor gate tightens from 1e-2 to 1e-4 (ten times the partition
reproducibility of the topography).

Underworld development team with AI support from Claude Code
Copilot AI balanced review requested due to automatic review settings November 20, 2026 05:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants