Skip to content

ThinSheet: L and c_b symbolic with the basal rows declared; history projection recorded; facet normal follows a deform (#875, refs #879) - #1076

Merged
lmoresi merged 3 commits into
developmentfrom
bugfix/thin-sheet-875-876-879
Nov 12, 2026
Merged

lmoresi merged 3 commits into
developmentfrom
bugfix/thin-sheet-875-876-879

Conversation

@lmoresi

@lmoresi lmoresi commented Nov 11, 2026

Copy link
Copy Markdown
Member

Fixes #875. Refs #879: two of its parts are fixed here, and #879 stays open for the history projection's normal.
#876 is not here: C1 moved it to W1's bundle C5.

#875: L and c_b are inlined as numbers.

  • F0/F1 used thickness.sym and basal_drag.sym. So describe() and the transcript showed numbers, and a dimensional thickness skipped the unwrap path.
  • They now take the expressions L and c_b.
  • The rows add_basal_drag / add_basal_traction add are summed in a new basal_coupling property, declared in _solver_terms.

#879: the history projection is not recorded, and the facet normal goes stale.

  • _keep_history_tangent now records a history_projection transcript event after the shift, marked adjoint-unsupported with the reason. The transcript log shows it as "project …".
  • The DG0 facet-normal field is now remesh_policy="reinit" and stamped with mesh._geometry_version. It is refilled at solve(), and on access, after a deform. Before, it was filled once and REMAP'd stale.

Still open in #879. _keep_history_tangent projects with the sphere's radial normal, which is wrong once the manifold is deformed off the sphere. So is the tangency datum. It is marked TODO(BUG) at that line.

Tests. tests/test_1093_thin_sheet_review_followups.py, 3 tests (two tier A, one tier B):

  • the symbolic L and c_b, checked against the closed form u = L f / c, before and after changing L;
  • the facet normal after a deform, through sheet.solve(), against each triangle's own vertex cross product. Development is 6.1e-2 off, and a mutant that drops the refill from solve() fails it;
  • the transcript event.
    All three fail on development and pass here. The thin-sheet, objective-step and adjoint-support suites pass (54, tier C excluded).

Review. H1's adversarial review found no number changes. 356 sheet solves gave identical iteration counts, and the Newton tangent matches FD to about 1e-11 on both builds, including u-dependent c_b and L. The branch merges cleanly with development and with W1's C5 (#1066).

  • Addressed: H1's F1 (test through solve()) and F3 (independent reference). F2 is scoped out above.
  • Not done: F5, an invalid \m escape in a docstring at the top of the file, predates this branch.
  • Overlap: C5 also edits ThinSheet.solve(), so whichever lands second merges development in.

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)
  • 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)
  • New data access uses .array / mesh.X.coords — no with ....access(...), no mesh.data (S7)
  • Parallel safety considered (S11): the facet-normal refill writes on every rank, an empty one included
  • 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

🤖 Generated with Claude Code

…rd and time reach the rotated path; the history projection is recorded and the facet normal follows a deform (#875, #876, #879)

- #875: F0/F1 carried thickness.sym and basal_drag.sym, so describe() and
  the transcript showed numbers, and a dimensional thickness entered without
  the unwrap path. They now take the expressions L and c_b. The rows from
  add_basal_drag / add_basal_traction are summed in a new basal_coupling
  property and declared in _solver_terms.
- #876: ThinSheet.solve takes picard and time and passes them on.
  SNES_Vector.solve takes time, plans the warm-up with staged_loop on the
  rotated path, and passes picard and time to it, as Stokes.solve does. It
  was hard-coded to picard=0, and a sheet on a sphere always solves on that
  path, so the plasticity guides' solve(picard=N) recipe never reached it.
- #879: _keep_history_tangent now records a history_projection event after
  the shift, with adjoint unsupported and the reason. The transcript log
  shows it as "project ...". The DG0 facet-normal field is now
  remesh_policy="reinit", stamped with mesh._geometry_version, and refilled
  at solve (and on access) after a deform. Before, it was filled once and
  REMAP'd stale.

tests/test_1093_thin_sheet_review_followups.py: 4 tests (two tier A, two
tier B for cost). All fail on development (a6eebb6; these files are
unchanged at 8f0ed0a) and pass here. The thin-sheet, objective-step and
adjoint-support suites pass: 55 tests, tier C excluded.

Underworld development team with AI support from Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reverts the SNES_Vector.solve change (time, staged_loop, picard to the
rotated path), the picard/time arguments of ThinSheet.solve, and the picard
test. That work stays on reference/thin-sheet-876-for-W1 (b611163) for W1
to read. This branch now carries #875 and #879 only. The thin-sheet,
objective-step and adjoint-support suites pass (54, tier C excluded).

Underworld development team with AI support from Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…each triangle's own normal; mark the history projection's sphere normal (H1 review F1-F3)

- The test deforms the sphere to an ellipsoid, calls sheet.solve(), and
  compares the field with each triangle's vertex cross product, which is
  independent of the DM geometry the code uses. Development: 6.1e-2 off.
  A mutant that drops the refill from solve() fails it (4.1e-3).
- TODO(BUG) at _keep_history_tangent: it still projects with the sphere's
  radial normal, wrong after a deform (as is the tangency datum). That
  part of #879 stays open.

Underworld development team with AI support from Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 11, 2026 16:23

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 closed this Nov 12, 2026
@lmoresi lmoresi reopened this Nov 12, 2026
@lmoresi
lmoresi merged commit 6cc254b into development Nov 12, 2026
39 of 47 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