diff options
author | 2019-07-31 14:27:05 -0700 | |
---|---|---|
committer | 2019-07-31 14:27:05 -0700 | |
commit | f9e33c95fa920d7c398b6a1d16fff86ad5d4685e (patch) | |
tree | de65cf59155f03a5b4e8a0aefba021570fced430 /Source/WarpX.cpp | |
parent | 8524e89176676ffe0bbb5b3405394fde97daa43d (diff) | |
download | WarpX-f9e33c95fa920d7c398b6a1d16fff86ad5d4685e.tar.gz WarpX-f9e33c95fa920d7c398b6a1d16fff86ad5d4685e.tar.zst WarpX-f9e33c95fa920d7c398b6a1d16fff86ad5d4685e.zip |
Properly allocate the charge deposition buffers
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r-- | Source/WarpX.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index f36d10aa8..7f327efbc 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -922,7 +922,7 @@ WarpX::AllocLevelMFs (int lev, const BoxArray& ba, const DistributionMapping& dm current_buf[lev][0].reset( new MultiFab(amrex::convert(cba,jx_nodal_flag),dm,1,ngJ)); current_buf[lev][1].reset( new MultiFab(amrex::convert(cba,jy_nodal_flag),dm,1,ngJ)); current_buf[lev][2].reset( new MultiFab(amrex::convert(cba,jz_nodal_flag),dm,1,ngJ)); - if (do_dive_cleaning || plot_rho) { + if (rho_cp[lev]) { charge_buf[lev].reset( new MultiFab(amrex::convert(cba,IntVect::TheUnitVector()),dm,2,ngRho)); } current_buffer_masks[lev].reset( new iMultiFab(ba, dm, 1, 1) ); |