Repository navigation
Thin sheet: solve(picard=N) reaches the rotated loop; picard on a fault contact; a manifold takes stress_transport "none" (#876, #887) - #1066
Merged
Conversation
…s stress_transport "none" (#876, #887) - SNES_Vector.solve handed its rotated path picard=0 and did not tell the warm-up planner that the rotated loop stages Picard itself. A manifold sheet, which always solves there, could not take the plasticity guides' solve(picard=N) recipe, and ThinSheet.solve did not take picard at all (a TypeError). Both now pass it through as Stokes does: picard=3 stages three Picard iterations, then Newton, and converges to the plain solve's answer. With the old call the new test fails ("no Picard phase"). - ThinSheet refused stress_transport="none" on a manifold along with the trace-back flavours, though stress-transport.md recommends it for a tidal cycle. "none" keeps the history at its node, so it never leaves the faceted surface. It is now taken: on a slow flow it agrees with the grid history to 1.1e-4 of the stress, and both stay tangent. - The rotated path's GAMG-fallback warning gives advice that fits the mesh. A refined mesh carries its coarse levels (register mesh.multigrid_levels[:-1] with set_custom_fmg), and a manifold is no longer told to use adapt(), which does not keep its vertices on the surface. - thin-sheet.md documents normal_velocity, the manifold's transport choices and solve(picard=N). #876 also asked for time. ThinSheet.solve still does not take it: under the #410 ruling, time is the model's clock, and mesh.t already reaches a manifold sheet (the answer scales by 3.0000000039 when the clock goes from 1 to 3). solve(time=) sets petsc_t, which nothing a user writes reads; commented on #410. test_1159 (new, tier B). Serial: the sheet files with test_1018, test_1059_stress_transport and test_0009 give 110 passed (with an intermediate time= plumbing since removed); the sheet files at this commit give 22 passed. Underworld development team with AI support from Claude Code
Underworld development team with AI support from Claude Code
… fault contact; what picard=N means hyperion's review of d36ec79: - F1: the GAMG-fallback advice on a refined mesh names field_id=0 for a saddle-point solver; set_custom_fmg(solver, mesh.multigrid_levels[:-1]) raised CollectiveBuildError on Stokes. test_1159 follows the printed advice on a refined Stokes annulus and a refined sphere and finds the multigrid built. - F4: an explicit picard stages on a fault contact (staged_loop counts fault contacts, on SNES_Vector and Stokes); it raised NotImplementedError naming rotated free slip. The loop's message now names both and points at solve(picard=N). Tests on a fault-contact sheet (fixture from the review) and a fault-contact Stokes box: a Picard phase, convergence, the picard=0 answer, and no blended Jacobian for a cold picard=0 solve. - F2, F3: ThinSheet.solve says the rotated loop takes no automatic Picard step and picard=N gives at least N there (newton_switch_rtol); test_1159 pins the switch at exactly N with newton_switch_rtol=1. - F5: lagrangian and forward are not called trace-backs. Mutants: staged_loop without fault contacts, own_loop without fault contacts, and the advice without field_id each fail test_1159. Underworld development team with AI support from Claude Code
The GAMG-fallback warning is printed on rank 0 only, so at np 2 rank 1's capfd assert failed and it left the test while rank 0 entered the collective multigrid_levels: test_1159 hung (hyperion's review, F6). The captured text is broadcast from rank 0 before the asserts. Underworld development team with AI support from Claude Code
Underworld development team with AI support from Claude Code
9 tasks done
9 tasks done
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.
picard on the rotated path (#876). A sheet on a manifold always solves in the rotated loop (
rotated_bc.solve_rotated_freeslip).SNES_Vector.solvehanded that looppicard=0, andThinSheet.solvetook nopicard. Sosheet.solve(picard=2)was a TypeError, and the plasticity guides'solve(picard=N)recipe could not reach a nonlinear sheet.SNES_Vector.solveplans the warm-up with the rotated loop marked as its own (own_loop) and as one that stages Picard → Newton (staged_loop), and passespicardto the loop.ThinSheet.solveforwards it.picard=Nmeans at least N Picard iterations. The loop stays on Picard until the residual has fallen bynewton_switch_rtol(default 1e-2). The loop takes no automatic cold-start step, sopicard=0is Newton from the start. Both docstrings say so.picard on a fault contact. A fault contact runs the same loop. An explicit
picard > 0there raised NotImplementedError naming rotated free slip, becausesolve()did not compile the blended Jacobian for it.staged_loopnow counts fault contacts, onSNES_Vectorand on Stokes. On a fault-contact Stokes box,solve(picard=2)stages in 5 iterations against 6 forsolve(), with the same answer to 1.4e-10. A coldpicard=0solve there still compiles no blended Jacobian. The loop's message, for a caller that reaches it withoutsolve()(fault_contact.solve_with_fault(picard=N)), names both and points atsolve(picard=N).time. #876 also asks forsolve(time=). This branch does not add it, following the ruling on #410 (2026-07-24) to retire the PETSc-time plumbing: time is the model's clock.mesh.treaches the sheet: settingtracker.timefrom 1 to 3 scales the answer by 3.000000000009 (hyperion's review).solve(time=)on the other solvers setspetsc_t, which nothing a user writes reads (#410).A manifold takes
stress_transport="none"(#887). stress-transport.md recommends"none"for a tidal or seismic cycle, and a manifold sheet refused it along with the flavours that move points off the faceted surface."none"keeps the tangent projection of the history, the only manifold step"eulerian"has (_keep_history_tangent). On a slow flow, after four steps it is 1.1e-4 from"eulerian", and the stored stress is tangent to 1e-16.The GAMG-fallback advice (#887). On a refined mesh the warning told a Stokes solver to call
set_custom_fmg(solver, mesh.multigrid_levels[:-1]), which raises CollectiveBuildError there: the hierarchy is the velocity block's. It now namesfield_id=0for a saddle-point solver, and a manifold is not told toadapt(). Followed literally:thin-sheet.mddocumentsnormal_velocity, the transport choices andpicard.Tests
tests/test_1159_thin_sheet_solve_takes_picard.py(new, tier B):picard=3on a nonlinear sphere sheet runs a Picard phase and converges to the plain solve's answer. Withnewton_switch_rtol=1it switches at exactly iteration 3.field_id=0) and on a refined sphere (without it).picardstages on a fault-contact sheet and on a fault-contact Stokes box, and converges to thepicard=0answer. A coldpicard=0solve compiles no blended Jacobian."none"is taken on a manifold and agrees with"eulerian"on a slow flow; the flavours that move points off the surface are still refused.On development the first test is a TypeError. With this branch's sheet on development's
.pyxthere is no Picard phase. These mutants each fail the file:"none"without the tangent step;staged_looporown_loopwithout fault contacts;field_id.Serial on wombat: 108 passed over 1159, 1077, 1092, 0846, 0847, 1136, 1018 (×2), 0062, 1087 and 0022.
Hyperion ran two review rounds; the records are to be posted here:
picard=2stages in 4 Newton iterations against 7 and matchespicard=0to 1.9e-7, at np 1 and 2, whilepicard=0keeps its residual history.Issues
ThinSheet.solve takes neither picard nor time; the rotated path of SNES_Vector hardcodes picard=0 #876: fixed-in-PR. The picard half is fixed here; the time half is answered by Time-dependent Dirichlet BCs are broken in solve(): essential values inserted at PETSC_MIN_REAL, mesh.t kernels see -1.8e308 #410's ruling.
Rotated solve and thin sheet: docs and messages behind the code #887: stays open for its rotated half. Not done here:
rotated-freeslip.md;solve_rotated_freeslip's Returns section.That part waits on the REFERENCE decision.
Not fixed here: an adapt child whose user chose GAMG still gets the
adapt()advice (it predates this branch).Underworld development team with AI support from Claude Code