Add option to allow/disallow extrapolation in PointCollisionData. - #4453
Merged
Conversation
jhale
approved these changes
Aug 28, 2026
jhale
reviewed
Aug 30, 2026
garth-wells
reviewed
Aug 30, 2026
garth-wells
left a comment
Member
There was a problem hiding this comment.
It would be good to run an LLM over the docstrings for the affected functions. They can be made easier to read.
Remove reallocation in hotloop. Rename extrapolate to find_closest_cell withing determine point ownership (name kept in create_interpolation data).
…t I forgot to stage)
Member
Author
|
Further fixes made by Claude and me:
|
garth-wells
approved these changes
Sep 3, 2026
shimwell
added a commit
to shimwell/dolfinx
that referenced
this pull request
Sep 3, 2026
Picks up FEniCS#4475, which drops the cython<3.3 pin, and FEniCS#4453. Co-authored-by: jon-proximafusion <174589458+jon-proximafusion@users.noreply.github.com>
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.
Addresses #4450.
Makes it optional to perform extrapolation within cell bounding box for closest point detection (and in turn non-matching interpolation).
Default behavior of allowing extrapolation is kept to avoid breaking user code.
C++ changes have been co-authored with Claude. Test is based on code from @MathPhy42. I have reviewed the contribution.
Other fixes
determine_point_ownershipthere were arrays containing local coordinate_dofs geometry data being made in hot (and very hot) loops. Resolved by pre-allocating a buffer and adding scratch memory tocompute_first_colliding_cell.