aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Particles')
-rw-r--r--Source/Particles/LaserParticleContainer.cpp11
-rw-r--r--Source/Particles/MultiParticleContainer.cpp30
-rw-r--r--Source/Particles/PhysicalParticleContainer.cpp10
-rw-r--r--Source/Particles/Resampling/LevelingThinning.cpp5
4 files changed, 31 insertions, 25 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
}
}
diff --git a/Source/Particles/MultiParticleContainer.cpp b/Source/Particles/MultiParticleContainer.cpp
index 6349fe3d9..3805824a0 100644
--- a/Source/Particles/MultiParticleContainer.cpp
+++ b/Source/Particles/MultiParticleContainer.cpp
@@ -41,6 +41,8 @@
#include "WarpX.H"
+#include <ablastr/warn_manager/WarnManager.H>
+
#include <AMReX.H>
#include <AMReX_Array.H>
#include <AMReX_Array4.H>
@@ -1025,9 +1027,9 @@ void MultiParticleContainer::InitQuantumSync ()
m_quantum_sync_photon_creation_energy_threshold = temp;
}
else{
- WarpX::GetInstance().RecordWarning("QED",
+ ablastr::warn_manager::WMRecordWarning("QED",
"Using default value (2*me*c^2) for photon energy creation threshold",
- WarnPriority::low);
+ ablastr::warn_manager::WarnPriority::low);
}
// qs_minimum_chi_part is the minimum chi parameter to be
@@ -1043,9 +1045,9 @@ void MultiParticleContainer::InitQuantumSync ()
}
if(lookup_table_mode == "generate"){
- WarpX::GetInstance().RecordWarning("QED",
+ ablastr::warn_manager::WMRecordWarning("QED",
"A new Quantum Synchrotron table will be generated.",
- WarnPriority::low);
+ ablastr::warn_manager::WarnPriority::low);
#ifndef WARPX_QED_TABLE_GEN
amrex::Error("Error: Compile with QED_TABLE_GEN=TRUE to enable table generation!\n");
#else
@@ -1055,9 +1057,9 @@ void MultiParticleContainer::InitQuantumSync ()
else if(lookup_table_mode == "load"){
std::string load_table_name;
pp_qed_qs.query("load_table_from", load_table_name);
- WarpX::GetInstance().RecordWarning("QED",
+ ablastr::warn_manager::WMRecordWarning("QED",
"The Quantum Synchrotron table will be read from the file: " + load_table_name,
- WarnPriority::low);
+ ablastr::warn_manager::WarnPriority::low);
if(load_table_name.empty()){
amrex::Abort("Quantum Synchrotron table name should be provided");
}
@@ -1068,10 +1070,10 @@ void MultiParticleContainer::InitQuantumSync ()
qs_minimum_chi_part);
}
else if(lookup_table_mode == "builtin"){
- WarpX::GetInstance().RecordWarning("QED",
+ ablastr::warn_manager::WMRecordWarning("QED",
"The built-in Quantum Synchrotron table will be used. "
"This low resolution table is intended for testing purposes only.",
- WarnPriority::medium);
+ ablastr::warn_manager::WarnPriority::medium);
m_shr_p_qs_engine->init_builtin_tables(qs_minimum_chi_part);
}
else{
@@ -1101,9 +1103,9 @@ void MultiParticleContainer::InitBreitWheeler ()
}
if(lookup_table_mode == "generate"){
- WarpX::GetInstance().RecordWarning("QED",
+ ablastr::warn_manager::WMRecordWarning("QED",
"A new Breit Wheeler table will be generated.",
- WarnPriority::low);
+ ablastr::warn_manager::WarnPriority::low);
#ifndef WARPX_QED_TABLE_GEN
amrex::Error("Error: Compile with QED_TABLE_GEN=TRUE to enable table generation!\n");
#else
@@ -1113,9 +1115,9 @@ void MultiParticleContainer::InitBreitWheeler ()
else if(lookup_table_mode == "load"){
std::string load_table_name;
pp_qed_bw.query("load_table_from", load_table_name);
- WarpX::GetInstance().RecordWarning("QED",
+ ablastr::warn_manager::WMRecordWarning("QED",
"The Breit Wheeler table will be read from the file:" + load_table_name,
- WarnPriority::low);
+ ablastr::warn_manager::WarnPriority::low);
if(load_table_name.empty()){
amrex::Abort("Breit Wheeler table name should be provided");
}
@@ -1126,10 +1128,10 @@ void MultiParticleContainer::InitBreitWheeler ()
table_data, bw_minimum_chi_part);
}
else if(lookup_table_mode == "builtin"){
- WarpX::GetInstance().RecordWarning("QED",
+ ablastr::warn_manager::WMRecordWarning("QED",
"The built-in Breit Wheeler table will be used. "
"This low resolution table is intended for testing purposes only.",
- WarnPriority::medium);
+ ablastr::warn_manager::WarnPriority::medium);
m_shr_p_bw_engine->init_builtin_tables(bw_minimum_chi_part);
}
else{
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.");
diff --git a/Source/Particles/Resampling/LevelingThinning.cpp b/Source/Particles/Resampling/LevelingThinning.cpp
index 842c28884..cf9ca9ba9 100644
--- a/Source/Particles/Resampling/LevelingThinning.cpp
+++ b/Source/Particles/Resampling/LevelingThinning.cpp
@@ -10,7 +10,8 @@
#include "Utils/ParticleUtils.H"
#include "Utils/TextMsg.H"
#include "Utils/WarpXUtil.H"
-#include "WarpX.H"
+
+#include <ablastr/warn_manager/WarnManager.H>
#include <AMReX.H>
#include <AMReX_BLassert.H>
@@ -38,7 +39,7 @@ LevelingThinning::LevelingThinning (const std::string species_name)
"Resampling target ratio should be strictly greater than 0");
if (m_target_ratio <= 1._rt)
{
- WarpX::GetInstance().RecordWarning("Species",
+ ablastr::warn_manager::WMRecordWarning("Species",
"For species '" + species_name + "' " +
"target ratio for leveling thinning is smaller or equal to one." +
"It is possible that no particle will be removed during resampling");