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.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/Utils/WarpXUtil.cpp b/Source/Utils/WarpXUtil.cpp
index 70aec4253..8faa20246 100644
--- a/Source/Utils/WarpXUtil.cpp
+++ b/Source/Utils/WarpXUtil.cpp
@@ -48,6 +48,21 @@ void ParseGeometryInput()
getArrWithParser(pp_geometry, "prob_hi", prob_hi, 0, AMREX_SPACEDIM);
AMREX_ALWAYS_ASSERT(prob_hi.size() == AMREX_SPACEDIM);
+#ifdef WARPX_DIM_RZ
+ ParmParse pp_algo("algo");
+ int maxwell_solver_id = GetAlgorithmInteger(pp_algo, "maxwell_solver");
+ if (maxwell_solver_id == MaxwellSolverAlgo::PSATD)
+ {
+ AMREX_ALWAYS_ASSERT_WITH_MESSAGE(prob_lo[0] == 0.,
+ "Lower bound of radial coordinate (prob_lo[0]) with RZ PSATD solver must be zero");
+ }
+ else
+ {
+ AMREX_ALWAYS_ASSERT_WITH_MESSAGE(prob_lo[0] >= 0.,
+ "Lower bound of radial coordinate (prob_lo[0]) with RZ FDTD solver must be non-negative");
+ }
+#endif
+
pp_geometry.addarr("prob_lo", prob_lo);
pp_geometry.addarr("prob_hi", prob_hi);
}