From f68415ae71dedbdd0758e5afbc66f355ae30eddb Mon Sep 17 00:00:00 2001 From: Olga Shapoval <30510597+oshapoval@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:57:53 -0800 Subject: [PATCH] Added abort message if 1D PSATD is used (#5500) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added an abort message for cases where 1D PSATD is used, as it’s not implemented for this geometry. --- Source/WarpX.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 176a6f63ddf..965235e1078 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -1086,7 +1086,10 @@ WarpX::ReadParameters () WARPX_ALWAYS_ASSERT_WITH_MESSAGE( electromagnetic_solver_id != ElectromagneticSolverAlgo::PSATD, "algo.maxwell_solver = psatd is not supported because WarpX was built without spectral solvers"); #endif - +#if defined(WARPX_DIM_1D_Z) && defined(WARPX_USE_FFT) + WARPX_ALWAYS_ASSERT_WITH_MESSAGE( electromagnetic_solver_id != ElectromagneticSolverAlgo::PSATD, + "algo.maxwell_solver = psatd is not available for 1D geometry"); +#endif #ifdef WARPX_DIM_RZ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(Geom(0).isPeriodic(0) == 0, "The problem must not be periodic in the radial direction");