aboutsummaryrefslogtreecommitdiff
path: root/Source/Parallelization/WarpXComm.cpp
diff options
context:
space:
mode:
authorGravatar Edoardo Zoni <59625522+EZoni@users.noreply.github.com> 2021-02-12 08:14:14 -0800
committerGravatar GitHub <noreply@github.com> 2021-02-12 08:14:14 -0800
commit887cc521a567c042554b1c6dc94131f0e87863f9 (patch)
tree0daa9fafdda3cd696f23ff980ecfbee62b48f395 /Source/Parallelization/WarpXComm.cpp
parenta2e1ef40dd671da570a1687903f889c91ef12d5b (diff)
downloadWarpX-887cc521a567c042554b1c6dc94131f0e87863f9.tar.gz
WarpX-887cc521a567c042554b1c6dc94131f0e87863f9.tar.zst
WarpX-887cc521a567c042554b1c6dc94131f0e87863f9.zip
Fix bug in loop over boxes in WarpX::UpdateAuxilaryDataStagToNodal (#1691)
* Clarify loop over boxes in WarpX::UpdateAuxilaryDataStagToNodal * Loop over fabbox instead and pad with zeros beyond ghost cells * Clean up names of source and destination arrays
Diffstat (limited to 'Source/Parallelization/WarpXComm.cpp')
-rw-r--r--Source/Parallelization/WarpXComm.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/Parallelization/WarpXComm.cpp b/Source/Parallelization/WarpXComm.cpp
index cc7f4b7cc..b331e6c7d 100644
--- a/Source/Parallelization/WarpXComm.cpp
+++ b/Source/Parallelization/WarpXComm.cpp
@@ -71,11 +71,10 @@ WarpX::UpdateAuxilaryDataStagToNodal ()
Array4<Real const> const& ey_fp = Efield_fp[0][1]->const_array(mfi);
Array4<Real const> const& ez_fp = Efield_fp[0][2]->const_array(mfi);
- Box bx = mfi.validbox();
- // TODO It seems like it is necessary to loop over the valid box grown
- // with 2 guard cells. Should this number of guard cells be expressed
- // in terms of the parameters defined in the guardCellManager class?
- bx.grow(2);
+ // Loop over full box including ghost cells
+ // (input arrays will be padded with zeros beyond ghost cells
+ // for out-of-bound accesses due to large-stencil operations)
+ Box bx = mfi.fabbox();
if (maxwell_solver_id == MaxwellSolverAlgo::PSATD) {
#ifdef WARPX_USE_PSATD