unstructured grid 1d - #146
Merged
Merged
Conversation
…s. Trying to set it in stone.
… about calling copy.
Yurlungur
requested review from
BrendanKKrueger,
adamdempsey90,
buechlerm,
chadmeyer,
dholladay00 and
mauneyc-LANL
August 1, 2026 20:26
Yurlungur
commented
Aug 1, 2026
| } | ||
| inline void setRange(int i, Grid_t g) { | ||
| PORTABLE_REQUIRE(0 <= i && i < rank_, "Grid must be in index range"); | ||
| grids_[i].finalize(); // TODO(JMM): Do we want this? |
Collaborator
Author
There was a problem hiding this comment.
I decided we do not.
| PORTABLE_REQUIRE(0 <= i && i < rank_, "Grid must be in index range"); | ||
| grids_[i].finalize(); // TODO(JMM): Do we want this? | ||
| setIndexType(i, IndexType::Interpolated); | ||
| // TODO(JMM): Should this be a move? |
Comment on lines
-404
to
-405
| // TODO(JMM): This could be replaced by a per-grid warning as we | ||
| // do for databox data if we want. |
Comment on lines
-790
to
-792
| /* A mocked up UniformGrid1D that owns an array of data. | ||
| * TODO(JMM): Remove/replace/update this once we have a NonuniformGrid1D. | ||
| */ |
Co-authored-by: Adam M. Dempsey <adamdemps@gmail.com>
Yurlungur
commented
Aug 3, 2026
Comment on lines
+442
to
448
| // JMM: We may wish to manually manage memory-owning grid objects | ||
| // to minimize the memory footprint. | ||
| if (include_grids) { | ||
| for (int i = 0; i < rank_; ++i) { | ||
| a.grids_[i] = grids_[i].getOnDevice(); | ||
| } | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
This is new in my latest push. I added this functionality anticipating using it to be memory efficient for getOnDevice for SpinerEOS objects.
Collaborator
Author
|
@adamdempsey90 please re-review. I think I've addressed all your comments. |
mauneyc-LANL
approved these changes
Aug 4, 2026
adamdempsey90
approved these changes
Aug 4, 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
In this MR I add grid a grid object to Spiner that supports non-uniformly spaced points per axis in a Cartesian product fashion. This is another step on the path to interpolating directly on, e.g., SESAME grids. For this version, I use a binary search to search the interpolation points. I have an acceleration strategy in mind, which I will pursue in a subsequent MR.
A few things to note:
PR Checklist
plan_historiesfolder, with a filename the same as the MR number.If preparing for a new release, in addition please check the following: