From 29c9d92ad43e79fe37e7cdd5bdd136a07d5b554f Mon Sep 17 00:00:00 2001 From: Olga Shapoval Date: Thu, 5 Dec 2024 16:30:42 -0800 Subject: [PATCH 1/2] Added abort message if 1D PSTD is used --- Source/WarpX.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 772131ea0e7..d80fb296105 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -1081,6 +1081,11 @@ WarpX::ReadParameters () "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"); From 179f394c76ceefc767896f0336d4bf4d94589a67 Mon Sep 17 00:00:00 2001 From: Olga Shapoval Date: Fri, 6 Dec 2024 14:12:29 -0800 Subject: [PATCH 2/2] Clean-up: removed blank lines --- Source/WarpX.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index d80fb296105..8905283d4d5 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -1080,12 +1080,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");