Skip to content

Build the DirichletBC interpolation loops once - #5577

Draft
sghelichkhani wants to merge 1 commit into
mainfrom
sghelichkhani/pyop3-fix-bc-interpolation
Draft

sghelichkhani wants to merge 1 commit into
mainfrom
sghelichkhani/pyop3-fix-bc-interpolation

Conversation

@sghelichkhani

Copy link
Copy Markdown
Contributor

A DirichletBC with an expression value calls interpolator.assemble on every update, which builds new interpolation loops (and a new cache key) each time it is applied. This keeps the callable from _get_callable(tensor=...) and runs it on each update.

#5258 rewrites these lines, and together with #5566 the repeated assemble would share its loops, so this PR is only needed until those land.

Tested on a branch that combines this with the other open pyop3 fixes: the Firedrake tests for assign, BCs, cofunctions, matrix-free, constants, Real spaces, equation BCs and adjoint pass on 1 to 3 ranks (the same failures as on main), and the G-ADOPT regression suite runs with it.

DirichletBC with an expression value called interpolator.assemble on
every update, which builds new loops each time. Keep the callable from
_get_callable(tensor=...) and run it on each update instead.
@sghelichkhani
sghelichkhani force-pushed the sghelichkhani/pyop3-fix-bc-interpolation branch from 0c52dca to d305a40 Compare October 29, 2026 10:58
@pbrubeck

pbrubeck commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Interpolator is going to be reworked in #5258, I don't think this needed

@pbrubeck

pbrubeck commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Also this code will be changed immenently by #5127 (merged to release)

@pbrubeck
pbrubeck marked this pull request as draft October 29, 2026 12:04

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants