From 1c6f1bf24513b4e56f640eea402fa8223ea1c667 Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Mon, 1 May 2023 18:25:01 +0200 Subject: Use WARPX_ABORT_WITH_MESSAGE("msg") instead of amrex::Abort(Utils::TextMsg::Err("msg")) (#3879) * use WARPX_ABORT_WITH_MSG instead of amrex::Abort(Utils::TextMsg::Err(msg)) [WIP] * use WARPX_ABORT_WITH_MESSAGE * fix typo * fix missing parenthesis * remove spaces to prevent automatic text wrapping * remove wrong parenthesis --- .../SpectralAlgorithms/PsatdAlgorithmComoving.cpp | 4 ++-- .../SpectralAlgorithms/PsatdAlgorithmFirstOrder.cpp | 8 ++++---- .../SpectralAlgorithms/PsatdAlgorithmGalileanRZ.cpp | 4 ++-- .../SpectralAlgorithms/PsatdAlgorithmJLinearInTime.cpp | 8 ++++---- .../SpectralAlgorithms/PsatdAlgorithmPml.cpp | 8 ++++---- .../SpectralAlgorithms/PsatdAlgorithmPmlRZ.cpp | 8 ++++---- .../SpectralAlgorithms/PsatdAlgorithmRZ.cpp | 16 ++++++++-------- 7 files changed, 28 insertions(+), 28 deletions(-) (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms') diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmComoving.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmComoving.cpp index aecc754d4..13eb1bbf3 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmComoving.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmComoving.cpp @@ -502,8 +502,8 @@ void PsatdAlgorithmComoving::CurrentCorrection (SpectralFieldData& field_data) void PsatdAlgorithmComoving::VayDeposition (SpectralFieldData& /*field_data*/) { - amrex::Abort(Utils::TextMsg::Err( - "Vay deposition not implemented for comoving PSATD")); + WARPX_ABORT_WITH_MESSAGE( + "Vay deposition not implemented for comoving PSATD"); } #endif // WARPX_USE_PSATD diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmFirstOrder.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmFirstOrder.cpp index 3701fb889..290b005e1 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmFirstOrder.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmFirstOrder.cpp @@ -357,8 +357,8 @@ void PsatdAlgorithmFirstOrder::CurrentCorrection (SpectralFieldData& field_data) BL_PROFILE("PsatdAlgorithmFirstOrder::CurrentCorrection"); amrex::ignore_unused(field_data); - amrex::Abort(Utils::TextMsg::Err( - "Current correction not implemented for first-order PSATD equations")); + WARPX_ABORT_WITH_MESSAGE( + "Current correction not implemented for first-order PSATD equations"); } void @@ -368,8 +368,8 @@ PsatdAlgorithmFirstOrder::VayDeposition (SpectralFieldData& field_data) BL_PROFILE("PsatdAlgorithmFirstOrder::VayDeposition()"); amrex::ignore_unused(field_data); - amrex::Abort(Utils::TextMsg::Err( - "Vay deposition not implemented for first-order PSATD equations")); + WARPX_ABORT_WITH_MESSAGE( + "Vay deposition not implemented for first-order PSATD equations"); } #endif // WARPX_USE_PSATD diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmGalileanRZ.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmGalileanRZ.cpp index 75f0e49d1..8ab311308 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmGalileanRZ.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmGalileanRZ.cpp @@ -364,6 +364,6 @@ PsatdAlgorithmGalileanRZ::CurrentCorrection (SpectralFieldDataRZ& field_data) void PsatdAlgorithmGalileanRZ::VayDeposition (SpectralFieldDataRZ& /*field_data*/) { - amrex::Abort(Utils::TextMsg::Err( - "Vay deposition not implemented in RZ geometry")); + WARPX_ABORT_WITH_MESSAGE( + "Vay deposition not implemented in RZ geometry"); } diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmJLinearInTime.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmJLinearInTime.cpp index ecdd6169c..27db744d7 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmJLinearInTime.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmJLinearInTime.cpp @@ -430,8 +430,8 @@ void PsatdAlgorithmJLinearInTime::CurrentCorrection (SpectralFieldData& field_da BL_PROFILE("PsatdAlgorithmJLinearInTime::CurrentCorrection"); amrex::ignore_unused(field_data); - amrex::Abort(Utils::TextMsg::Err( - "Current correction not implemented for multi-J PSATD algorithm")); + WARPX_ABORT_WITH_MESSAGE( + "Current correction not implemented for multi-J PSATD algorithm"); } void @@ -441,8 +441,8 @@ PsatdAlgorithmJLinearInTime::VayDeposition (SpectralFieldData& field_data) BL_PROFILE("PsatdAlgorithmJLinearInTime::VayDeposition()"); amrex::ignore_unused(field_data); - amrex::Abort(Utils::TextMsg::Err( - "Vay deposition not implemented for multi-J PSATD algorithm")); + WARPX_ABORT_WITH_MESSAGE( + "Vay deposition not implemented for multi-J PSATD algorithm"); } #endif // WARPX_USE_PSATD diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmPml.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmPml.cpp index 217998d18..b8bdfdbed 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmPml.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmPml.cpp @@ -405,15 +405,15 @@ void PsatdAlgorithmPml::InitializeSpectralCoefficients ( void PsatdAlgorithmPml::CurrentCorrection (SpectralFieldData& /*field_data*/) { - amrex::Abort(Utils::TextMsg::Err( - "Current correction not implemented for PML PSATD")); + WARPX_ABORT_WITH_MESSAGE( + "Current correction not implemented for PML PSATD"); } void PsatdAlgorithmPml::VayDeposition (SpectralFieldData& /*field_data*/) { - amrex::Abort(Utils::TextMsg::Err( - "Vay deposition not implemented for PML PSATD")); + WARPX_ABORT_WITH_MESSAGE( + "Vay deposition not implemented for PML PSATD"); } #endif // WARPX_USE_PSATD diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmPmlRZ.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmPmlRZ.cpp index 60f7209de..d2200eb9f 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmPmlRZ.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmPmlRZ.cpp @@ -163,13 +163,13 @@ void PsatdAlgorithmPmlRZ::InitializeSpectralCoefficients (SpectralFieldDataRZ co void PsatdAlgorithmPmlRZ::CurrentCorrection (SpectralFieldDataRZ& /* field_data */) { - amrex::Abort(Utils::TextMsg::Err( - "Current correction not implemented in RZ geometry PML")); + WARPX_ABORT_WITH_MESSAGE( + "Current correction not implemented in RZ geometry PML"); } void PsatdAlgorithmPmlRZ::VayDeposition (SpectralFieldDataRZ& /*field_data*/) { - amrex::Abort(Utils::TextMsg::Err( - "Vay deposition not implemented in RZ geometry PML")); + WARPX_ABORT_WITH_MESSAGE( + "Vay deposition not implemented in RZ geometry PML"); } diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmRZ.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmRZ.cpp index 5b024b425..ee83ddce7 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmRZ.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmRZ.cpp @@ -58,20 +58,20 @@ PsatdAlgorithmRZ::PsatdAlgorithmRZ (SpectralKSpaceRZ const & spectral_kspace, if (time_averaging && J_in_time != JInTime::Linear) { - amrex::Abort(Utils::TextMsg::Err( - "RZ PSATD: psatd.do_time_averaging=1 implemented only with psatd.J_in_time=linear")); + WARPX_ABORT_WITH_MESSAGE( + "RZ PSATD: psatd.do_time_averaging=1 implemented only with psatd.J_in_time=linear"); } if (dive_cleaning && J_in_time != JInTime::Linear) { - amrex::Abort(Utils::TextMsg::Err( - "RZ PSATD: warpx.do_dive_cleaning=1 implemented only with psatd.J_in_time=linear")); + WARPX_ABORT_WITH_MESSAGE( + "RZ PSATD: warpx.do_dive_cleaning=1 implemented only with psatd.J_in_time=linear"); } if (divb_cleaning && J_in_time != JInTime::Linear) { - amrex::Abort(Utils::TextMsg::Err( - "RZ PSATD: warpx.do_divb_cleaning=1 implemented only with psatd.J_in_time=linear")); + WARPX_ABORT_WITH_MESSAGE( + "RZ PSATD: warpx.do_divb_cleaning=1 implemented only with psatd.J_in_time=linear"); } } @@ -491,6 +491,6 @@ PsatdAlgorithmRZ::CurrentCorrection (SpectralFieldDataRZ& field_data) void PsatdAlgorithmRZ::VayDeposition (SpectralFieldDataRZ& /*field_data*/) { - amrex::Abort(Utils::TextMsg::Err( - "Vay deposition not implemented in RZ geometry")); + WARPX_ABORT_WITH_MESSAGE( + "Vay deposition not implemented in RZ geometry"); } -- cgit v1.2.3