diff options
author | 2022-03-08 18:38:25 +0100 | |
---|---|---|
committer | 2022-03-08 09:38:25 -0800 | |
commit | 0a64c2b8a42d766e5a893fcab2d4573b33cca74f (patch) | |
tree | 16f5979ff152251fc443f2e5ee67f929d6534228 /Source/Utils/CoarsenIO.cpp | |
parent | 7425721ccced342615c054ea8147fbdc484d6620 (diff) | |
download | WarpX-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/Utils/CoarsenIO.cpp')
-rw-r--r-- | Source/Utils/CoarsenIO.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/Utils/CoarsenIO.cpp b/Source/Utils/CoarsenIO.cpp index 6bdaa32ee..7fd305d95 100644 --- a/Source/Utils/CoarsenIO.cpp +++ b/Source/Utils/CoarsenIO.cpp @@ -1,5 +1,7 @@ #include "CoarsenIO.H" +#include "Utils/TextMsg.H" + #include <AMReX_BLProfiler.H> #include <AMReX_BLassert.H> #include <AMReX_Box.H> @@ -29,10 +31,10 @@ CoarsenIO::Loop ( MultiFab& mf_dst, const IntVect stag_src = mf_src.boxArray().ixType().toIntVect(); const IntVect stag_dst = mf_dst.boxArray().ixType().toIntVect(); - if ( crse_ratio > IntVect(1) ) AMREX_ALWAYS_ASSERT_WITH_MESSAGE( ngrowvect == IntVect(0), + if ( crse_ratio > IntVect(1) ) WARPX_ALWAYS_ASSERT_WITH_MESSAGE( ngrowvect == IntVect(0), "option of filling guard cells of destination MultiFab with coarsening not supported for this interpolation" ); - AMREX_ALWAYS_ASSERT_WITH_MESSAGE( mf_src.nGrowVect() >= stag_dst-stag_src+ngrowvect, + WARPX_ALWAYS_ASSERT_WITH_MESSAGE( mf_src.nGrowVect() >= stag_dst-stag_src+ngrowvect, "source fine MultiFab does not have enough guard cells for this interpolation" ); // Auxiliary integer arrays (always 3D) @@ -127,7 +129,7 @@ CoarsenIO::Coarsen ( MultiFab& mf_dst, // Convert BoxArray of source MultiFab to staggering of destination MultiFab and coarsen it BoxArray ba_tmp = amrex::convert( mf_src.boxArray(), mf_dst.ixType().toIntVect() ); - AMREX_ALWAYS_ASSERT_WITH_MESSAGE( ba_tmp.coarsenable( crse_ratio ), + WARPX_ALWAYS_ASSERT_WITH_MESSAGE( ba_tmp.coarsenable( crse_ratio ), "source MultiFab converted to staggering of destination MultiFab is not coarsenable" ); ba_tmp.coarsen( crse_ratio ); |