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/LaserParticleContainer.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Source/Particles/LaserParticleContainer.cpp') diff --git a/Source/Particles/LaserParticleContainer.cpp b/Source/Particles/LaserParticleContainer.cpp index fbe2b9710..dae759cee 100644 --- a/Source/Particles/LaserParticleContainer.cpp +++ b/Source/Particles/LaserParticleContainer.cpp @@ -18,7 +18,8 @@ #include "Utils/WarpXConst.H" #include "Utils/WarpXProfilerWrapper.H" #include "Utils/WarpXUtil.H" -#include "WarpX.H" + +#include #include #include @@ -117,9 +118,9 @@ LaserParticleContainer::LaserParticleContainer (AmrCore* amr_core, int ispecies, pp_laser_name.query("min_particles_per_mode", m_min_particles_per_mode); if (m_e_max == amrex::Real(0.)){ - WarpX::GetInstance().RecordWarning("Laser", + ablastr::warn_manager::WMRecordWarning("Laser", m_laser_name + " with zero amplitude disabled.", - WarnPriority::low); + ablastr::warn_manager::WarnPriority::low); m_enabled = false; return; // Disable laser if amplitude is 0 } @@ -328,9 +329,9 @@ LaserParticleContainer::InitData () InitData(maxLevel()); if(!do_continuous_injection && (TotalNumberOfParticles() == 0)){ - WarpX::GetInstance().RecordWarning("Laser", + ablastr::warn_manager::WMRecordWarning("Laser", "The antenna is completely out of the simulation box for laser " + m_laser_name, - WarnPriority::high); + ablastr::warn_manager::WarnPriority::high); m_enabled = false; // Disable laser if antenna is completely out of the simulation box } } -- cgit v1.2.3