Skip to content

Plate bending demo with symbolic reduction operators - #5401

Open
pbrubeck wants to merge 28 commits into
mainfrom
pbrubeck/plate-bending-demo
Open

pbrubeck wants to merge 28 commits into
mainfrom
pbrubeck/plate-bending-demo

Conversation

@pbrubeck

@pbrubeck pbrubeck commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add a plate-bending tutorial that uses symbolic interpolate expressions inside variational forms for three finite element methods.

plate_bending
├── MITC: interpolate the shear strain into a Nedelec space
├── Modified Morley: differentiate the P1 interpolant in the membrane term
└── Discrete Kirchhoff: interpolate the gradient into rotated Bernardi–Raugel

Include element diagrams, checks of the membrane limit and convergence rates, a convergence regression test, and plotting support for physically mapped elements. The tutorial uses the same-mesh interpolation support merged in #5258.

Assisted by OpenAI Codex.

Evidence

  • Before: These plate formulations had no combined tutorial or discrete Kirchhoff convergence test.
    After: Nine focused tests pass: the complete plate-bending demo, demo registration, plotting for six mapped element families, and discrete Kirchhoff convergence.
  • make srclint passes.
  • The strict HTML build passes with Fix warnings from the strict documentation build #5674 applied; notebooks render saved output without execution.

Merge Danger

Door: two-way

Blast Radius: demos/plotting

Mapped elements are interpolated into a broken Lagrange space before sampling for plots. The tutorial and diagrams are registered with the documentation build and demo test suite.

@pbrubeck pbrubeck added the LLM used An LLM was used in the production of this PR label Aug 27, 2026
@pbrubeck pbrubeck changed the title Plate bending demo using MITC Demos for symbolic interpolation inside a variational form Aug 27, 2026
@UZerbinati UZerbinati self-assigned this Aug 27, 2026
@pbrubeck
pbrubeck force-pushed the pbrubeck/form-interp-tsfc branch 10 times, most recently from 37fe40f to 4cce203 Compare September 10, 2026 16:38
@pbrubeck
pbrubeck force-pushed the pbrubeck/plate-bending-demo branch from 4cd06f0 to 1a5c69e Compare September 10, 2026 23:15
@pbrubeck pbrubeck added base:main Run this PR using a main (dev) build and removed base:main Run this PR using a main (dev) build labels Sep 10, 2026
@pbrubeck
pbrubeck force-pushed the pbrubeck/form-interp-tsfc branch 7 times, most recently from 49f2247 to 243649b Compare September 17, 2026 20:44
@pbrubeck
pbrubeck force-pushed the pbrubeck/plate-bending-demo branch from aac3f9a to d86c8c5 Compare September 17, 2026 20:44
@pbrubeck
pbrubeck removed this pull request from stack #5402 September 30, 2026 11:06
@pbrubeck
pbrubeck added this pull request to stack #5493 September 30, 2026 11:15
@pbrubeck
pbrubeck removed this pull request from stack #5493 October 22, 2026 13:57
@pbrubeck
pbrubeck added this pull request to stack #5550 October 22, 2026 13:57
@pbrubeck
pbrubeck force-pushed the pbrubeck/form-interp-tsfc branch from c407caf to 0e10a44 Compare October 29, 2026 17:23
pbrubeck and others added 10 commits November 19, 2026 19:56
Both demos rendered without the link to the script pylit generates from them,
which is how a reader gets a version they can run. The modified Morley demo
named its source in prose rather than citing it, so the references it rests on
were absent from the bibliography.
Solve the manufactured biharmonic problem from the discrete Kirchhoff
demo on uniform refinements and check first-order convergence of the
broken Hessian error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FunctionPlotter contracted the coefficients with the reference basis,
which is wrong for Piola-mapped and physically mapped elements such as
Morley, Hermite and Bernardi-Raugel. It now samples the interpolant of
such a function in a broken Lagrange space.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Solve a clamped plate with MITC, the modified Morley element and the
discrete Kirchhoff triangle. The three methods share the bending form
and differ in the reduction operator, which each writes as a symbolic
interpolate inside the form. Compare the convergence rates of the
three methods in a table and draw the deflection as a surface plot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Draw the reduction operator as an arrow from the rotation space to the
Nedelec space, and draw two dots at each P1-iso-P2 node for the two
components of the rotation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Define the glyphs once per diagram so that every degree of freedom of
the same type has the same size in all three diagrams. Draw the vertex
values of the rotated Bernardi-Raugel element as double dots, and link
each element to its DefElement page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The commuting property of the scalar and Nédélec interpolants is only
used to justify the MITC reduced constraint, so state it there.  The list
of methods now follows the sentence that introduces it, the discrete
Kirchhoff method is described as a plate under in-plane tension, and the
Reissner-Mindlin energy ends with a comma before its "where" clause.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E4waqaawTixm9QfuVW76Hg
Compare the Morley and modified Morley methods at epsilon = 1e-4. The
Morley error does not decrease under refinement, while the modified
Morley method converges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pbrubeck
pbrubeck force-pushed the pbrubeck/plate-bending-demo branch from 0b74432 to d24996c Compare November 19, 2026 19:58
@pbrubeck pbrubeck changed the title Demos for symbolic interpolation inside a variational form Plate bending demo with symbolic reduction operators Nov 19, 2026
pbrubeck and others added 4 commits November 19, 2026 20:15
Introduce the test rotation of the bending form, explain the t^{-2}
scaling of the shear term, write delta for the perturbation parameter
so it does not clash with the strain, define V_h and W_h before they are
used, and call grad(beta) the rotation gradient rather than the
curvature. Correct the claim about the Morley form at D = 0 and the
reason for weak boundary conditions. Accent Nédélec in the diagram and
update the discrete Kirchhoff errors to what the demo prints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiE9EbBapfyhts8ndUSq73
pdf2svg is not installed on the docs CI runner; pdftocairo ships with
poppler-utils, which texlive-full already pulls in. Stop tracking the
generated SVGs, since CI rebuilds them and differing copies would dirty the
tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiE9EbBapfyhts8ndUSq73
The Morley degrees of freedom on the boundary are the vertex values and
the mean normal derivatives on the edges, which the clamped data
determines. Drop Morley from the strong BC guard and replace the Nitsche
terms in the plate bending demo with a DirichletBC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiE9EbBapfyhts8ndUSq73
Reuse the Morley solver in the membrane limit and refresh the tutorial
figure. Conjugate the Kirchhoff test function and evaluate scalar
Dirichlet data against the dual basis when required. Check the linear
Morley trace and normal derivative moments in the boundary regression.

Honor UFL pullback overrides when plotting and stop diagram conversion
when LaTeX fails.

Assisted-by: OpenAI Codex
pbrubeck and others added 10 commits November 28, 2026 02:49
Keep the plate-bending tutorial, its figures, and its registration in the demo tests. Use a restricted Morley space for the clamped boundary and interpolate the Kirchhoff solution to cubic Lagrange for plotting.
Define the applied tension and scaled deflection, introduce the test rotation and clamped Morley space, and vary the thickness in the membrane-limit study.

Assisted-by: OpenAI Codex
Introduce the three reduction operators up front, describe every element
space by its role and degrees of freedom, and explain why each reduction
is needed. The code is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Build the SVG diagrams of the demos in make copy_demos with pdflatex and
pdftocairo, instead of committing the generated files. Install
poppler-utils in the docs job for pdftocairo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop Morley from the strong BC guard again and replace the restricted
Morley space in the plate bending demo with a DirichletBC.

The merge fb56d42 reverted these branch changes, which this commit
restores from a clean merge of the same parents:
- the evaluation of scalar Dirichlet data against the dual basis in
  DirichletBC, and test_morley_constant_bc;
- the docs/Makefile rule that compiles the TikZ diagrams, and the
  .gitignore entry for the generated SVGs. This replaces the loop that
  178d18f added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Compile the TikZ diagrams in copy_demos into build/diagrams and write
the SVGs straight to source/demos, so that no generated file lands in
demos/ and no .gitignore entry is needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The merge fb56d42 reverted these branch changes, which this commit
restores from a clean merge of the same parents:
- FunctionPlotter interpolates functions in mapped elements into broken
  Lagrange before it samples them, with its two tests;
- test_discrete_kirchhoff.py;
- the column-pairs table style.

With the plotting fix, the demo plots the reduced Hermite solution
directly, without the interpolation into DG3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test_helmholtz_zany.py is where solve() with zany elements is tested.
Give the module a general docstring and move the description of the
Helmholtz problem to helmholtz(), with the solution that the code uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In test_morley_constant_bc, assign the boundary condition and the test
function separately, explain each check, and check the rank-local
normal derivative moments with parallel_assert.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The file now tests the convergence of the discrete Kirchhoff triangle as
well as of the Helmholtz problem.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

base:main Run this PR using a main (dev) build documentation LLM used An LLM was used in the production of this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants