Skip to content

Commit

Permalink
Added abort message if 1D PSATD is used (#5500)
Browse files Browse the repository at this point in the history
Added an abort message for cases where 1D PSATD is used, as it’s not
implemented for this geometry.
  • Loading branch information
oshapoval authored Dec 11, 2024
1 parent 540268f commit f68415a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/WarpX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit f68415a

Please sign in to comment.