amrex
amrex copied to clipboard
Temporary Runtime Components in Particle Container
Summary
For diagnostics purposes in WarpX, we would like to temporarily add particle runtime components to a particle container, and deallocate them timely again to avoid large memory spikes in I/O.
This adds new functions to remove runtime components.
To Do
- [ ] doc issues in existing
AddReal/IntComp: no doxygen, no mention of API contract for allocation- [ ] for an already allocated species, how does one add-and-allocate only the newly added runtime attributes?
- [ ] deallocation: what does a user need to do after
RemoveRealComp/RemoveIntCompto deallocate the memory?
Additional background
Checklist
The proposed changes:
- [ ] fix a bug or incorrect behavior in AMReX
- [x] add new capabilities to AMReX
- [ ] changes answers in the test suite to more than roundoff level
- [ ] are likely to significantly affect the results of downstream AMReX users
- [ ] include documentation in the code and/or rst files, if appropriate
@atmyers let's revisit this soon?
This doesn't currently deallocate anything, for that we need to loop over the particle tiles and remove the old component form the struct of arrays.