aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/FiniteDifferenceSolver/ApplySilverMuellerBoundary.cpp
diff options
context:
space:
mode:
authorGravatar Remi Lehe <remi.lehe@normalesup.org> 2023-02-21 15:56:38 -0800
committerGravatar GitHub <noreply@github.com> 2023-02-21 15:56:38 -0800
commit55076bd7ef3dd4b02bdd69b7ab28dc40159760f2 (patch)
treebebe23af494bcbfe0c2d6fa8660b7c97b5d7df8b /Source/FieldSolver/FiniteDifferenceSolver/ApplySilverMuellerBoundary.cpp
parente223ebd3bf1a63847a96f162a3dc3283f0b7c3ea (diff)
downloadWarpX-55076bd7ef3dd4b02bdd69b7ab28dc40159760f2.tar.gz
WarpX-55076bd7ef3dd4b02bdd69b7ab28dc40159760f2.tar.zst
WarpX-55076bd7ef3dd4b02bdd69b7ab28dc40159760f2.zip
Fix Silver-Mueller boundary condition in 1D (#3703)
* Fix Silver-Mueller boundary condition in 1D * Use WARPX_ZINDEX * Add automated test * Add benchmark
Diffstat (limited to '')
-rw-r--r--Source/FieldSolver/FiniteDifferenceSolver/ApplySilverMuellerBoundary.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/FieldSolver/FiniteDifferenceSolver/ApplySilverMuellerBoundary.cpp b/Source/FieldSolver/FiniteDifferenceSolver/ApplySilverMuellerBoundary.cpp
index d6ac45a98..4c6748cfb 100644
--- a/Source/FieldSolver/FiniteDifferenceSolver/ApplySilverMuellerBoundary.cpp
+++ b/Source/FieldSolver/FiniteDifferenceSolver/ApplySilverMuellerBoundary.cpp
@@ -188,12 +188,9 @@ void FiniteDifferenceSolver::ApplySilverMuellerBoundary (
#ifdef WARPX_DIM_3D
bool const apply_lo_y = (field_boundary_lo[1] == FieldBoundaryType::Absorbing_SilverMueller);
bool const apply_hi_y = (field_boundary_hi[1] == FieldBoundaryType::Absorbing_SilverMueller);
- bool const apply_lo_z = (field_boundary_lo[2] == FieldBoundaryType::Absorbing_SilverMueller);
- bool const apply_hi_z = (field_boundary_hi[2] == FieldBoundaryType::Absorbing_SilverMueller);
-#else
- bool const apply_lo_z = (field_boundary_lo[1] == FieldBoundaryType::Absorbing_SilverMueller);
- bool const apply_hi_z = (field_boundary_hi[1] == FieldBoundaryType::Absorbing_SilverMueller);
#endif
+ bool const apply_lo_z = (field_boundary_lo[WARPX_ZINDEX] == FieldBoundaryType::Absorbing_SilverMueller);
+ bool const apply_hi_z = (field_boundary_hi[WARPX_ZINDEX] == FieldBoundaryType::Absorbing_SilverMueller);
// Loop through the grids, and over the tiles within each grid
#ifdef AMREX_USE_OMP