aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhysicalParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Luca Fedeli <luca.fedeli@cea.fr> 2022-06-02 23:43:53 +0200
committerGravatar GitHub <noreply@github.com> 2022-06-02 14:43:53 -0700
commit57564a09f01a13b315447d7ab942ddd18d1281af (patch)
tree60f8baf45df96160b05717c2c46298e1d82b85ff /Source/Particles/PhysicalParticleContainer.cpp
parent81619e11b45c6621553e96601682c531c3cc49a3 (diff)
downloadWarpX-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/Particles/PhysicalParticleContainer.cpp')
-rw-r--r--Source/Particles/PhysicalParticleContainer.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp
index 20632ce1f..762b5080e 100644
--- a/Source/Particles/PhysicalParticleContainer.cpp
+++ b/Source/Particles/PhysicalParticleContainer.cpp
@@ -39,6 +39,8 @@
#include "Utils/WarpXUtil.H"
#include "WarpX.H"
+#include <ablastr/warn_manager/WarnManager.H>
+
#include <AMReX.H>
#include <AMReX_Algorithm.H>
#include <AMReX_Array.H>
@@ -578,7 +580,7 @@ PhysicalParticleContainer::AddPlasmaFromFile(ParticleReal q_tot,
ss << "Both '" << ps_name << ".q_tot' and '"
<< ps_name << ".injection_file' specify a total charge.\n'"
<< ps_name << ".q_tot' will take precedence.";
- WarpX::GetInstance().RecordWarning("Species", ss.str());
+ ablastr::warn_manager::WMRecordWarning("Species", ss.str());
}
}
// ED-PIC extension?
@@ -617,9 +619,9 @@ PhysicalParticleContainer::AddPlasmaFromFile(ParticleReal q_tot,
}
auto const np = particle_z.size();
if (np < npart) {
- WarpX::GetInstance().RecordWarning("Species",
+ ablastr::warn_manager::WMRecordWarning("Species",
"Simulation box doesn't cover all particles",
- WarnPriority::high);
+ ablastr::warn_manager::WarnPriority::high);
}
} // IO Processor
auto const np = particle_z.size();
@@ -2727,7 +2729,7 @@ PhysicalParticleContainer::InitIonizationModule ()
if (!do_field_ionization) return;
ParmParse pp_species_name(species_name);
if (charge != PhysConst::q_e){
- WarpX::GetInstance().RecordWarning("Species",
+ ablastr::warn_manager::WMRecordWarning("Species",
"charge != q_e for ionizable species '" +
species_name + "':" +
"overriding user value and setting charge = q_e.");