Repository navigation
Examples: drop the SVD coarse solve from every example and tutorial (#901) - #945
Merged
Merged
Conversation
Louis, 2026-11-05: no SVD path. Sixteen examples and tutorials set fieldsplit_velocity_mg_coarse_pc_type (or a Poisson mg_coarse_pc_type) to svd on problems that leave no direction free: Cartesian boxes with Dirichlet or free-slip walls, no periodicity, and Dirichlet Poisson solves. Their coarse operators are nonsingular, so the line only made the bottom solve dense; without it they take the bundle's redundant LU. Not in this commit: the 28 curved or periodic examples (the annulus and shell benchmarks and kernels, the cylinder and ellipse models, three tutorials, the submesh investigations), which need a run once the shared bundle carries the zero-pivot shift on the standard route; and the snesfas investigation README, which describes past work. Underworld development team with AI support from Claude Code
…ples (#901) Measured on hyperion, np 1, each example with and without its svd line (underworld3 A-prime with the bundle shift). Every one builds its mesh without a refinement hierarchy, so the velocity block falls back to GAMG and the line only replaced GAMG's own coarse solve. Where the solve ran, removing it changed nothing: the free-slip annulus kernels, the annulus benchmark of Kramer et al., the free-slip spherical shell, the ellipse and tutorial 6 give the same velocity and pressure to 1e-9 or better with the same iteration counts, and no run met a zero pivot. Tutorial 8 does not converge in either arm (its velocity solve hits its 200-iteration cap with the svd line as well). Eleven of these examples fail before their solve on development for reasons unrelated to the coarse solve: a removed evalf API, the three-index array shapes, pint units, and two files that do not parse. Their svd line is removed with the rest; it cannot be the cause and is no longer the rule. The submesh investigation scripts follow once their run reports. Underworld development team with AI support from Claude Code
…ripts (#901) Measured on hyperion, np 1, each script with and without its svd line (every solve the GAMG fallback, as in the previous commit). Nine give the same velocity and pressure to 1e-11 or better with the same iteration counts. test_region_ds_phase3 segfaults in its first solve and test_bootstrap_viscosity stalls at its 1e-5 viscosity step, both in both arms, so neither failure comes from the line. No run met a zero pivot. With this commit no example or tutorial sets an SVD coarse solve; the advanced multigrid guide's override example is replaced on the A-prime branch. Underworld development team with AI support from Claude Code
Member
Author
Adversarial review of #945 at development eddab70Independent pass, from the diff. Scope: 44 files, 49 removed lines, docs only. Verdict: ready with the changes below. Findings
Attacks that failed
Merge conditions
Underworld development team with AI support from Claude Code |
…D coarse solve Review of #945, finding 1: removing the svd line left an empty code fence after a sentence that recommended the coarse-level SVD. The sentence now gives the rule (a null space is fixed on the fine operator, not by the coarse solve, so a rigid rotation can still appear and should be measured) and the empty fence is gone. Underworld development team with AI support from Claude Code
Member
Author
|
Review of 2026-11-06, finding by finding:
Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed. Forty-four files under
docs/examplesanddocs/beginner/tutorialsset the multigrid coarse solve tosvd, throughfieldsplit_velocity_mg_coarse_pc_typeor, in two Poisson examples,mg_coarse_pc_type. This PR removes that one line from each. In tutorials 8 and 15 the line sat in a markdown code fence after a sentence recommending the coarse-level SVD; that sentence now states the rule and the empty fence is gone (03d62f0, from the review below). One other notebook loses a trailing comma, so its JSON stays valid. Documentation only; no library code.Why. Louis ruled on 2026-11-05 that the multigrid coarse solve has one rule on every route: redundant LU with a nonzero factor shift, with the null space fixed on the fine level. The library sets no SVD coarse solve; a user may still set one by hand under the solver's prefix. The library and guide side merged as #947 (eddab70). These examples are what users copy, so they should not teach the SVD.
How it was checked.
DIVERGED_PC_FAILED.Adversarial review (
docs/developer/guides/adversarial-review.md):Ex_Convection_Cylinder-FS.py,Ex_NS_Couette_Flow.py,Ex_Stokes_Spherical_Kernels.py); all three are in docs/examples: many scripts fail on development (a removed evalf API, array shapes, nine that do not parse), and nothing runs them #944's list.developmentmerged in (2d4d3d5), clean.Issues in this territory.
Journal: the decision entry and the measurement entry of 2026-11-05 on the solvers topic.
Checklist (UW3 Style Charter — docs/developer/UW3_STYLE_CHARTER.md)
level_*andtier_*markers (S8): not a bug fixmaybe_/try_/do_) and no commented-out code (S3, S4): one commented-outsvdline was removed.array/mesh.X.coords— nowith ....access(...), nomesh.data(S7): no codepixi.toml/pixi.lockor other dependency changes riding in an unrelated PRUnderworld development team with AI support from Claude Code
Generated by Claude Code