From 57564a09f01a13b315447d7ab942ddd18d1281af Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Thu, 2 Jun 2022 23:43:53 +0200 Subject: 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 --- Source/Particles/PhysicalParticleContainer.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') 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 + #include #include #include @@ -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."); -- cgit v1.2.3