diff options
author | 2022-06-02 23:43:53 +0200 | |
---|---|---|
committer | 2022-06-02 14:43:53 -0700 | |
commit | 57564a09f01a13b315447d7ab942ddd18d1281af (patch) | |
tree | 60f8baf45df96160b05717c2c46298e1d82b85ff /Source/Initialization/PlasmaInjector.cpp | |
parent | 81619e11b45c6621553e96601682c531c3cc49a3 (diff) | |
download | WarpX-57564a09f01a13b315447d7ab942ddd18d1281af.tar.gz WarpX-57564a09f01a13b315447d7ab942ddd18d1281af.tar.zst WarpX-57564a09f01a13b315447d7ab942ddd18d1281af.zip |
Move warning logger in ablastr (#3154)
* initial work to move the Warning Logger into ablastr
* progress with warn manager class
* moved Warning Logger in ablastr
* fixed bugs
* Fix: `SpectralFieldDataRZ.cpp`
Missing include for `WarpX::getCosts(lev);`
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Source/Initialization/PlasmaInjector.cpp')
-rw-r--r-- | Source/Initialization/PlasmaInjector.cpp | 14 |
1 files changed, 8 insertions, 6 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"); |