aboutsummaryrefslogtreecommitdiff
path: root/Source/Parallelization/WarpXComm.cpp
diff options
context:
space:
mode:
authorGravatar Luca Fedeli <luca.fedeli@cea.fr> 2022-03-08 18:38:25 +0100
committerGravatar GitHub <noreply@github.com> 2022-03-08 09:38:25 -0800
commit0a64c2b8a42d766e5a893fcab2d4573b33cca74f (patch)
tree16f5979ff152251fc443f2e5ee67f929d6534228 /Source/Parallelization/WarpXComm.cpp
parent7425721ccced342615c054ea8147fbdc484d6620 (diff)
downloadWarpX-0a64c2b8a42d766e5a893fcab2d4573b33cca74f.tar.gz
WarpX-0a64c2b8a42d766e5a893fcab2d4573b33cca74f.tar.zst
WarpX-0a64c2b8a42d766e5a893fcab2d4573b33cca74f.zip
Make error and info messages visually uniform (#2939)
* initial work to add msg formatter * wip * replace AMREX_ALWAYS_ASSERT_WITH_MESSAGE with WarpX equivalent
Diffstat (limited to 'Source/Parallelization/WarpXComm.cpp')
-rw-r--r--Source/Parallelization/WarpXComm.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/Parallelization/WarpXComm.cpp b/Source/Parallelization/WarpXComm.cpp
index 1c8988811..9c6d3e9a4 100644
--- a/Source/Parallelization/WarpXComm.cpp
+++ b/Source/Parallelization/WarpXComm.cpp
@@ -15,6 +15,7 @@
#include "Filter/BilinearFilter.H"
#include "Utils/CoarsenMR.H"
#include "Utils/IntervalsParser.H"
+#include "Utils/TextMsg.H"
#include "Utils/WarpXAlgorithmSelection.H"
#include "Utils/WarpXProfilerWrapper.H"
#include "WarpXComm_K.H"
@@ -65,7 +66,7 @@ WarpX::UpdateAuxilaryDataStagToNodal ()
{
#ifndef WARPX_USE_PSATD
if (maxwell_solver_id == MaxwellSolverAlgo::PSATD) {
- AMREX_ALWAYS_ASSERT_WITH_MESSAGE( false,
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE( false,
"WarpX::UpdateAuxilaryDataStagToNodal: PSATD solver requires "
"WarpX build with spectral solver support.");
}
@@ -587,7 +588,7 @@ WarpX::FillBoundaryE (const int lev, const PatchType patch_type, const amrex::In
// Fill guard cells in valid domain
for (int i = 0; i < 3; ++i)
{
- AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
ng <= mf[i]->nGrowVect(),
"Error: in FillBoundaryE, requested more guard cells than allocated");
@@ -644,7 +645,7 @@ WarpX::FillBoundaryB (const int lev, const PatchType patch_type, const amrex::In
// Fill guard cells in valid domain
for (int i = 0; i < 3; ++i)
{
- AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
ng <= mf[i]->nGrowVect(),
"Error: in FillBoundaryB, requested more guard cells than allocated");
@@ -675,7 +676,7 @@ WarpX::FillBoundaryE_avg (int lev, PatchType patch_type, IntVect ng)
Vector<MultiFab*> mf{Efield_avg_fp[lev][0].get(),Efield_avg_fp[lev][1].get(),Efield_avg_fp[lev][2].get()};
WarpXCommUtil::FillBoundary(mf, period);
} else {
- AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
ng <= Efield_avg_fp[lev][0]->nGrowVect(),
"Error: in FillBoundaryE_avg, requested more guard cells than allocated");
WarpXCommUtil::FillBoundary(*Efield_avg_fp[lev][0], ng, period);
@@ -696,7 +697,7 @@ WarpX::FillBoundaryE_avg (int lev, PatchType patch_type, IntVect ng)
WarpXCommUtil::FillBoundary(mf, cperiod);
} else {
- AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
ng <= Efield_avg_cp[lev][0]->nGrowVect(),
"Error: in FillBoundaryE, requested more guard cells than allocated");
WarpXCommUtil::FillBoundary(*Efield_avg_cp[lev][0], ng, cperiod);
@@ -728,7 +729,7 @@ WarpX::FillBoundaryB_avg (int lev, PatchType patch_type, IntVect ng)
Vector<MultiFab*> mf{Bfield_avg_fp[lev][0].get(),Bfield_avg_fp[lev][1].get(),Bfield_avg_fp[lev][2].get()};
WarpXCommUtil::FillBoundary(mf, period);
} else {
- AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
ng <= Bfield_fp[lev][0]->nGrowVect(),
"Error: in FillBoundaryB, requested more guard cells than allocated");
WarpXCommUtil::FillBoundary(*Bfield_avg_fp[lev][0], ng, period);
@@ -748,7 +749,7 @@ WarpX::FillBoundaryB_avg (int lev, PatchType patch_type, IntVect ng)
Vector<MultiFab*> mf{Bfield_avg_cp[lev][0].get(),Bfield_avg_cp[lev][1].get(),Bfield_avg_cp[lev][2].get()};
WarpXCommUtil::FillBoundary(mf, cperiod);
} else {
- AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
ng <= Bfield_avg_cp[lev][0]->nGrowVect(),
"Error: in FillBoundaryB_avg, requested more guard cells than allocated");
WarpXCommUtil::FillBoundary(*Bfield_avg_cp[lev][0], ng, cperiod);