Skip to content

The rotated GAMG fallback's warning names its measured floor for a tight datum solve (UNFILED 36) - #1301

Merged
lmoresi merged 2 commits into
developmentfrom
bugfix/rotated-gamg-fallback-names-its-floor
Nov 24, 2026
Merged

lmoresi merged 2 commits into
developmentfrom
bugfix/rotated-gamg-fallback-names-its-floor

Conversation

@lmoresi

@lmoresi lmoresi commented Nov 20, 2026

Copy link
Copy Markdown
Member

When a rotated free-slip solve falls back to GAMG (no registered multigrid hierarchy), asks for a tolerance below 1e-9, and carries a nonzero wall-normal datum, the existing fallback warning now states that fallback's measured floor. Part of UNFILED 36. It changes no solve.

The measurement

An annulus (0.5 to 1.0) with u·n = 0.1 cos 2θ on Upper and both walls rotated, serial (macOS, 12-core Apple M4):

velocity PC h relative residual reached
GAMG fallback (no hierarchy) 0.2 4e-10; then the 300-iteration cap, and a failed second increment
GAMG fallback 0.1 1.2e-10
GAMG fallback, given the rotated rigid-body modes as near-null space 0.1 8.7e-11 (and a failed PC setup at h 0.2), so not the remedy
custom FMG (refinement 2, registered) 0.4, refined twice about 2e-12 (1.9e-12 at tol 1e-9)

Asked for less than the floor, the fallback runs to its cap and then fails. The FMG path, asked for 1e-12, did not finish in 10 minutes.

The change

The warning gains one sentence: with a datum, this fallback was measured to stall near 1e-10 relative, above the requested tolerance, and a registered hierarchy reached about 2e-12 on the same case. It is worded as a measurement, not a guarantee. It appears only when the tolerance is below 1e-9 and a nonzero datum is registered (_rotated_freeslip_datum holds nonzero datums only). Ordinary runs see the warning as before.

Tolerances and coordinate matches

  • The trigger: solver tolerance < 1e-9.
  • No coordinate matches.

Tests

  • tests/test_1297_rotated_gamg_fallback_names_its_floor.py:
    • the sentence appears for a datum solve at 1e-10, which fails before this change;
    • it does not appear for a datum solve at 1e-6, nor for a solve at 1e-10 without a datum.
  • Serial: test_1014_stokes_multigrid and test_1159_thin_sheet_solve_takes_picard (the other tests that read the warning), with test_0052, all pass. check_test_coverage.py passes.

Underworld development team with AI support from Claude Code

…ght datum solve (UNFILED 36)

Without a registered hierarchy the rotated solve's velocity block falls back
to GAMG, and the solver warns. With a wall-normal datum that fallback was
measured to stall near 1e-10 relative on an annulus (4e-10 at cell size 0.2,
1.2e-10 at 0.1), where a registered hierarchy (custom FMG) reached about
2e-12; asked for less, it ran to its iteration cap and then failed. When the
requested tolerance is below 1e-9 and a nonzero datum is registered, the
warning now says so, as a measurement. Otherwise it is unchanged.

test_1297: the floor sentence appears for a datum solve at 1e-10 (fails
before this commit), and not for a datum solve at 1e-6 or a solve at 1e-10
without a datum.

Underworld development team with AI support from Claude Code
Copilot AI balanced review requested due to automatic review settings November 20, 2026 15: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.

@lmoresi

lmoresi commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Adversarial review, round 1 (head 8255662)

  • Rank asymmetry. The trigger reads solver.tolerance and _rotated_freeslip_datum, which are the same on every rank. The warning is mpi.pprint, rank 0 only. There is no collective.
  • Fires once. It rides the existing one-shot _rotated_gamg_fallback_warned. A solver that warned at a loose tolerance and is tightened later doesn't hear it, which matches how the base warning already behaves.
  • Measured, not general. The numbers come from one annulus and two resolutions, and the text says so, naming the case. Another geometry may stall at a different level.
  • Tests that cannot fail. The floor case fails before the change, and the two other cases pin the warning's absence.

No findings.

Underworld development team with AI support from Claude Code

@lmoresi
lmoresi merged commit a9005cd into development Nov 24, 2026
10 checks passed
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.

2 participants