Skip to content

Symbolic FEM and Adjoint Forms (UWTN 2026-020) - #59

Merged
lmoresi merged 1 commit into
mainfrom
note/symbolic-fem-and-adjoint-forms
Oct 26, 2026
Merged

lmoresi merged 1 commit into
mainfrom
note/symbolic-fem-and-adjoint-forms

Conversation

@lmoresi

@lmoresi lmoresi commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

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 put solver.gradient on development.

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 appendix part, 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 in figures/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.
  • The equation-label test now recognises the :label: option of {math}.
  • The note is listed in 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-adjoint until its viscosity-floor example has a result. This note does not depend on it.

After this merges, deposit-ready opens 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

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
@lmoresi
lmoresi merged commit 94e4893 into main Oct 26, 2026
4 of 5 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.

1 participant