Skip to content

Demos for symbolic interpolation inside a variational form - #5401

Open
pbrubeck wants to merge 5 commits into
pbrubeck/form-interp-tsfcfrom
pbrubeck/plate-bending-demo
Open

Demos for symbolic interpolation inside a variational form#5401
pbrubeck wants to merge 5 commits into
pbrubeck/form-interp-tsfcfrom
pbrubeck/plate-bending-demo

Conversation

@pbrubeck

@pbrubeck pbrubeck commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Description

Two demos that write a reduction operator as a symbolic interpolate of an
argument, directly inside a variational form. Both are new files; no existing
demo changes behaviour.

Stacked on #5258, which is what makes a same-mesh Interpolate compile into
the surrounding integral instead of assembling a separate operator. Neither
demo runs without it, so this PR targets that branch rather than main.

demos/plate_bending_mitc

A Reissner-Mindlin plate discretised with Mixed Interpolation of Tensorial
Components. The rotations are projected into an edge-conforming Nedelec space
inside the shear term, which is what stops the element locking as the plate
gets thin.

demos/modified_morley

The fourth-order singular perturbation problem eps^2 Lap^2 u - Lap u = f with
the modified Morley element of Wang, Xu and Hu (J. Comput. Math. 24 (2006),
113-120). Morley is kept for the biharmonic term and the Laplacian term is
replaced by its linear conforming interpolant, so the method stays uniform as
eps vanishes.

This one exercises a case the MITC demo does not: the interpolated argument
sits under a gradient, so the form compiler has to differentiate the fused
interpolant in place. Morley is also physically mapped, so the interpolation
goes through the zany basis transformation. The demo closes by checking the
degenerate limit -- as eps -> 0 the reduced solution becomes the P1 solution
of the Poisson problem the equation approaches, and the difference falls
quadratically:

eps 1e-1 1e-2 1e-3 1e-4
difference (n=8) 1.57e-02 3.08e-04 3.12e-06 3.12e-08

Boundary conditions are imposed weakly, because firedrake/bcs.py raises
NotImplementedError for strong conditions on Morley and the other zany
elements.

Demo asset names

The docs Makefile copies every demo's assets into one flat directory, so two
demos cannot both ship an elements.svg: cp refuses to overwrite and the
build stops before Sphinx runs. Each diagram is now named for its demo,
mitc_elements.svg and morley_elements.svg.

Checks

make html builds clean, make srclint passes, and both demos pass
tests/firedrake/demos/test_demos_run.py.

Solve a Reissner-Mindlin plate with the Mixed Interpolation of Tensorial
Components formulation, which avoids shear locking in the thin-plate limit by
projecting the rotations into an edge-conforming Nedelec space. The reduction
operator is written as a symbolic interpolate inside the variational form.
@pbrubeck pbrubeck added the LLM used An LLM was used in the production of this PR label Aug 27, 2026
Solve the fourth order problem of Wang, Xu and Hu (2006) with the modified
Morley element, which keeps Morley for the biharmonic term and replaces the
Laplacian term by its linear conforming interpolant so that the method stays
uniform as the perturbation parameter vanishes.

The reduction operator is a symbolic interpolate of an argument sitting under a
gradient inside the form, so it exercises a case the MITC demo does not: the
form compiler has to differentiate the fused interpolant in place. The demo
checks the degenerate limit, where the reduced solution is the linear
conforming solution of the Poisson problem the equation approaches.

Boundary conditions are imposed weakly because Firedrake has no strong
boundary conditions on the Morley element.
The reduction operator is easier to read as a picture: Morley carries vertex
values and averaged edge normal derivatives, P1 carries the vertex values
alone, and the operator keeps the ones they share.
The docs Makefile copies every demo's assets into one flat directory, so two
demos cannot both ship an elements.svg: the copy refuses to overwrite and the
build stops before Sphinx runs.
@pbrubeck pbrubeck changed the title Plate bending demo using MITC Demos for symbolic interpolation inside a variational form Aug 27, 2026
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.
@UZerbinati UZerbinati self-assigned this Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants