aboutsummaryrefslogtreecommitdiff
path: root/Source/Utils/WarpXMovingWindow.cpp
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2019-10-31 18:25:55 -0700
committerGravatar MaxThevenet <mthevenet@lbl.gov> 2019-10-31 18:25:55 -0700
commit82c791de01622ff1556203902c0782e396719629 (patch)
tree14dca7475240faf08277dfb43c9db403c099635a /Source/Utils/WarpXMovingWindow.cpp
parent846e66f7c729e72cfcb933b2bce75870ea282e1f (diff)
downloadWarpX-82c791de01622ff1556203902c0782e396719629.tar.gz
WarpX-82c791de01622ff1556203902c0782e396719629.tar.zst
WarpX-82c791de01622ff1556203902c0782e396719629.zip
cleaning and use better naming
Diffstat (limited to 'Source/Utils/WarpXMovingWindow.cpp')
-rw-r--r--Source/Utils/WarpXMovingWindow.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Utils/WarpXMovingWindow.cpp b/Source/Utils/WarpXMovingWindow.cpp
index d59d0d8b0..e3819966d 100644
--- a/Source/Utils/WarpXMovingWindow.cpp
+++ b/Source/Utils/WarpXMovingWindow.cpp
@@ -223,11 +223,13 @@ WarpX::shiftMF (MultiFab& mf, const Geometry& geom, int num_shift, int dir,
// Not sure why this is needed, but it is...
IntVect ng_mw = IntVect::TheUnitVector();
+ // Enough guard cells in the MW direction
ng_mw[dir] = num_shift;
+ // Add the extra cell (if momentum-conserving gather with staggered field solve)
ng_mw += ng_extra;
+ // Make sure we don't exceed number of guard cells allocated
ng_mw = ng_mw.min(ng);
- Print()<<"ng_mw "<<ng_mw<<'\n';
-
+ // Fill guard cells.
tmpmf.FillBoundary(0, tmpmf.nComp(), ng_mw, geom.periodicity());
// Make a box that covers the region that the window moved into