-
Notifications
You must be signed in to change notification settings - Fork 421
Adding support to memory collection of Particles and MultiFabs within a grid #4629
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
Merged
WeiqunZhang
merged 27 commits into
AMReX-Codes:development
from
jessdagostini:development
Sep 17, 2025
Merged
Changes from 6 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
7a29e92
Adding func to return mem capacity/usage of fabs within a box
jessdagostini 20d8658
Adding functions to return mem capacity/usage from particles within a…
jessdagostini b615a4e
Update: update CapacityOfFabs parameters based on #4629 PR discussion
jessdagostini db786f3
Moving capacityOfFabs function from MultiFab to FabArray
jessdagostini 1bbf3ca
Adding assertion on capacityOfFabs
jessdagostini 5f0f788
Fixing reference
jessdagostini a390353
Removing reference to capacityOfFabs function on MultiFabUtil
jessdagostini 7fb20d4
Change capacity function on particles to have similar signature as Fa…
jessdagostini fb94457
Update Src/Base/AMReX_FabArray.H
jessdagostini 6c0e6e2
Fixing reference to CellEqual func
jessdagostini 6b231b7
Pushing tests for memory capturing (based on amrex-tutorials)
jessdagostini bad61d0
Fixing pipeline issues
jessdagostini 8034c87
Update Src/Base/AMReX_FabArray.H
jessdagostini 2d2ddd0
Update Src/Base/AMReX_FabArray.H
jessdagostini 6cf35fa
Update Src/Base/AMReX_FabArray.H
jessdagostini 327a241
Update Src/Particle/AMReX_ParticleContainerI.H
jessdagostini 6c0d68e
Update Src/Particle/AMReX_ParticleContainerI.H
jessdagostini 58114a0
Update Src/Particle/AMReX_ParticleContainer.H
jessdagostini 84bbf37
Updating template signature for FabArray capacity func
jessdagostini 55d4a34
Updating Particles function signature and testing
jessdagostini 64e1e84
Finishing reorganization of tests
jessdagostini 2b01097
Including HeatEquation test on CMakeLists
jessdagostini c399f60
Merge branch 'development' into development
jessdagostini 63b21a5
Update Tests/CMakeLists.txt
WeiqunZhang 11dd878
Merge branch 'development' into jessdagostini/development
WeiqunZhang 30ec777
cat doxygen.out
WeiqunZhang d648a26
workaround doxygen issue
WeiqunZhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
For flexibility, we could also make the integer type a template typename here and for in particle containers. For example,
And in the implementation, we also want to do explicit static_cast before adding the values.
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.
Ok! Working on the update for this!
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.
Actually, do you think it's worth doing it? Because I know that it is a best practice in C++ to use
std::size_t
for memory-related math (size_t
was created for holdingsizeof
returns https://en.cppreference.com/w/cpp/types/size_t.html)Uh oh!
There was an error while loading. Please reload this page.
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.
Actually the best practice is proably to avoid unsigned integers in almost all cases.
Even Stroustrup does not like unsigned integers. https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1428r0.pdf Stroustrup said,
Java does not even have build-in unsigned integer types. https://www.artima.com/articles/james-gosling-on-java-may-2001 Goshling said,
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.
Hmm, got it! Interesting that the unsigned is such unknown territory. Will start working on including the template you suggested in both functions
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.
Just update both function signatures with the new template 55d4a34