aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/FiniteDifferenceSolver/ApplySilverMuellerBoundary.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/FiniteDifferenceSolver/ApplySilverMuellerBoundary.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/FiniteDifferenceSolver/ApplySilverMuellerBoundary.cpp')
-rw-r--r--Source/FieldSolver/FiniteDifferenceSolver/ApplySilverMuellerBoundary.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/FieldSolver/FiniteDifferenceSolver/ApplySilverMuellerBoundary.cpp b/Source/FieldSolver/FiniteDifferenceSolver/ApplySilverMuellerBoundary.cpp
index 46b32a8ff..01ae22a09 100644
--- a/Source/FieldSolver/FiniteDifferenceSolver/ApplySilverMuellerBoundary.cpp
+++ b/Source/FieldSolver/FiniteDifferenceSolver/ApplySilverMuellerBoundary.cpp
@@ -9,6 +9,7 @@
#ifdef WARPX_DIM_RZ
# include "FiniteDifferenceAlgorithms/CylindricalYeeAlgorithm.H"
#endif
+#include "Utils/TextMsg.H"
#include "Utils/WarpXAlgorithmSelection.H"
#include "Utils/WarpXConst.H"
@@ -42,9 +43,10 @@ void FiniteDifferenceSolver::ApplySilverMuellerBoundary (
amrex::Vector<int> field_boundary_hi) {
// Ensure that we are using the Yee solver
- if (m_fdtd_algo != MaxwellSolverAlgo::Yee) {
- amrex::Abort("The Silver-Mueller boundary conditions can only be used with the Yee solver.");
- }
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
+ m_fdtd_algo == MaxwellSolverAlgo::Yee,
+ "The Silver-Mueller boundary conditions can only be used with the Yee solver."
+ );
// Ensure that we are using the cells the domain
domain_box.enclosedCells();