aboutsummaryrefslogtreecommitdiff
path: root/Source/Utils/WarpXUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Utils/WarpXUtil.cpp')
-rw-r--r--Source/Utils/WarpXUtil.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/Source/Utils/WarpXUtil.cpp b/Source/Utils/WarpXUtil.cpp
index 4ea0f14c0..70aec4253 100644
--- a/Source/Utils/WarpXUtil.cpp
+++ b/Source/Utils/WarpXUtil.cpp
@@ -568,6 +568,38 @@ void ReadBCParams ()
}
}
}
+ // temporarily check : If silver mueller is selected for one boundary, it should be
+ // selected at all valid boundaries.
+ for (int idim = 0; idim < AMREX_SPACEDIM; ++idim) {
+ if (WarpX::field_boundary_lo[idim] == FieldBoundaryType::Absorbing_SilverMueller ||
+ WarpX::field_boundary_hi[idim] == FieldBoundaryType::Absorbing_SilverMueller){
+#if (AMREX_SPACEDIM == 3)
+ AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
+ (WarpX::field_boundary_lo[0] == FieldBoundaryType::Absorbing_SilverMueller)&&
+ (WarpX::field_boundary_hi[0] == FieldBoundaryType::Absorbing_SilverMueller)&&
+ (WarpX::field_boundary_lo[1] == FieldBoundaryType::Absorbing_SilverMueller)&&
+ (WarpX::field_boundary_hi[1] == FieldBoundaryType::Absorbing_SilverMueller)&&
+ (WarpX::field_boundary_lo[2] == FieldBoundaryType::Absorbing_SilverMueller)&&
+ (WarpX::field_boundary_hi[2] == FieldBoundaryType::Absorbing_SilverMueller)
+ , " The current implementation requires silver-mueller boundary condition to be applied at all boundaries!");
+#else
+#ifndef WARPX_DIM_RZ
+ AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
+ (WarpX::field_boundary_lo[0] == FieldBoundaryType::Absorbing_SilverMueller)&&
+ (WarpX::field_boundary_hi[0] == FieldBoundaryType::Absorbing_SilverMueller)&&
+ (WarpX::field_boundary_lo[1] == FieldBoundaryType::Absorbing_SilverMueller)&&
+ (WarpX::field_boundary_hi[1] == FieldBoundaryType::Absorbing_SilverMueller)
+ , " The current implementation requires silver-mueller boundary condition to be applied at all boundaries!");
+#else
+ AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
+ (WarpX::field_boundary_hi[0] == FieldBoundaryType::Absorbing_SilverMueller)&&
+ (WarpX::field_boundary_lo[1] == FieldBoundaryType::Absorbing_SilverMueller)&&
+ (WarpX::field_boundary_hi[1] == FieldBoundaryType::Absorbing_SilverMueller)
+ , " The current implementation requires silver-mueller boundary condition to be applied at all boundaries!");
+#endif
+#endif
+ }
+ }
#ifdef WARPX_DIM_RZ
// Ensure code aborts if PEC is specified at r=0 for RZ
AMREX_ALWAYS_ASSERT_WITH_MESSAGE( WarpX::field_boundary_lo[0] == FieldBoundaryType::None,