Skip to content

Matfree adjoint interpolation#4552

Merged
pbrubeck merged 26 commits into
mainfrom
pbrubeck/interp-adjoint
Sep 30, 2025
Merged

Matfree adjoint interpolation#4552
pbrubeck merged 26 commits into
mainfrom
pbrubeck/interp-adjoint

Conversation

@pbrubeck
Copy link
Copy Markdown
Contributor

@pbrubeck pbrubeck commented Sep 9, 2025

Description

Implements automatic code generation for the matrix-free assembly of dual interpolation (which previously was computed as a matvec with an explicit matrix).

This PR applies to the adjoint where the meshes are the same one. In #4576 this code generation is extended to interpolation from a standard mesh into a Submesh and VertexOnlyMesh.

CrossMeshInterpolator and VomOntoVomXXX are deferred as future work #4592.

@pbrubeck pbrubeck force-pushed the pbrubeck/interp-adjoint branch 4 times, most recently from ad949f7 to 515b7f9 Compare September 9, 2025 18:03
@pbrubeck pbrubeck force-pushed the pbrubeck/interp-adjoint branch 7 times, most recently from 95d17dc to 4ba0933 Compare September 11, 2025 13:18
@pbrubeck pbrubeck force-pushed the pbrubeck/interp-adjoint branch 2 times, most recently from 94c1000 to d8120e5 Compare September 11, 2025 14:59
@pbrubeck pbrubeck force-pushed the pbrubeck/interp-adjoint branch from d8120e5 to a33cfb3 Compare September 11, 2025 15:16
@pbrubeck pbrubeck force-pushed the pbrubeck/interp-adjoint branch from 5113864 to d51db25 Compare September 11, 2025 21:02
@pbrubeck pbrubeck force-pushed the pbrubeck/interp-adjoint branch from 98ca954 to afe0256 Compare September 12, 2025 00:26
@pbrubeck pbrubeck force-pushed the pbrubeck/interp-adjoint branch 4 times, most recently from 2fbbddf to 27acd62 Compare September 12, 2025 16:37
@pbrubeck pbrubeck force-pushed the pbrubeck/interp-adjoint branch from 27acd62 to 4ce9f8e Compare September 12, 2025 19:55
@pbrubeck pbrubeck force-pushed the pbrubeck/interp-adjoint branch from 5d800f9 to 120a2a3 Compare September 18, 2025 12:54
Comment thread firedrake/assemble.py
Copy link
Copy Markdown
Contributor

@connorjward connorjward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly fine I think. Need someone else to review the maths.

Comment thread firedrake/interpolation.py Outdated
Comment thread firedrake/interpolation.py Outdated
Comment thread firedrake/interpolation.py
Comment thread firedrake/interpolation.py
@pbrubeck
Copy link
Copy Markdown
Contributor Author

Looks mostly fine I think. Need someone else to review the maths.

The adjoint tests should speak for themselves.

I'm pretty sure @dham would agree with this statement.

Co-authored-by: Connor Ward <c.ward20@imperial.ac.uk>
Comment thread tests/firedrake/regression/test_adjoint_operators.py
Comment thread firedrake/interpolation.py
Comment thread firedrake/assemble.py Outdated
Comment thread firedrake/assemble.py Outdated
Comment thread firedrake/assemble.py
Comment thread firedrake/interpolation.py Outdated
Co-authored-by: David A. Ham <david.ham@imperial.ac.uk>
@pbrubeck pbrubeck enabled auto-merge (squash) September 30, 2025 15:56
connorjward
connorjward previously approved these changes Sep 30, 2025
Comment thread tests/firedrake/regression/test_interpolate.py Outdated
@pbrubeck pbrubeck disabled auto-merge September 30, 2025 18:40
@pbrubeck pbrubeck merged commit 210bae0 into main Sep 30, 2025
6 of 7 checks passed
@pbrubeck pbrubeck deleted the pbrubeck/interp-adjoint branch September 30, 2025 18:42
@pbrubeck pbrubeck mentioned this pull request Sep 30, 2025
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.

4 participants