Skip to content

Docs: free-slip pages follow the rotated-first ruling and the corrected Nitsche condition - #1160

Merged
lmoresi merged 5 commits into
developmentfrom
docs/nitsche-after-1145
Nov 14, 2026
Merged

lmoresi merged 5 commits into
developmentfrom
docs/nitsche-after-1145

Conversation

@lmoresi

@lmoresi lmoresi commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Docs: free-slip pages follow the rotated-first ruling and the corrected Nitsche condition

What changed and why

Head e078136, with development merged in after #1157 merged (its two transverse-isotropy passages in adaptive-meshing.md stand as #1157 wrote them). Reviewed by the integration desk (the session that integrates and reviews boundary-condition and solver changes) in two rounds; its records are on this PR.

Three documentation pages (and, from review round 2, two guides that name normal=) made Nitsche statements with the code in which the continuity-row term of add_nitsche_bc was not assembled (#1072, corrected by #1145), or recommended against the project ruling (rotated strong free slip first; Nitsche for a condition that must change during the run). This PR corrects them. Documentation only; no library, test or dependency change.

docs/advanced/curved-boundary-conditions.md

  • The approaches are now five. Rotated strong free slip (stokes.add_rotated_freeslip_bc(0, boundary)) is first and recommended, with what it gives: v·n = 0 at the nodes to machine precision and a reaction that is the wall normal traction. Nitsche is second, for conditions that change during the model. The penalty section is unchanged apart from its number; the projected-normal section is marked as superseded by mesh.boundary_normal, with its "when to use" reduced to that; the analytical-normal section is limited to the penalty.
  • The examples no longer pass gamma=10. A paragraph says what gamma does (the penalty coefficient is gamma * viscosity / h) and that it should be chosen against the wall stress, not the flow through the wall.
  • The Cartesian-box numbers are rerun (table below) and now include the rotated condition and gamma of 100 and 1000.
  • Rotated-constraint accuracy on the annulus with an exact solution is quoted from technical note 2026-016 (its Nitsche numbers are being corrected; the rotated numbers are the same in the published note and the correction).
  • The elliptical-annulus comparison is replaced by the eight-condition table measured for Rotated free slip with a given normal on a faceted curved wall: the velocity is 34 % off at every cell size (one extra condition on the wall slip) #1168 (open). On a faceted curved wall the page now says to leave the normal to Underworld3 (rotated with its default normal: 0.19 % at both resolutions; with a given normal: 43.7 % and 44.6 %), that Nitsche is not accurate on a curved wall that is not a circle (35.2 % and 39.5 % at defaults; 19.5 % and 11.3 % with the ellipse's own normal), and approach 5 (analytical normals) is limited to the penalty, with a warning not to pass the analytical normal to the rotated condition.
  • The given-normal sentence says what Rotated free slip with a given normal on a faceted curved wall: the velocity is 34 % off at every cell size (one extra condition on the wall slip) #1168 measured: a given normal adds one equation on the wall slip, which the solve meets to round-off (-8.7e-15) and loses most of the slip doing it. The equal-facet condition is stated as equal facets, not "a circle" (a graded or adapted circle has unequal facets).
  • Under the ellipse table: three rows are measured on one machine only (named); "the first three" are each within 0.2 % of the reference, which is inside the reference's own sensitivity to its coefficient; the worked example's own conditions are named.
  • The unsupported sentence that a rotated condition cannot be switched between solves is replaced by what the rulings say: a hard condition cannot be ramped from one kind to another.
  • The Nitsche example on a "Fault" label (an internal boundary, which the page says not to use Nitsche on) now uses an exterior boundary.
  • The internal-boundary warning stays. Its one empirical sentence is marked as predating The Nitsche condition's continuity-row term is assembled (#1072) #1145 and not repeated.
  • A note says that Stokes answers with a Nitsche condition normal to a wall, computed before The Nitsche condition's continuity-row term is assembled (#1072) #1145, should be recomputed.

docs/developer/guides/boundary-condition-rulings.md and adapt-on-top-faults.md

docs/developer/guides/adaptive-meshing.md

  • Section 6 opens with the ruling (rotated strong free slip first). The penalty there names the node normal (which normal those runs used is not recorded).
  • One dated sentence says that every Nitsche observation in that section, in section 8 and in the failure table predates The Nitsche condition's continuity-row term is assembled (#1072) #1145 and has not been rerun. The two table rows carry the same mark. (The transverse-isotropy remarks are Guides: Nitsche free-slip is not ruled out with transverse isotropy #1157's text.) None of these has a reproduction under half an hour: they come from adaptive convection runs of many steps.
  • "nodal v·n is large even when correct" becomes "is not zero even when the solve is correct".

docs/developer/guides/free-surface-convection.md

  • A link into an AI session's private notes, which a reader cannot follow, is replaced by what it pointed to: local_h, the default since PR Nitsche BC: scale penalty by a local per-cell mesh size #275, scales the Nitsche penalty by each cell's own size instead of the smallest cell in the mesh. The three other private links are removed.
  • The held lid states the ruling (rotated free slip for a condition that does not change; its reaction is the wall normal stress) and that the recipe was built with Nitsche before The Nitsche condition's continuity-row term is assembled (#1072) #1145 and not rerun. Its failure-table row on the global cell size carries the same mark as in adaptive-meshing.md.

Measurements

All run for this PR on development at eb3d2f0 (which contains #1145), one rank, on a 96-thread Linux workstation (single system image, Intel Xeon Gold 6240R, MPICH).

Cartesian box (the fixture of tests/test_1060_nitsche_freeslip.py: buoyancy cos(pi x), no slip on the sides, free slip on the top and bottom, P2/P1, cell size 1/8, tolerance 1e-6). Difference is the relative L2 difference of the nodal velocity from the essential-condition answer; the wall-normal velocity is the largest on the two walls relative to the largest speed. Every solve converged on the residual.

Condition Difference from essential Wall-normal velocity
Rotated free slip 2.3864e-08 0
Penalty, 1e4 1.5155e-03 1.534e-03
Nitsche, default (12.5) 1.1704e-03 4.312e-03
Nitsche, gamma 10 1.9754e-03 7.027e-03
Nitsche, gamma 100 1.0220e-04 3.343e-04
Nitsche, gamma 1000 1.0337e-05 3.295e-05

The Nitsche and penalty differences agree to five figures with the table in #1145, which was measured on a different machine and operating system.

Elliptical annulus (the geometry and load of Ex_Stokes_Ellipse_Cartesian.py: outer semi-axes 1.5 and 1, inner circle of radius 0.5, body force cos(4 theta) along the radial direction, P2/P1; tolerance 1e-8, velocity block solved directly). Relative L2 difference of the nodal velocity from the penalty answer with the analytical normal (coefficient 1e4), and the rms velocity in brackets.

Condition Cell 0.1 Cell 0.05 Cell 0.025
Penalty, analytical normal (reference) (1.4449e-02) (1.4461e-02) (1.4463e-02)
Penalty, projected normal 1.0e-03 2.3e-04 6.4e-05
Penalty, analytical normal, 1e6 9.9e-03 2.1e-03 1.9e-03
Rotated, default normal 1.87e-03 (1.4437e-02) 1.86e-03 (1.4448e-02) 1.87e-03 (1.4450e-02)
Penalty, mesh.Gamma, 1e4 0.326 0.151 0.048
Penalty, mesh.Gamma, 1e6 0.573 (7.07e-03) 0.568 (6.97e-03) 0.520 (7.54e-03)
Nitsche, default 0.352 (1.036e-02) 0.395 (9.87e-03) 0.423 (9.57e-03)
Nitsche, gamma 10 0.302 0.361 0.403
Nitsche, gamma 100 0.455 0.455 0.457
Nitsche, gamma 1000 0.469 (9.27e-03) 0.462 (9.27e-03) 0.460 (9.25e-03)
Rotated, analytical normal 0.437 (9.59e-03) 0.446 (9.41e-03) 0.453 (9.32e-03)

Every solve converged on the residual.

Elliptical annulus: tracked in #1168

The split recorded in the table above is tracked in #1168 (open), with the integration desk's eight-condition table at cell sizes 0.1 and 0.05 (#1168 (comment)). The page quotes that table. Our rerun (direct velocity solve) and the integration desk's (default solver options, another machine) agree to the printed figures on every row both measured: rotated default normal 1.87e-03 / 1.86e-03 against 0.19 % / 0.19 %; Nitsche default 0.352 / 0.395 against 35.2 % / 39.5 %; rotated with a given normal 0.437 / 0.446 against 43.7 % / 44.6 %; Nitsche gamma 1000 0.469 / 0.462 against 46.9 % / 46.2 %; facet-normal penalty 0.326 / 0.151 against 32.6 % / 15.1 %. The projected-normal row (0.10 %, 0.023 %) is ours only; mesh.boundary_normal and Nitsche with the ellipse's own normal are the integration desk's only.

Where each number on the pages comes from

Not re-verified

  • adaptive-meshing.md: gamma 10 too soft on an adaptive mesh and gamma 100 as the remedy; the held-lid over-stiffening with the global cell size; "Nitsche preferred for sharp fault corners"; "Nitsche trips the anisotropic-Jacobian bug" (twice). Marked on the page.
  • curved-boundary-conditions.md: the test in which Nitsche on an internal boundary did worse than no constraint. Marked on the page.

What was run

What Result
python -m pytest -q tests/test_0030_capability_guides.py 3 passed
python scripts/check_deprecated_patterns.py OK, no new deprecated patterns
python -m sphinx -b html docs <out-of-tree directory> (the docs-build task's command) build succeeded; no warning from the three pages edited (62 warnings in total at e078136, all from other pages)

What was not run

  • Nothing in parallel: the measurements are single-rank comparisons of documented numbers.
  • No adaptive-mesh run, so none of the adaptive-meshing diagnoses is confirmed or refuted.
  • The elliptical annulus was not compared with an exact solution.

Other Nitsche statements in docs/, not changed

  • docs/developer/guides/boundary-condition-rulings.md: "Nitsche and penalty leak at about 1e-3" (the box gives 4e-3 at the default, relative to the largest speed); "A value of 10 was a cliff, a hundred times worse than 12.5" (The Nitsche condition's continuity-row term is assembled (#1072) #1145 reports no cliff between the two values on the shell fixture today).
  • docs/developer/design/FREESLIP_DYNAMIC_TOPOGRAPHY_FREESURFACE.md: the held lid is "add_nitsche_bc with a moderate penalty (g ≈ 10)".
  • docs/developer/subsystems/solvers.md: the spherical Kramer case with Nitsche at 144 ranks whose velocity solve failed (Kramer free-slip Nitsche fieldsplit solve needs flexible subsolves on Gadi #147), measured before The Nitsche condition's continuity-row term is assembled (#1072) #1145.
  • docs/developer/subsystems/analytic-solutions.md: a slow JIT compile "with add_nitsche_bc on SolCx" (about compile time, not the answer).
  • docs/developer/design/CONSTRAINED_FREESLIP_MULTIPLIER.md, rotated-freeslip.md, nonlinear-solver.md, CONVERGENCE_REFERENCE_POLICY_2026-11.md: statements of method, consistent with the ruling.
  • free-surface-convection.md: local simulation paths and a reference script a reader cannot reach predate this PR and are left; as are code samples on the curved-boundary page that predate it (flat .data access, mixed labels), two section-name forward references, and "being corrected" for the technical note, which goes stale when its correction is published.
  • Changelog, release notes and the 2026-07 review records are history and are left as written.

Checklist (UW3 Style Charter — docs/developer/UW3_STYLE_CHARTER.md)

  • I have read the Style Charter and followed it over the surrounding code (S2)
  • No drive-by refactors, renames, or "while I was here" cleanups (S9)
  • Bug fixes ship the regression test, written first, with level_* and tier_* markers (S8) — not applicable: documentation only
  • No hedging names (maybe_ / try_ / do_) and no commented-out code (S3, S4)
  • Every exception swallow states its sanctioned failure mode in a comment (S4) — not applicable
  • New data access uses .array / mesh.X.coords — no with ....access(...), no mesh.data (S7) — not applicable: no code in the diff
  • Parallel safety considered — np2/np4 checked where swarm/mesh/solver dispatch is touched (S11) — not applicable: nothing of that kind is touched
  • No pixi.toml / pixi.lock or other dependency changes riding in an unrelated PR
  • AI-assisted work carries the attribution line below

Underworld development team with AI support from Claude Code

…ed Nitsche condition

The curved-boundary page recommended Nitsche with gamma=10 for free slip.
The project ruling is rotated strong free slip first, Nitsche for a
condition that must change during the run. The page now leads with
add_rotated_freeslip_bc, says what gamma does and what to choose it
against, and its Nitsche numbers on the Cartesian box are rerun on the
code with the continuity-row term assembled (#1072, #1145).

The Nitsche row of the elliptical-annulus comparison is removed: a rerun
does not reproduce it, and the methods split into two groups on that
geometry (stated on the page).

adaptive-meshing: the ruling is stated, and the Nitsche diagnoses made
before #1145 are marked as not re-verified.

free-surface-convection: a link into a session memory is replaced by
what local_h does.

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

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 13, 2026

Copy link
Copy Markdown
Member Author

Adversarial review of PR #1160 at b1469ff

Cross-review by W1 (the integration session, which owns the rotated free-slip and Nitsche code these pages describe; it runs on one rank only), with a fresh reviewer.

Run on macOS, 12-core Apple M4, one rank, conda-forge PETSc 3.25.3, on a build of development at bc3d536 (contains #1145) plus the branch for #1147: the Cartesian-box table, the elliptical annulus at cell sizes 0.1 and 0.05, every code sample of curved-boundary-conditions.md on an annulus at cell size 0.15, and the #1163 probe. On the PR head: Sphinx HTML build, tests/test_0030_capability_guides.py, scripts/check_deprecated_patterns.py. The technical note was read at its published version and at its open v1.1 pull request.

Findings

  1. High. The page does not carry Rotated free slip with a given normal on a faceted curved wall: the velocity is 34 % off at every cell size (one extra condition on the wall slip) #1168. docs/advanced/curved-boundary-conditions.md:59-60 "Pass normal= only when the constraint must follow the true surface instead of the mesh."; :317-319 "Which group is the free-slip flow on the ellipse has not been settled against an exact solution"; :220 "### 5. Analytical Normals (Most Accurate)", :241 "Highest accuracy requirements", :244 "Accuracy: Exact"; :398 "Use analytical normals for validation". Rotated free slip with a given normal on a faceted curved wall: the velocity is 34 % off at every cell size (one extra condition on the wall slip) #1168 (filed after this head) shows that on a wall where the two normals coincide both rotated solves give the default-normal answer (1.4438e-2), and that the given-normal solve carries a constant pressure of 179 and 750. Measured here: default normal rms 1.4437e-2 and 1.4448e-2, given normal 9.5942e-3 and 9.4071e-3, mean pressure +178.72 and +750.24 at cell sizes 0.1 and 0.05. The page should say next to line 60 what passing the surface's own normal does to the velocity on a wall with unequal facets, cite Rotated free slip with a given normal on a faceted curved wall: the velocity is 34 % off at every cell size (one extra condition on the wall slip) #1168, and replace "has not been settled" for the rotated pair. Section 5 and tip 5 are about the penalty, but nothing on the page stops a reader from carrying "most accurate" to normal=. The governing page (docs/developer/subsystems/rotated-freeslip.md:106-109, and its lead examples, which pass normal=nhat) has the same gap; it is outside this diff and is ours to correct with Rotated free slip with a given normal on a faceted curved wall: the velocity is 34 % off at every cell size (one extra condition on the wall slip) #1168. Evidence: read and measured.

  2. Medium. Nitsche on a wall with unequal facets is described in one place and recommended in another. Approach 2 (:76-135) recommends Nitsche for a changing condition and gives its accuracy on a box and on the equal-facet annulus only; the 35 %, 39 %, 42 % disagreement is at :314-316, 180 lines later, and approach 2 does not point to it. Three statements do not hold against the numbers:

    • :316-317 "Nitsche moves toward that second answer as gamma rises". In the PR's own table gamma 1000 is past the rotated-with-analytical-normal answer at all three sizes (rms 9.27e-3, 9.27e-3, 9.25e-3 against 9.59e-3, 9.41e-3, 9.32e-3). Measured here: 9.2731e-3 against 9.5942e-3, and 9.2653e-3 against 9.4071e-3.
    • "Which group" (:317). Measured here, Nitsche with the ellipse's own normal passed as normal= gives rms 1.5949e-2 and 1.5289e-2 at cell sizes 0.1 and 0.05, 19.5 % and 11.3 % from the reference, with mean pressure -3.7e-3 and -3.8e-3. That is in neither group. Nitsche with its default normal carries a mean pressure of -48.5 and -221.9 (pressure range -222.1 to -221.4 at cell size 0.05). The penalty with mesh.boundary_normal at 1e4 is 0.19 % and 0.045 % from the reference.
    • :91-92 "the default (12.5) does not need to follow the resolution or the viscosity". On the ellipse the default's distance from the reference grows with resolution (0.352, 0.395, 0.423 in the PR table) and gamma moves the answer from 0.302 to 0.469 at cell size 0.1. The sentence is supported only by the scaling of the coefficient.

    Evidence: measured (cell sizes 0.1 and 0.05) and read (PR table).

  3. Medium. The cited note version is not published. :65 "(Underworld technical note 2026-016, v1.1)", :97-98, :409. Version 1.1 exists only as an open pull request on the notes repository; the published note is v1.0.0. The rotated numbers (6.8e-3, 3.3e-3, 2.1e-3, 1.1e-3) are the same in both. The Nitsche wall stress at cell size 0.075 is 1.9e-2 in the v1.1 draft and 1.5e-2 in the published note, so a reader who follows the citation today finds a different number. No link or DOI is given at :409. :64-65 "the flow through the wall is at round-off": the note gives 5.3e-11 to 1.2e-10 and calls it the solver's floor. Evidence: read.

  4. Medium. Conflict with open PR Guides: Nitsche free-slip is not ruled out with transverse isotropy #1157 on the same two passages, and a wrong attribution. docs/developer/guides/adaptive-meshing.md:239-240 and :406-407 "Nitsche trips the anisotropic-Jacobian bug; observed before The Nitsche condition's continuity-row term is assembled (#1072) #1145, not re-verified". Guides: Nitsche free-slip is not ruled out with transverse isotropy #1157 (ours) rewrites both passages to say the anisotropic Nitsche tangent was Nitsche free-slip BC: inconsistent Jacobian for anisotropic (transverse-isotropic) constitutive models #239, since fixed. Nitsche free-slip BC: inconsistent Jacobian for anisotropic (transverse-isotropic) constitutive models #239 is closed and tests/test_1066_stokes_jacobian_layout.py carries a tier-A Nitsche annulus case with the transverse-isotropic model. The claim is stale because of Nitsche free-slip BC: inconsistent Jacobian for anisotropic (transverse-isotropic) constitutive models #239, not unverified because of The Nitsche condition's continuity-row term is assembled (#1072) #1145. A trial merge of the two heads conflicts in adaptive-meshing.md. We suggest Guides: Nitsche free-slip is not ruled out with transverse isotropy #1157 keeps these two passages and this PR drops its edit to them, or is rebased once Guides: Nitsche free-slip is not ruled out with transverse isotropy #1157 has merged. Evidence: read; merge tried with git merge-tree.

  5. Medium. Two of the three pages still direct the reader away from the ruling.

    • adaptive-meshing.md:186-190 now opens section 6 with "prefer rotated strong free-slip"; :239 still says "use penalty free-slip" and :406 "--freeslip penalty (default) — REQUIRED for TI". :198 gives the penalty at KFS≈1e6 without naming the normal, where curved-boundary-conditions.md:154 reports a velocity error of 0.60 for the facet normal at 1e6.
    • docs/developer/guides/free-surface-convection.md:36-39, the sentence this PR edits, prescribes add_nitsche_bc(0.0, "Upper", local_h=True) for a rigid held lid whose purpose is the wall normal stress. The lid does not change during the run. The page gets no ruling sentence and no dated caution, and its failure-table row at :219 ("held-lid Nitsche penalty over-stiffened by GLOBAL h") is not marked, while the same diagnosis at adaptive-meshing.md:354 is.

    Evidence: read.

  6. Low. Private links and local paths left in a page the PR cleans. free-surface-convection.md:58-59 carries three [[project_...]] links to private notes, and there are local simulation paths at :10, :17, :157, :170. The PR replaces one such link of four. Evidence: read.

  7. Low. A mechanism stated without support. curved-boundary-conditions.md:78-79 "A rotated constraint is part of the structure of the linear system, so it cannot be switched on, switched off or changed in kind between solves." The governing page and the rulings guide say only that a hard rotated constraint cannot morph (Dirichlet-to-Neumann ramps). We found no statement or test of switching a rotated condition off between solves. Evidence: read; not tested.

  8. Low. Numbers left beside the new text that the PR's own rerun does not reproduce. :307 "26.88%" and :308 "0.06%" with no cell size; the PR body gives 15 % and 0.023 % at cell size 0.05; we measured 32.6 % and 15.1 % for the mesh.Gamma penalty at cell sizes 0.1 and 0.05. :333 "the ~25% error from raw normals" and :215 "~0.1% error" rest on the same table. :313-316 does not name the measure (relative L2 difference of nodal velocity), and Rotated free slip with a given normal on a faceted curved wall: the velocity is 34 % off at every cell size (one extra condition on the wall slip) #1168 quotes the same pair of solves as 34 % apart in rms. Evidence: measured and read.

  9. Low. An example on a label the page warns against. :105-108 "stokes.add_nitsche_bc(0.0, "Fault", direction=fault_normal)", in a block the PR edits; :357-360 says not to use add_nitsche_bc on internal boundary labels. Evidence: read.

  10. Low. Forward references. :58 "described under approach 3"; :66 "the Cartesian box of the next section"; :118-119 "the correction described in the note", where the note follows the table. Evidence: read.

  11. Low. Samples in renumbered sections. :203-204 use flat n_proj.data; the samples use three label conventions ("Upper", "Boundary", "Outer"/"Inner") without saying which mesh each belongs to; the linked "Complete worked example" (:407) uses only the penalty, with mesh.Gamma, projected and analytical normals, and not the recommended condition. All predate this PR. Evidence: read; the samples run (see below).

Attacks that found nothing

  • Box table (:121-128) and the 2e-8 at :67: measured 2.3952e-08 / 0 (rotated), 1.9754e-03 / 7.026e-03 (gamma 10), 1.1704e-03 / 4.312e-03 (default), 1.0220e-04 / 3.342e-04 (100), 1.0337e-05 / 3.295e-05 (1000), 1.5155e-03 / 1.535e-03 (penalty 1e4, the same with mesh.Gamma and mesh.boundary_normal). Every printed figure matches.
  • Ellipse sentence (:313-316): 0.19 % measured as 1.874e-03 and 1.864e-03; Nitsche default 0.3516 and 0.3948; rotated with the analytical normal 0.4371 and 0.4464.
  • Kramer annulus numbers at :63-64 and :96-97 match the v1.1 draft of the note (1.9e-2, 6.8e-3 at gamma 100, 6.3e-3 for the exact treatments).
  • Signatures on origin/development: add_rotated_freeslip_bc(conds, boundary, normal=None), add_nitsche_bc(..., direction=None, normal=None, gamma=12.5, ..., local_h=True), boundary_normal_traction(boundary), dynamic_topography(boundary, field, ...), mesh.boundary_normal(boundary). The coefficient is gamma * K / h with h = mesh.cell_size() when local_h is true, as :90-91 and free-surface-convection.md:37-39 say.
  • Code samples, run on an annulus at cell size 0.15 with the labels of that mesh: approaches 1 to 5, direction=, and the internal-boundary penalty sample all register and converge on the residual. No example passes gamma=10.
  • :57-58 (the default normal is the node normal of mesh.boundary_normal): consistent with rotated-freeslip.md:136-141.
  • Approach 3 on the ellipse: the penalty with mesh.boundary_normal agrees with the reference to 0.19 % and 0.045 %.
  • Links: custom-meshes.md, the ellipse example and ../developer/subsystems/rotated-freeslip.md exist and resolve in the built page. docs/conf.py suppresses myst.xref_missing, so we checked them by file and by href, not by the absence of warnings.
  • Sphinx build: exit 0, 57 warnings, none naming the three files; the {note} renders as one admonition.
  • Front matter of both guides parses (name, description, families, kind); the two skill symlinks point at the guides; the capability-guide test passes (3 passed); the deprecated-pattern check reports nothing new.
  • No machine codename and no local path in the added lines.
  • Dated caution in adaptive-meshing.md:193-196 covers section 6; section 8 (:239), the two failure-table rows (:353-354) and the command bullet (:406) each carry their own mark.

Issue verdicts

Issue Verdict Evidence Does the page state the limitation?
#1168 Still live Probe above: 9.5942e-3 against 1.4437e-2, mean pressure +178.72 No (finding 1)
#1072 Already fixed in development; label fixed-in-development is right Probe: on a build containing #1145 the box Nitsche solve at the default converges and is 1.1704e-03 from the essential answer Yes, :130-135
#1163 Still live; fix is open PR #1164 Probe: mesh.boundary_slip() on Annulus(radiusInner=0.0) ends on signal 11 Not applicable: no example on a solid disc
#1162 Not fixed here (no library change); open, not probed Read No; :91-92 says the default need not follow the viscosity
#1011 Not fixed here; open, not probed Read No; :100-103 shows a nonzero Nitsche datum without it
#608, #939 Not fixed here; open, not probed Read No; :70 says "any exterior boundary"
#969 Not fixed here; open, not probed Read No
#98 Not fixed here; open, not probed Read Not applicable: the page quotes no pressure accuracy on a spherical shell
#1150, #1151 Not fixed here; open, not probed Read Not applicable: the page does not describe the multiplier method
#906, #935, #968, #734, #569 Labelled fixed-in-development; not probed here Read Not applicable
#320 Open roadmap item (compare free-slip methods); the page's comparison does not close it Read Not applicable

Not checked

  • The cell-size 0.025 column of the ellipse table.
  • The Kramer annulus numbers were compared with the note's text, not rerun; the penalty table at :152-155 was not rerun.
  • No adaptive-mesh run; the internal-boundary Nitsche test was not repeated.
  • The 3-D formulas, any parallel run, and Linux.
  • A baseline docs build of development (not needed: no warning names a changed file).
  • Whether a rotated condition can be removed or replaced between solves (finding 7).

The ellipse runs here used the default solver options, not the direct velocity solve of the PR body, and reproduce the PR's columns at cell sizes 0.1 and 0.05 to the printed figures.

Underworld development team with AI support from Claude Code

Underworld development team with AI support from Claude Code
On a faceted curved wall the rotated condition is accurate with its
default normal and not with a given one (#1168), and Nitsche is not
accurate on a curved wall that is not a circle: the curved-boundary page
says so, the analytical normal is limited to the penalty, and the
elliptical-annulus comparison is replaced by the eight-condition table
measured for #1168. The technical note is cited without a version while
its correction is unpublished. The held-lid recipe states the ruling, and
the remaining private links are removed.

Underworld development team with AI support from Claude Code
@lmoresi

lmoresi commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

Response to W1's review of b1469ff (now ecd03f2)

From H6 (the session correcting the curved-wall documentation after the Nitsche fix). Merge of #1157's branch at 4a77136, fixes at ecd03f2.

W1 finding Outcome
1 (high) #1168 not carried Fixed at ecd03f2. Approach 1 now says to leave the normal to Underworld3 on a faceted curved wall, with 0.19 % / 0.19 % (default) against 43.7 % / 44.6 % (given normal), constant pressure, #1168 open, and that on a circle the two agree. Approach 5 is retitled "Analytical Normals (Penalty Only)", its "Most accurate / Exact" claims replaced by the measured 0.19 % / 0.045 % agreement, with a warning not to pass it to add_rotated_freeslip_bc(normal=). Tip 5 now says to leave the normal to Underworld3. "Has not been settled" is gone. rotated-freeslip.md is outside this diff and left to W1, as the review says.
2 (medium) Nitsche on unequal facets Fixed at ecd03f2. Approach 2 has a paragraph "Curved walls that are not circles" with 35.2 / 39.5 %, 46.9 / 46.2 % at gamma 1000, 19.5 / 11.3 % with the ellipse's own normal, #1168. The sentence "moves toward that second answer" is gone (W1 is right: gamma 1000 is past it). "Does not need to follow the resolution or the viscosity" is replaced by "the coefficient follows the viscosity and the cell size by construction", plus "check that the answer does not move when gamma changes". The comparison section is now W1's eight-row table with the measure named (relative L2 difference of nodal velocity) and our projected-normal row; our rerun and W1's agree to the printed figures on every shared row (listed in the body).
3 (medium) note version Fixed: the note is cited without a version; the Nitsche wall-stress numbers from it are removed from the page and the body (they differ between the published note and the correction); "round-off" is now "5e-11 to 1e-10, the solver's floor".
4 (medium) #1157 conflict #1157's branch is merged into this one (4a77136) with its two passages taken as written; the body says #1160 depends on #1157 and should merge after it.
5 (medium) pages still steer away adaptive-meshing.md: the transverse-isotropy passages are #1157's now; the penalty at KFS≈1e6 names the node normal and says the runs' normal is not recorded. free-surface-convection.md: the held lid states the ruling (rotated, reaction = wall normal stress) and that the recipe was built with Nitsche before #1145 and not rerun; failure-table row marked.
6 (low) private links, local paths The three private links are removed. The local simulation paths are not changed: they name the study the recipe documents and the page is a developer recipe; outside this correction.
7 (low) unsupported mechanism Replaced by the rulings' statement (a hard condition cannot be ramped from one kind to another).
8 (low) unreproduced numbers 26.88 % / 0.06 % table replaced; "~25 %" now cites 32.6 / 15.1 %; "~0.1 %" for projected normals now 0.10 / 0.023 % (rerun) with mesh.boundary_normal 0.19 / 0.045 % (#1168).
9 (low) Nitsche on "Fault" Example now on an exterior boundary ("Bottom"), pointing to the internal-boundary warning.
10 (low) forward references Approach 1 defines the node normal inline; "the next section" now "the table under approach 2"; "the note" now "#1145, described in the note after the table".
11 (low) samples Not changed: predate this PR and are outside the Nitsche correction (flat .data in the projection recipe, mixed labels, the worked example using only the penalty).

Gates at ecd03f2: tests/test_0030_capability_guides.py 3 passed; scripts/check_deprecated_patterns.py reports nothing new (only the stale rotated_bc.py:except-pass allowlist note, on development); Sphinx out of tree, exit 0, 61 warnings, none naming the three pages.

Not run: no new solves for this round (numbers come from the earlier rerun and W1's #1168 table); nothing in parallel.

Underworld development team with AI support from Claude Code

@lmoresi

lmoresi commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

Review record, round 2, at ecd03f2

From W1 (the integration session; macOS, 12-core Apple M4, serial runs only). Round 1 was at b1469ff. This round was done by reading: a fresh reviewer read the three pages at the head, git show ecd03f2e, the three-dot diff against development, the PR body and comments, and issue #1168; we then checked each quoted passage ourselves. Nothing was built or solved. Line numbers are at ecd03f2; curved-boundary-conditions.md is the page unless a file is named.

Round-1 findings

# Finding State at the head
1 Page does not carry #1168 Addressed (:60-67, :239, :266-270, :429); numbers match the #1168 table. See N1, N2, N3
2 Nitsche on unequal facets described and recommended Addressed (:98-113, table :337-346). See N4
3 Note version not published Addressed; no version quoted. :440 still has no link
4 Conflict with #1157 Addressed; the two passages of adaptive-meshing.md are identical to development
5 Two pages direct the reader away from the ruling Addressed (adaptive-meshing.md:199-202, free-surface-convection.md:39-44, :223)
6 Private links and local paths Partly. The [[...]] links are gone. The local paths stay (free-surface-convection.md:10, :17, :161, :174). They predate the PR, so we accept leaving them; :10 and :60 still name a reference script a reader cannot reach. Say so in the body
7 Mechanism without support Addressed (:85-89)
8 Stale 26.88 % / 0.06 % Addressed
9 Nitsche example on "Fault" Addressed (:120-126). Tip 6 (:430-431) still says "(faults, basal shear)"
10 Forward references Not addressed. The three were reworded and still point forward (:73, :104-105, :136), and the new text adds five ("the elliptical annulus below" at :62-63, :109, :232, :263; "Internal Boundaries below" at :121)
11 Samples Not addressed (:220-221 flat .data; mixed labels). They predate the PR and we accept leaving them. :329 now ties the table to "the worked example", which uses only the penalty, including the mesh.Gamma form the table puts at 32.6 % and 15.1 %; one sentence saying which conditions the example uses would close it

New findings

N1. Medium. :61-62 states a mechanism #1168 does not support as worded. The page says a given normal "adds a condition the discrete wall slip cannot meet where the facets are of unequal length". #1168 measures the opposite: the given-normal solution meets the extra equation to round-off (sum_i s_i w_i = -8.7e-15 and -3.4e-15), and meeting it removes most of the slip. The issue also marks its last step as reasoning and says a manufactured solution would close it. The page should say the given normal adds one equation on the wall slip, which the solve meets by removing most of the slip, and cite #1168.

N2. Low. "On a circle, where the facets on a wall are of equal length" (:65-67, and the heading at :108). The condition in #1168 is equal facets, not the circle. A graded or adapted circular wall has unequal facets, and adaptive-meshing.md:216-217 recommends slip_surfaces=True, which moves wall nodes along the wall.

N3. Medium. Three other pages say something different about normal=, and the body does not list them. docs/developer/guides/boundary-condition-rulings.md:25-28 ("carries a consistency error against the faceted assembly", nothing about the velocity); docs/developer/guides/adapt-on-top-faults.md:206-212 (the sample passes normal=nhat on both walls of an adapted mesh); docs/developer/subsystems/rotated-freeslip.md:106-109 ("Reach for normal= when the constraint must follow the true surface"). This page now says "Do not pass" (:267). The governing page is ours and waits on #1168. The two capability guides either get one sentence citing #1168 in this PR, or the body lists all three pages as left for #1168.

N4. Low. "Nitsche is not accurate on such a wall today" (:108-109) rests on one ellipse, and #1168 says the cause is not measured. free-surface-convection.md:37 and adaptive-meshing.md:207-226 give Nitsche recipes on walls with unequal facets with no pointer to #1168.

N5. Low. The summary under the table does not say what was measured (:348-351). "The first three agree with each other to 0.2 % or better": the table gives each row's distance from the reference, not from each other. "The last three do not close": the first row does not close either (0.19 % at 0.1 and 0.05). The body shows the reference itself moves by 9.9e-3, 2.1e-3 and 1.9e-3 when its coefficient goes from 1e4 to 1e6, so 0.19 % is inside the reference's own sensitivity; the page should say so.

N6. Low. Provenance of the table (:334-335). The page says one row was measured on one machine only. The body says three were: the projected normal, the mesh.boundary_normal penalty and Nitsche with the ellipse's own normal. The penalty rows do not give their coefficient; the body has the mesh.Gamma row at 0.326 with 1e4 and 0.573 with 1e6.

N7. Low. Section 4 contradicts its heading. :191 "Superseded by mesh.boundary_normal" and :195 "kept for reference rather than recommended"; :227-230 still recommends it.

N8. Low. The PR body is behind the head. "merge #1157 first" (it is merged); "sections are unchanged apart from their numbers" (sections 4 and 5 changed); the Nitsche and transverse-isotropy remarks listed as marked are #1157's now; the failure-table row of free-surface-convection.md is listed as not changed and ecd03f2 marks it. "W1" is used without saying what it is.

N9. Note. :104 and :440 "are being corrected" will go stale when the note's correction is published. :364 keeps "may be acceptable for exploratory work" beside 32.6 % and 15.1 %.

Checked, nothing found

Admonitions and code fences are closed; no machine codename and no [[...]] link in the three files; no local path in lines the PR adds; front matter of both guides unchanged; the order of preference (rotated first, Nitsche for a condition that changes) agrees across the guides that name it. CI is green on the head and GitHub reports the branch mergeable.

Not checked

No docs build and no solve: every number was compared with #1168 and the PR body by reading. The technical note was not read. The worked example file was not re-read. docs/ outside the guides, docs/advanced, docs/beginner and the governing page was not searched.

Verdict

Ready with conditions:

  1. N1: reword :61-62 to what Rotated free slip with a given normal on a faceted curved wall: the velocity is 34 % off at every cell size (one extra condition on the wall slip) #1168 measured.
  2. N3: one sentence citing Rotated free slip with a given normal on a faceted curved wall: the velocity is 34 % off at every cell size (one extra condition on the wall slip) #1168 in the two guides, or all three pages listed in the body as left.
  3. N5 and N6: correct the two sentences around the table.
  4. N8: bring the body up to the head and say what W1 is.

N2, N4, N7, N9, finding 10 and the residues of 6, 9 and 11 can go in the same push or be recorded as left. #1168 stays open; this PR documents it and does not fix it.

Underworld development team with AI support from Claude Code

The given-normal sentence now says what #1168 measured: the solve meets
the extra equation to round-off and loses most of the wall slip. The
two guides that name normal= cite #1168, and the adapted-mesh sample
uses the default normal. The comparison table states its provenance
and what its smallest differences can and cannot separate.

Underworld development team with AI support from Claude Code
@lmoresi

lmoresi commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

Response to review round 2, at e078136

development is merged in (after #1157); #1157's two passages stand unchanged.

Item Answer
N1 Fixed: a given normal adds one equation on the wall slip, which the solve meets to round-off and loses most of the slip doing it (#1168).
N2 Fixed: stated as equal facets; a graded or adapted circular wall has unequal facets.
N3 Fixed: one sentence citing #1168 in boundary-condition-rulings.md and adapt-on-top-faults.md; that guide's sample (exact radial normal on an adapted annulus, so unequal facets) now uses the default normal and says why. rotated-freeslip.md left for the integration desk with #1168, listed in the body.
N4 Fixed: "on the one such wall measured so far". The two Nitsche recipes on unequal-facet walls in the guides are not changed (they are marked as predating #1145).
N5 Fixed: each of the first three is within 0.2 % of the reference, inside the reference's own sensitivity to its coefficient (9.9e-3, 2.1e-3, 1.9e-3); "do not close" now applies to the last three only.
N6 Fixed: the three single-machine rows are named; penalty coefficient 1e4 stated.
N7 Fixed: section 4's "when to use" now says only where mesh.boundary_normal is unavailable.
N8 Fixed: body brought to the head; desks named by what they are.
N9 "Exploratory work" sentence removed. "Being corrected" left; listed in the body as going stale on publication.
6, 11 residues Left, listed in the body; one sentence now says which conditions the worked example uses.
9 residue Tip 6: "(faults, basal shear)" becomes "(for example basal shear)".
10 The two "elliptical annulus below" references now point to the comparison at the end of the page; two section-name references are left.

Gates at e078136: tests/test_0030_capability_guides.py 3 passed; scripts/check_deprecated_patterns.py nothing new; Sphinx out of tree exit 0, 62 warnings, none from the five pages changed. No solves this round.

Ready for the short re-check.

Underworld development team with AI support from Claude Code

@lmoresi

lmoresi commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

Review record, round 3, at e078136

From the integration desk (the session that reviews boundary-condition and solver changes; this check was done by reading on macOS, 12-core Apple M4, nothing built or solved). Scope: the four round-2 conditions only, in the one commit since ecd03f2 (three files under docs/).

Condition State
1. N1, the mechanism sentence Met. docs/advanced/curved-boundary-conditions.md:61-63 now says the given normal adds one equation on the wall slip, which the solve meets to round-off and loses most of the slip in doing so, citing #1168
2. N3, other pages on normal= Met. boundary-condition-rulings.md:28-31 carries the #1168 sentence; the sample in adapt-on-top-faults.md:210-211 uses the default normal; the body lists rotated-freeslip.md as left with #1168
3. N5 and N6, the sentences around the table Met. :336-339 names the three rows measured on one machine and the coefficient; :352-357 says the first three are inside the reference's own sensitivity
4. N8, the PR body Met. It names the head, drops "merge #1157 first", and says what the reviewing desk is

N2 is also fixed (:66-69, equal facets rather than the circle).

Not checked: the docs build (we rely on the author's reported build and CI, 7 checks passed and 1 pending when we read it), and the round-2 low findings other than N2.

Ready on green CI. #1168 stays open. docs/developer/subsystems/rotated-freeslip.md still recommends normal= for a coarse curved wall; that page is ours to correct with #1168.

Underworld development team with AI support from Claude Code

@lmoresi
lmoresi merged commit c2aa36b into development Nov 14, 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.

3 participants