Add .load() call on UxGrid.uxgrid.face_node_connectivity - #2816
Merged
wyatt-fluidnumerics merged 4 commits intoAug 14, 2026
Conversation
erikvansebille
requested changes
Aug 13, 2026
erikvansebille
left a comment
Member
There was a problem hiding this comment.
Wow, this is a great and simple performance boost; well done on finding this @wyatt-fluidnumerics!
It's conceptually similar to the performance gain of loading the lon and lat arrays in xgrid
https://github.com/Parcels-code/Parcels/blame/c9ccd66d0e7eca4d3938512f6e5ef04eba39d6b0/src/parcels/_core/xgrid.py#L159-L161
Perhaps here also add some safeguards that the .load is only called if the array is a dask collection?
But these kinds of low-hanging fruit performance boosts are exactly what we should be looking for now; great job!
Contributor
Author
|
Great! Just added the dask collection check. |
wyatt-fluidnumerics
enabled auto-merge (squash)
August 14, 2026 13:10
wyatt-fluidnumerics
deleted the
optimize-particle-in-cell-checks-for-UxGrids
branch
August 14, 2026 13:17
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.
Description
See #2815 for major details, this PR serves to decrease the number of
dask.computecalls during particle-in-cell checks and during interpolation for unstructured grids by backing theuxgrid.face_node_connectivityarray with numpy rather than leaving it lazy as a dask array.Checklist
mainfor normal development,v3-supportfor v3 support)