-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ABLASTR: Coarsen Functions #3433
Conversation
0426bb3
to
8990c9a
Compare
a82dd27
to
d439916
Compare
@@ -70,19 +88,18 @@ namespace CoarsenIO{ | |||
const int jmin = idx_min[1]; | |||
const int kmin = idx_min[2]; | |||
int ii, jj, kk; | |||
Real wx, wy, wz; | |||
amrex::Real const wx = 1.0_rt / static_cast<amrex::Real>(numx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved this out as a tiny optimization. The compiler probably did this already.
@ax3l I added some comments above, which hopefully clarify the scope of the various interpolation functions that you are refactoring here, to the best of my knowledge. As a general remark, note that the two sets of interpolation routines had been named originally with the tags |
Thanks @EZoni - I think all that is left then is finding a good name, especially for the I/O stuff, which I find not very descriptive. Do you think we could describe the properties of the two classes (e.g., conservation properties and time/space average) in the name(s)? |
@ax3l We discussed with @jlvay and @WeiqunZhang and had the following ideas:
Let's discuss here more if you have any comments or concerns on these suggestions. P.S. Again, if we want the I/O one to be specialized for cell-centered output, there is the option of simplifying the formulas, by setting the corresponding output index type to zero in the code, and then calling it |
Thanks a lot - I updated the PR accordingly and it's now ready for review with the new names :) |
Copying here what I commented on Slack. Would it be possible and would it make sense to consider removing one intermediate layer? Like doing something like this:
(or similar names), which keeps the information about "coarsening" in the name but removes one layer in terms of structure? Then one would have things like What do you think? |
Thanks a ton! Discussed between Edoardo, Remi & Axel: we'll keep the current naming for now since it mirrors the directory structure. |
Move coarsen functions to ABLASTR. Rename by property of the coarsening function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @ax3l! This looks great. I just left two minor comments, see below.
Co-authored-by: Edoardo Zoni <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, ready to merge! I think I'll open an issue to keep track of the fact that it would be good to add some documentation of these interpolation methods (sampling, averaging), including a link to the slides attached in the PR description, as you suggested some time ago.
Good idea! You could copy the slide content in a new theory sub-section of the manual. |
Move coarsen functions to ABLASTR.
Needed for BLAST-ImpactX/impactx#261
Follow-up to:
Edit by @EZoni:
Here's a few slides describing the interpolation operations refactored in this PR (interpolation between grids with arbitrary index type and mesh refinement ratio, for I/O and MR): Slides-Interpolation-IO-MR.pdf. The slides date back to 2020, when the PRs listed above were opened and merged.