diff options
author | 2023-06-27 14:17:11 +0200 | |
---|---|---|
committer | 2023-06-27 12:17:11 +0000 | |
commit | d1277b05620bf5f43e0d6bc7b8988be00c755559 (patch) | |
tree | ebdbc1530e36350cdd406fbe625e63e0ac4b5f8d /Source/WarpX.cpp | |
parent | 9665008751b9cd7b97fc0e8005c95bc859a50bec (diff) | |
download | WarpX-d1277b05620bf5f43e0d6bc7b8988be00c755559.tar.gz WarpX-d1277b05620bf5f43e0d6bc7b8988be00c755559.tar.zst WarpX-d1277b05620bf5f43e0d6bc7b8988be00c755559.zip |
Clang-tidy CI test: add bugprone-branch-clone check (#4030)
* add bugprone-branch-clone to clang-tidy CI test
* Updating Inline Comments
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r-- | Source/WarpX.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 630b99f98..a44d01915 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -672,17 +672,21 @@ WarpX::ReadParameters () pp_warpx, "end_moving_window_step", end_moving_window_step); std::string s; pp_warpx.get("moving_window_dir", s); - if (s == "x" || s == "X") { - moving_window_dir = 0; + + if (s == "z" || s == "Z") { + moving_window_dir = WARPX_ZINDEX; } #if defined(WARPX_DIM_3D) else if (s == "y" || s == "Y") { moving_window_dir = 1; } #endif - else if (s == "z" || s == "Z") { - moving_window_dir = WARPX_ZINDEX; +#if defined(WARPX_DIM_XZ) || defined(WARPX_DIM_3D) + else if (s == "x" || s == "X") { + moving_window_dir = 0; } +#endif + else { WARPX_ABORT_WITH_MESSAGE("Unknown moving_window_dir: "+s); } |