aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralAlgorithms
diff options
context:
space:
mode:
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms')
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp26
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmComoving.cpp4
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmGalileanRZ.cpp5
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmJLinearInTime.cpp1
4 files changed, 22 insertions, 14 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp
index dad1860e0..6d9d684f5 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp
+++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp
@@ -6,6 +6,7 @@
*/
#include "PsatdAlgorithm.H"
+#include "Utils/TextMsg.H"
#include "Utils/WarpXConst.H"
#include "Utils/WarpX_Complex.H"
@@ -93,19 +94,20 @@ PsatdAlgorithm::PsatdAlgorithm(
InitializeSpectralCoefficientsAveraging(spectral_kspace, dm, dt);
}
- if (dive_cleaning && m_is_galilean)
- {
- amrex::Abort("warpx.do_dive_cleaning = 1 not implemented for Galilean PSATD algorithms");
- }
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
+ !dive_cleaning || !m_is_galilean,
+ "warpx.do_dive_cleaning = 1 not implemented for Galilean PSATD algorithms"
+ );
- if (divb_cleaning && m_is_galilean)
- {
- amrex::Abort("warpx.do_divb_cleaning = 1 not implemented for Galilean PSATD algorithms");
- }
- if (time_averaging && !update_with_rho)
- {
- amrex::Abort("PSATD: psatd.do_time_averaging = 1 implemented only with psatd.update_with_rho = 1");
- }
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
+ !divb_cleaning || !m_is_galilean,
+ "warpx.do_divb_cleaning = 1 not implemented for Galilean PSATD algorithms"
+ );
+
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
+ !time_averaging || update_with_rho,
+ "PSATD: psatd.time_averaging = 1 implemented only with psatd.update_with_rho = 1"
+ );
}
void
diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmComoving.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmComoving.cpp
index 9ed33c801..30a37345f 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmComoving.cpp
+++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmComoving.cpp
@@ -1,5 +1,6 @@
#include "PsatdAlgorithmComoving.H"
+#include "Utils/TextMsg.H"
#include "Utils/WarpXConst.H"
#include "Utils/WarpX_Complex.H"
@@ -500,7 +501,8 @@ void PsatdAlgorithmComoving::CurrentCorrection (SpectralFieldData& field_data)
void
PsatdAlgorithmComoving::VayDeposition (SpectralFieldData& /*field_data*/)
{
- amrex::Abort("Vay deposition not implemented for comoving PSATD");
+ amrex::Abort(Utils::TextMsg::Err(
+ "Vay deposition not implemented for comoving PSATD"));
}
#endif // WARPX_USE_PSATD
diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmGalileanRZ.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmGalileanRZ.cpp
index 81674f396..be850e252 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmGalileanRZ.cpp
+++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmGalileanRZ.cpp
@@ -5,6 +5,8 @@
* License: BSD-3-Clause-LBNL
*/
#include "PsatdAlgorithmGalileanRZ.H"
+
+#include "Utils/TextMsg.H"
#include "Utils/WarpXConst.H"
#include "Utils/WarpXProfilerWrapper.H"
#include "WarpX.H"
@@ -362,5 +364,6 @@ PsatdAlgorithmGalileanRZ::CurrentCorrection (SpectralFieldDataRZ& field_data)
void
PsatdAlgorithmGalileanRZ::VayDeposition (SpectralFieldDataRZ& /*field_data*/)
{
- amrex::Abort("Vay deposition not implemented in RZ geometry");
+ amrex::Abort(Utils::TextMsg::Err(
+ "Vay deposition not implemented in RZ geometry"));
}
diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmJLinearInTime.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmJLinearInTime.cpp
index e18055020..299cb29bf 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmJLinearInTime.cpp
+++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmJLinearInTime.cpp
@@ -6,6 +6,7 @@
*/
#include "PsatdAlgorithmJLinearInTime.H"
+#include "Utils/TextMsg.H"
#include "Utils/WarpXConst.H"
#include "Utils/WarpX_Complex.H"