diff options
author | 2022-03-08 18:38:25 +0100 | |
---|---|---|
committer | 2022-03-08 09:38:25 -0800 | |
commit | 0a64c2b8a42d766e5a893fcab2d4573b33cca74f (patch) | |
tree | 16f5979ff152251fc443f2e5ee67f929d6534228 /Source/Evolve/WarpXEvolve.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/Evolve/WarpXEvolve.cpp')
-rw-r--r-- | Source/Evolve/WarpXEvolve.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/Evolve/WarpXEvolve.cpp b/Source/Evolve/WarpXEvolve.cpp index b7c344954..9c99603a3 100644 --- a/Source/Evolve/WarpXEvolve.cpp +++ b/Source/Evolve/WarpXEvolve.cpp @@ -27,6 +27,7 @@ #include "Particles/ParticleBoundaryBuffer.H" #include "Python/WarpX_py.H" #include "Utils/IntervalsParser.H" +#include "Utils/TextMsg.H" #include "Utils/WarpXAlgorithmSelection.H" #include "Utils/WarpXConst.H" #include "Utils/WarpXProfilerWrapper.H" @@ -195,8 +196,9 @@ WarpX::Evolve (int numsteps) } else { - amrex::Print() << "Error: do_subcycling = " << do_subcycling << std::endl; - amrex::Abort("Unsupported do_subcycling type"); + amrex::Abort(Utils::TextMsg::Err( + "do_subcycling = " + std::to_string(do_subcycling) + + " is an unsupported do_subcycling type.")); } // Resample particles @@ -296,7 +298,7 @@ WarpX::Evolve (int numsteps) if (sort_intervals.contains(step+1)) { if (verbose) { - amrex::Print() << "re-sorting particles \n"; + amrex::Print() << Utils::TextMsg::Info("re-sorting particles"); } mypc->SortParticlesByBin(sort_bin_size); } @@ -651,7 +653,7 @@ WarpX::OneStep_sub1 (Real curtime) // TODO: we could save some charge depositions - AMREX_ALWAYS_ASSERT_WITH_MESSAGE(finest_level == 1, "Must have exactly two levels"); + WARPX_ALWAYS_ASSERT_WITH_MESSAGE(finest_level == 1, "Must have exactly two levels"); const int fine_lev = 1; const int coarse_lev = 0; |