amrex icon indicating copy to clipboard operation
amrex copied to clipboard

Temporary Runtime Components in Particle Container

Open ax3l opened this issue 2 years ago • 2 comments

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/RemoveIntComp to 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

ax3l avatar Oct 16 '23 18:10 ax3l

@atmyers let's revisit this soon?

ax3l avatar Jan 24 '25 21:01 ax3l

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.

atmyers avatar Jun 11 '25 18:06 atmyers