-
Notifications
You must be signed in to change notification settings - Fork 15
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
Mesh refinement: Adding IO #526
Mesh refinement: Adding IO #526
Conversation
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.
Looks good, thanks! See a few comments below.
Awesome! :) Let me cross-link the WarpX implementation and definitions we drafted for the openPMD standard:
Note that the WarpX implementation currently still over-allocates file size for the refined level for HDF5 (we use this with ADIOS2 at the moment). A follow-up PR tuning HDF5 further would only declare a smaller box per patch on the refined level to work-around this, as noted in both links :) |
This PR adds a first working version of IO of the refined level.
In the
OpenPMDWriter
class, the series is now a vector over levels. Each level has its own series and writes to its own sub-folder in the IO path. If only the 0th level is used, no sub-folders will be generated.Then, the IO is now a loop over levels. Additionally, the copying of the slice to the diagnostics is now a loop over levels.
The resizing of the diagnostic arrays is a loop over levels. To not yet touch the other functions, it is done with local variables.
To avoid complications with the Poisson solver (the staging area needs to exist per level), the Poisson solver is not even allocated for other levels than lev = 0. This is handled in #527.
Additionally, the boxarray for the first level is not set correctly.
In the current version, the code crashes if used with a beam in the binning. No beam can be used with MR at this point.
const
isconst
)