-
Notifications
You must be signed in to change notification settings - Fork 201
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
Cleanup how fields_to_plot = none is handled #3219
Cleanup how fields_to_plot = none is handled #3219
Conversation
7ae0758
to
cc14c52
Compare
@@ -540,12 +540,8 @@ FullDiagnostics::InitializeBufferData (int i_buffer, int lev ) { | |||
if (use_warpxba == false) dmap = amrex::DistributionMapping{ba}; | |||
// Allocate output MultiFab for diagnostics. The data will be stored at cell-centers. | |||
int ngrow = (m_format == "sensei" || m_format == "ascent") ? 1 : 0; | |||
// The zero is hard-coded since the number of output buffers = 1 for FullDiagnostics |
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.
Note for reviewer - this comment was left over from previous changes and is no longer meaningful so was delete here for clean up.
Feel free to bump AMReX to the latest version in the current PR via this script: |
Via ``` ./Tools/Release/updateAMReX.py ```
ae7a95d
to
864d441
Compare
I went ahead and pushed the AMReX update :) |
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.
LGTM, thank you :)
Thanks @ax3l! |
* For fields_to_plot=none, do allocation with ncomp=0 * Update AMReX Via ``` ./Tools/Release/updateAMReX.py ``` Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
There has been a change in AMReX that allows MultiFabs to be created with ncomp = 0. (AMReX PR #2873) This allows the handling the
fields_to_plot = none
to be cleaned up, removing theif
checks around the allocation and call toWriteToFile
.This also fixes another issue that arose in PR #2419, that the plot files were not readable by Yt (because the Header file was not written out). With this PR, that is also fixed.
Once the version of AMReX that WarpX depends on is updated, I remove the WIP and this can be merged.