You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reduce memory usage by dropping _subgrid_*_indices #1882
Currently, all indexing operations (including isel, sel, and subset operations) permanently store _subgrid_node_indices and _subgrid_face_indices on the resulting grid. If face_edge_connectivity has been populated in the grid, _subgrid_edge_indices get stored as well. Each of these is a 1D integer array (int64 on most machines) with the same size as the result's corresponding dimension size (n_node, n_face, n_edge), so the storage costs aren't necessarily trivial.
One option to solve this issue could be to drop these arrays from Grid._ds at the end of each indexing operation, so that they don't remain on the grid after the indexing has already been completed. Another option would be to refactor to internally pass these indices between functions, without ever attaching them to the grid in the first place. I would guess that the latter option might be slightly preferable.
On pause till the work in #1667 is completed to avoid conflicts and overlaps when dealing with data on the grid. I will report back here when it's done!
Activity
dylannelson commentedon Nov 9, 2026
On pause till the work in #1667 is completed to avoid conflicts and overlaps when dealing with data on the grid. I will report back here when it's done!