Closed WeiqunZhang closed 3 months ago
1) duplicatly is misspelled 2) I'm worried about people assuming this works correctly with periodicity even though the code has a comment that it doesn't account for that
Yes, there could be potential confusion even though logically speaking it should not because without being provided the periodicity information amrex cannot know how to handle it. So the caller has to assume periodicity is not part of the consideration. This is a feature request from WarpX, which does not need the periodic boundaries to be handled in this function. I didn't try to add periodicity support because it's actually quite awkward to implement. We would need to memcpy a vector of periodically shifted Boxes to device in order to do all these in one kernel. Maybe we can wait till someone wants the feature.
Summary
Add two new functions to MultiFab that return the sum of the given region.
Additional background
3869
Checklist
The proposed changes: