Repository navigation
Symbolic FEM and Adjoint Forms (UWTN 2026-020) - #59
Merged
Merged
Conversation
How Underworld3's symbolic residual gives Newton its tangent stiffness from four derivative blocks, and how the same blocks give the discrete adjoint: one transposed linear solve and an integral per parameter. The Lagrangian introduces the adjoint problem in the text; the derivation by differentiating the constraint is Appendix A, which the PDF prints after the references. Published 2026-10-25, against underworld3 development @ f414da63, where solver.gradient landed (underworldcode/underworld3#744). With it: - the PDF template takes an appendix part, marked in the source with +++ {"part": "appendix"} and printed after the references with lettered headings; the published PDFs rebuild unchanged; - examples/ is for what a reader launches; figure scripts go in figures/src/ (CONTRIBUTING, the submit page, the article template); - the equation-label test knows the 🏷️ option of {math}. Underworld development team with AI support from Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wSha1nV5DddcThnCRoFab
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.
UWTN 2026-020, Louis Moresi. Every implicit solve in Underworld3 is a residual written in SymPy, and Newton assembles its tangent stiffness from four symbolic derivative blocks. The same blocks give the discrete adjoint: one transposed linear solve, and an integral for each parameter, give the derivative of a misfit with respect to every parameter at once.
Written against underworld3
development@f414da63, the merge of underworldcode/underworld3#744 that putsolver.gradientondevelopment.Structure. The Lagrangian introduces the adjoint problem (eq. 8) in one paragraph in the main text. The derivation by differentiating the constraint, with Many parameters at once and One stiffness, three forces, is Appendix A. The PDF prints it after the references. On the site it comes at the end of the article, before the references, because the theme always puts references last.
Template. The PDF template now takes an
appendixpart, marked in the source with+++ {"part": "appendix"}rather than lifted from a heading, so no ordinary section can be caught by it. It prints after the bibliography with lettered headings. The faults and multigrid PDFs rebuild with identical text.Also in this change:
examples/is for what a reader launches from Binder. Figure scripts go infigures/src/, as this note's do. The rule is in CONTRIBUTING, the submit page and the article template. Published notes are left as they are.:label:option of{math}.acknowledgements.yml.Two figures, with alt text and Typst sources in
figures/src/. Seven pages.The companion note, Adjoint Forms in Practice (UWTN 2026-021), stays on
note/discrete-adjointuntil its viscosity-floor example has a result. This note does not depend on it.After this merges,
deposit-readyopens a "Deposit:" pull request. Merging that one is the separate decision to mint the DOI.Underworld development team with AI support from Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_018wSha1nV5DddcThnCRoFab