Repository navigation
Conversation
pbrubeck
commented
Jul 16, 2026
pbrubeck
commented
Jul 16, 2026
pbrubeck
commented
Jul 16, 2026
pbrubeck
commented
Jul 16, 2026
pbrubeck
marked this pull request as draft
July 16, 2026 11:18
Contributor
Author
|
This PR should reimplement |
pbrubeck
commented
Jul 16, 2026
pbrubeck
commented
Jul 16, 2026
pbrubeck
commented
Jul 16, 2026
pbrubeck
commented
Jul 16, 2026
pbrubeck
commented
Jul 16, 2026
pbrubeck
commented
Jul 16, 2026
pbrubeck
commented
Jul 16, 2026
pbrubeck
commented
Jul 16, 2026
pbrubeck
commented
Jul 16, 2026
pbrubeck
commented
Jul 16, 2026
pbrubeck
commented
Jul 16, 2026
pbrubeck
commented
Jul 17, 2026
pbrubeck
commented
Jul 17, 2026
pbrubeck
force-pushed
the
pbrubeck/form-interp-tsfc
branch
from
July 17, 2026 14:42
a844911 to
f7f5ee3
Compare
pbrubeck
commented
Jul 17, 2026
pbrubeck
commented
Jul 17, 2026
pbrubeck
commented
Jul 17, 2026
pbrubeck
commented
Jul 22, 2026
pbrubeck
commented
Jul 22, 2026
pbrubeck
commented
Aug 10, 2026
This was referenced Aug 19, 2026
pbrubeck
commented
Aug 24, 2026
pbrubeck
force-pushed
the
pbrubeck/form-interp-tsfc
branch
from
August 26, 2026 17:13
f6d360f to
3537776
Compare
Move get_runtime_tabulation_coordinates next to the other VertexOnlyMesh map helpers in interpolation.py, so that assemble.py does not add code inside _GlobalKernelBuilder or to imports that pyop3 rewrites. Keep unchanged the lines that pyop3 edits nearby: the firedrake.mesh import in interpolation.py, the cell-size assignment in set_cell_sizes, and the tsfc imports in mg/kernels.py. Move the new interpolation tests away from the test that pyop3 skips. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The type pyop2.types.access.Access has no documentation that Sphinx can link to. Name the access descriptor in the parameter description, so that the docs need no extra nitpick exception. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Kernel calls with MIN_WRITE or MAX_WRITE access now pack a temporary that starts from the identity of the reduction, and unpack it with a "min" or "max" assignment. Assignments of type "min" and "max" now get their intents from assignment_type_as_intent, so they can be put in a loop. Fixes #5524 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the feature from PyOP2 to pyop3. The conflict resolutions come from pbrubeck/pyop3/form-interp-tsfc-port (927acc0), which ports the feature onto the pyop3 branch at eb98a70. The changes on main since eb98a70 are applied on top of that port. The result differs from the port only by those changes, with two exceptions: * firedrake/__init__.py exports both CommMismatchError from main and MismatchingFunctionSpaceError from the feature. * firedrake/interpolation.py does not take the change on main from float(f) to f.dat.global_data.item() in SameMeshInterpolator. The port assembles the interpolation through get_form_assembler, which returns zero-form results from ZeroFormAssembler. Therefore, the code that main changed no longer exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TSFC kernels add their result to the output argument. A MIN_WRITE or MAX_WRITE temporary that starts from the identity of the reduction therefore stays at the identity. op3.Function now takes requires_zeroed_output_arguments, like the PyOP2 Kernel did. When it is set, these temporaries start from zero. as_pyop3_local_kernel sets it for TSFC kernels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stack the feature on #5543, which supports MIN and MAX reductions in pyop3. firedrake/interpolation.py keeps the feature's version. #5543 changes SameMeshInterpolator._get_tensor to accept MIN_RW and MAX_RW. The feature removes _get_tensor, and its Interpolator.__init__ already converts MIN_RW and MAX_RW to MIN_WRITE and MAX_WRITE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TwoFormAssembler._apply_bc required the row and column axes of the matrix to have the same field label for the index of the boundary condition. A rectangular form, such as an interpolation from a mixed space into a single space, does not satisfy this, and test_mixed_space_bcs failed. The label now comes from the field axis of the space of the boundary condition. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pbrubeck
removed this pull request from stack #5493
October 22, 2026 13:57
pbrubeck
added this pull request to stack #5550
October 22, 2026 13:57
pbrubeck
commented
Oct 23, 2026
pbrubeck
commented
Oct 23, 2026
pbrubeck
commented
Oct 23, 2026
# Conflicts: # firedrake/interpolation.py
pbrubeck
commented
Oct 23, 2026
pbrubeck
commented
Oct 23, 2026
Co-authored-by: Pablo Brubeck <brubeck@protonmail.com>
This branch has not been deployed
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.
Summary
TSFC now compiles same-mesh
ufl.Interpolatenodes in normal Form kernels, and this PR ports the feature from PyOP2 to pyop3.InterpolateandForm(Interpolate)share one code generation path.MixedFunctionSpacesupportsmat_type="aij"natively.VertexOnlyMeshuses the same TSFC code generation.BaseFormAssembler.SameMeshInterpolatorno longer builds its ownop3.loops. It sends the interpolation through the form assembler:MINandMAXare reduced into the output asMIN_WRITEandMAX_WRITE. TSFC kernels add their result to the output argument, so pyop3 starts these temporaries from zero (see #5543).TwoFormAssembler._apply_bcnow takes the field label of a BC from the BC's own space. Before, a rectangular form such as an interpolation fromW = V * VintoVfailed.Stacked on #5543, which adds MIN/MAX reductions to pyop3 kernel calls.
Depends on firedrakeproject/fiat#294.
Fixes #5468
Evidence
mainwithout the fixes): 7 failures intests/firedrake/regression/test_interpolate.pyMerge Danger
Door: two-way
Blast Radius: interpolation
All same-mesh interpolation, and the Form kernels that contain it, now go through TSFC and the form assembler.
op3.Functiongets a new attribute, so kernel caches from before this change must be cleared withfiredrake-clean.The CI commits marked
DROP BEFORE MERGEinstall the FIAT branch and must be dropped before merging.Contribution assisted by Claude Code (Claude Opus 5.5).
🤖 Generated with Claude Code