feat(projection): opt-in linear_solver() + post-processing how-to (#156, #158)#281
Merged
Merged
Conversation
…, #158) #156: Projection (and its vector/tensor/multi-component variants) does a linear SPD L2 projection, but inherits the heavy SNES_Scalar newtonls/gmres/gamg stack — GAMG setup/repartition is the memory/communication bottleneck for repeated post-processing projections (OOM-killed mid-sequence on Gadi). Add an opt-in SNES_Projection.linear_solver(pc='jacobi', rtol=1e-10) that switches to ksponly+CG+cheap-PC and drops the unused GAMG options. The global default is unchanged (internal paths that rely on it are unaffected). Verified the lightweight solve matches the default projection; tests/test_0506. #158: document the 'project components, compose analytically' rule for boundary stress recovery — projecting the composed nᵀσn mixes derived-τ and discontinuous p at lower accuracy (~2x error on the Thieulot benchmark); project the τ components and form σ_rr = nᵀτ_proj n − p instead. New how-to under docs/developer/subsystems/ covering both rules. Underworld development team with AI support from Claude Code
This was referenced Jun 24, 2026
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.
Two small post-processing improvements from the spherical-benchmark cluster.
#156 — opt-in lightweight projection solver
Projectiondoes a linear SPD L2 solve but inherits the heavynewtonls/gmres/gamgdefault — GAMG setup/repartition is the memory/comm bottleneck for repeated post-processing projections (OOM-killed mid-sequence on Gadi). New opt-in method:Global default unchanged (internal paths unaffected). Verified the lightweight solve matches the default projection (rel ~1e-5, the tighter of the two). Tests:
test_0506_projection_linear_solver.py(sets options / matches default / opt-in).#158 — 'project components, compose analytically' (doc)
Documents why direct projection of the composed
nᵀσnloses accuracy (mixes derived-τ + discontinuous-p) and the reliable rule: project the τ components, formσ_rr = nᵀτ_proj n − p. New how-to:docs/developer/subsystems/boundary-stress-and-projection-postprocessing.md(covers both rules; registered in the toctree).Closes the actionable parts of #156/#158 (the opt-in default-preset question and the documentation).
Underworld development team with AI support from Claude Code