aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpX.cpp
diff options
context:
space:
mode:
authorGravatar Andrew Myers <atmyers2@gmail.com> 2018-09-24 13:12:32 -0700
committerGravatar Remi Lehe <remi.lehe@normalesup.org> 2018-10-04 13:32:34 -0700
commitd22f38e55e466a50c32f67f721f87d55e37e6995 (patch)
treeac6335778f47b366936723f3af95baf83a38f736 /Source/WarpX.cpp
parent8d35c76154e4de1022fa75b0b4060ce47c3fe56d (diff)
downloadWarpX-d22f38e55e466a50c32f67f721f87d55e37e6995.tar.gz
WarpX-d22f38e55e466a50c32f67f721f87d55e37e6995.tar.zst
WarpX-d22f38e55e466a50c32f67f721f87d55e37e6995.zip
only turn on the current buffers if dive cleaning is on.
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r--Source/WarpX.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp
index 009f31b73..9ca17c759 100644
--- a/Source/WarpX.cpp
+++ b/Source/WarpX.cpp
@@ -647,7 +647,9 @@ WarpX::AllocLevelData (int lev, const BoxArray& ba, const DistributionMapping& d
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));
- charge_buf[lev].reset( new MultiFab(amrex::convert(cba,IntVect::TheUnitVector()),dm,2,ngRho));
+ if (do_dive_cleaning) {
+ charge_buf[lev].reset( new MultiFab(amrex::convert(cba,IntVect::TheUnitVector()),dm,2,ngRho));
+ }
current_buffer_masks[lev].reset( new iMultiFab(ba, dm, 1, 0) );
}
}