aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/LaserParticleContainer.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/LaserParticleContainer.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/LaserParticleContainer.cpp')
-rw-r--r--Source/Particles/LaserParticleContainer.cpp11
1 files changed, 6 insertions, 5 deletions
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 <ablastr/warn_manager/WarnManager.H>
#include <AMReX.H>
#include <AMReX_BLassert.H>
@@ -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
}
}