Add parallelization to the smooth covering grid.#5341
Merged
cphyc merged 1 commit intoyt-project:mainfrom Apr 29, 2026
Merged
Conversation
Member
|
For reference, this needs to be merged after #5218 gets merged (if it ever gets merged :) ). |
matthewturk
reviewed
Apr 23, 2026
Member
matthewturk
left a comment
There was a problem hiding this comment.
I do think this is great!
| chunk.get_data(fields) | ||
| input_fields = [chunk[field] for field in fields] | ||
| tot -= fill_region( | ||
| filled_cells += fill_region( |
Member
There was a problem hiding this comment.
using this is a lot better than tot -=!
| ls.left_edge = ls.global_startindex * ls.current_dx + self.ds.domain_left_edge.d | ||
| ls.right_edge = ls.left_edge + ls.current_dims * ls.current_dx | ||
| ls.fields = [np.zeros(idims, dtype="float64") - 999 for field in fields] | ||
| ls.fields = [np.zeros(idims, dtype="float64") for field in fields] |
Member
There was a problem hiding this comment.
Good catch. I believe the setting of -999 was necessary when we didn't check the touched cell count, but that's long since changed.
f11768d to
313681c
Compare
313681c to
643ac24
Compare
cphyc
approved these changes
Apr 29, 2026
matthewturk
approved these changes
Apr 29, 2026
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.
PR Summary
I've added functionality for generating a smooth covering grid by loading the data chunks in parallel using @cphyc #5218 's piter() function. I've also replaced the parallel for loop of the regular covering grid. This PR assumes that the functionality of #5218 is merged. The functionality has been confirmed to work both on sample dataset and a complex simulation.