aboutsummaryrefslogtreecommitdiff
path: root/Source/Utils/WarpXMovingWindow.cpp
diff options
context:
space:
mode:
authorGravatar Adam Bensoubaya <60104233+bensoub@users.noreply.github.com> 2023-05-12 11:04:33 -0700
committerGravatar GitHub <noreply@github.com> 2023-05-12 11:04:33 -0700
commit77a2b516950bad4344f301d1b7b9672cdbd7e384 (patch)
tree27ecbfabd93a2a7c18b7c38469a1c068cc3d6f13 /Source/Utils/WarpXMovingWindow.cpp
parent625d5b44cb1d8b9c4d22c2a5838a4906a41aebce (diff)
downloadWarpX-77a2b516950bad4344f301d1b7b9672cdbd7e384.tar.gz
WarpX-77a2b516950bad4344f301d1b7b9672cdbd7e384.tar.zst
WarpX-77a2b516950bad4344f301d1b7b9672cdbd7e384.zip
Moving window: check pointers to F,G when applying shift (#3897)
* Moving window: check pointers to F,G when applying shift * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Apply suggestions from code review --------- Co-authored-by: Bensoubaya <adam@bc-d0-74-0-dd-e4.dhcp.lbnl.us> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
Diffstat (limited to 'Source/Utils/WarpXMovingWindow.cpp')
-rw-r--r--Source/Utils/WarpXMovingWindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Utils/WarpXMovingWindow.cpp b/Source/Utils/WarpXMovingWindow.cpp
index af1f58f8e..90d7190fe 100644
--- a/Source/Utils/WarpXMovingWindow.cpp
+++ b/Source/Utils/WarpXMovingWindow.cpp
@@ -235,7 +235,7 @@ WarpX::MoveWindow (const int step, bool move_j)
// Shift scalar field F with div(E) cleaning in valid domain
// TODO: shift F from pml_rz for RZ geometry with PSATD, once implemented
- if (do_dive_cleaning)
+ if (F_fp[lev])
{
// Fine grid
shiftMF(*F_fp[lev], geom[lev], num_shift, dir, lev, do_update_cost);
@@ -268,7 +268,7 @@ WarpX::MoveWindow (const int step, bool move_j)
// Shift scalar field G with div(B) cleaning in valid domain
// TODO: shift G from pml_rz for RZ geometry with PSATD, once implemented
- if (do_divb_cleaning)
+ if (G_fp[lev])
{
// Fine grid
shiftMF(*G_fp[lev], geom[lev], num_shift, dir, lev, do_update_cost);