aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp
diff options
context:
space:
mode:
authorGravatar Luca Fedeli <luca.fedeli@cea.fr> 2022-05-17 09:58:22 +0200
committerGravatar GitHub <noreply@github.com> 2022-05-17 09:58:22 +0200
commit724a0e061274d4eac5daed409933fe073899eda7 (patch)
treea41e84351288e83242ae897fcbb44356d7dc6f9d /Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp
parent8581ed36ae2b9c4ad8fb983a3f299c9167611ab7 (diff)
downloadWarpX-724a0e061274d4eac5daed409933fe073899eda7.tar.gz
WarpX-724a0e061274d4eac5daed409933fe073899eda7.tar.zst
WarpX-724a0e061274d4eac5daed409933fe073899eda7.zip
Use uniform error message formatting in more source files (#2964)
* use WARPX_ALWAYS_ASSERT_WITH_MESSAGE instead of Abort() * fix bug * Update Source/WarpX.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * use more uniform text formatting * fixed bug * fixed bug * using Utils::TextMsg in more files * fixed bug * use Utils::TextMsg in more files * fixed bug * use Utils::TextMsg in more files * fixed last merge conflict * fixed bug * fix indentation Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp')
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp26
1 files changed, 14 insertions, 12 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