diff options
Diffstat (limited to 'Source/Initialization')
-rw-r--r-- | Source/Initialization/PlasmaInjector.cpp | 14 | ||||
-rw-r--r-- | Source/Initialization/TemperatureProperties.cpp | 5 | ||||
-rw-r--r-- | Source/Initialization/WarpXInitData.cpp | 11 |
3 files changed, 18 insertions, 12 deletions
diff --git a/Source/Initialization/PlasmaInjector.cpp b/Source/Initialization/PlasmaInjector.cpp index 58ecfd832..9dc4692f7 100644 --- a/Source/Initialization/PlasmaInjector.cpp +++ b/Source/Initialization/PlasmaInjector.cpp @@ -20,6 +20,8 @@ #include "Utils/WarpXUtil.H" #include "WarpX.H" +#include <ablastr/warn_manager/WarnManager.H> + #include <AMReX.H> #include <AMReX_BLassert.H> #include <AMReX_Config.H> @@ -141,7 +143,7 @@ PlasmaInjector::PlasmaInjector (int ispecies, const std::string& name) bool mass_is_specified = queryWithParser(pp_species_name, "mass", mass); if ( charge_is_specified && species_is_specified ){ - WarpX::GetInstance().RecordWarning("Species", + ablastr::warn_manager::WMRecordWarning("Species", "Both '" + species_name + ".charge' and " + species_name + ".species_type' are specified.\n" + species_name + ".charge' will take precedence.\n"); @@ -155,7 +157,7 @@ PlasmaInjector::PlasmaInjector (int ispecies, const std::string& name) ); if ( mass_is_specified && species_is_specified ){ - WarpX::GetInstance().RecordWarning("Species", + ablastr::warn_manager::WMRecordWarning("Species", "Both '" + species_name + ".mass' and " + species_name + ".species_type' are specified.\n" + species_name + ".mass' will take precedence.\n"); @@ -397,13 +399,13 @@ PlasmaInjector::PlasmaInjector (int ispecies, const std::string& name) "'" + ps_name + ".species_type' in your input file!\n"); if (charge_is_specified) { - WarpX::GetInstance().RecordWarning("Species", + ablastr::warn_manager::WMRecordWarning("Species", "Both '" + ps_name + ".charge' and '" + ps_name + ".injection_file' specify a charge.\n'" + ps_name + ".charge' will take precedence.\n"); } else if (species_is_specified) { - WarpX::GetInstance().RecordWarning("Species", + ablastr::warn_manager::WMRecordWarning("Species", "Both '" + ps_name + ".species_type' and '" + ps_name + ".injection_file' specify a charge.\n'" + ps_name + ".species_type' will take precedence.\n"); @@ -416,13 +418,13 @@ PlasmaInjector::PlasmaInjector (int ispecies, const std::string& name) charge = p_q * charge_unit; } if (mass_is_specified) { - WarpX::GetInstance().RecordWarning("Species", + ablastr::warn_manager::WMRecordWarning("Species", "Both '" + ps_name + ".mass' and '" + ps_name + ".injection_file' specify a charge.\n'" + ps_name + ".mass' will take precedence.\n"); } else if (species_is_specified) { - WarpX::GetInstance().RecordWarning("Species", + ablastr::warn_manager::WMRecordWarning("Species", "Both '" + ps_name + ".species_type' and '" + ps_name + ".injection_file' specify a mass.\n'" + ps_name + ".species_type' will take precedence.\n"); diff --git a/Source/Initialization/TemperatureProperties.cpp b/Source/Initialization/TemperatureProperties.cpp index 9446f72d5..901275b04 100644 --- a/Source/Initialization/TemperatureProperties.cpp +++ b/Source/Initialization/TemperatureProperties.cpp @@ -8,7 +8,8 @@ #include "TemperatureProperties.H" #include "Utils/TextMsg.H" -#include "WarpX.H" + +#include <ablastr/warn_manager/WarnManager.H> /* * Construct TemperatureProperties based on the passed parameters. @@ -43,7 +44,7 @@ TemperatureProperties::TemperatureProperties (amrex::ParmParse& pp) { if (mom_dist_s == "maxwell_boltzmann" && theta > 0.01) { - WarpX::GetInstance().RecordWarning( + ablastr::warn_manager::WMRecordWarning( "Temperature", std::string{"Maxwell-Boltzmann distribution has errors greater than 1%"} + std::string{" for temperature parameter theta > 0.01. (theta = "} + diff --git a/Source/Initialization/WarpXInitData.cpp b/Source/Initialization/WarpXInitData.cpp index f7179deaf..8b7ad5e8d 100644 --- a/Source/Initialization/WarpXInitData.cpp +++ b/Source/Initialization/WarpXInitData.cpp @@ -29,6 +29,8 @@ #include "Utils/WarpXProfilerWrapper.H" #include "Utils/WarpXUtil.H" +#include <ablastr/warn_manager/WarnManager.H> + #include <AMReX.H> #include <AMReX_AmrCore.H> #ifdef AMREX_USE_SENSEI_INSITU @@ -1099,7 +1101,8 @@ WarpX::PerformanceHints () << " More information:\n" << " https://warpx.readthedocs.io/en/latest/running_cpp/parallelization.html\n"; - WarpX::GetInstance().RecordWarning("Performance", warnMsg.str(), WarnPriority::high); + ablastr::warn_manager::WMRecordWarning( + "Performance", warnMsg.str(), ablastr::warn_manager::WarnPriority::high); } // TODO: warn if some ranks have disproportionally more work than all others @@ -1194,9 +1197,9 @@ void WarpX::InitializeEBGridData (int lev) if ((nox > 1 or noy > 1 or noz > 1) and flag_eb_on) { - this->RecordWarning("Particles", - "when algo.particle_shape > 1, numerical artifacts will be present when\n" - "particles are close to embedded boundaries"); + ablastr::warn_manager::WMRecordWarning("Particles", + "when algo.particle_shape > 1, numerical artifacts will be present when\n" + "particles are close to embedded boundaries"); } if (WarpX::maxwell_solver_id == MaxwellSolverAlgo::Yee || |