aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhysicalParticleContainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r--Source/Particles/PhysicalParticleContainer.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp
index d6238528f..ea7287bac 100644
--- a/Source/Particles/PhysicalParticleContainer.cpp
+++ b/Source/Particles/PhysicalParticleContainer.cpp
@@ -101,6 +101,7 @@
#include <string>
#include <utility>
#include <vector>
+#include <sstream>
using namespace amrex;
@@ -533,9 +534,11 @@ PhysicalParticleContainer::AddPlasmaFromFile(ParticleReal q_tot,
if (q_tot != 0.0) {
weight = std::abs(q_tot) / ( std::abs(charge) * ParticleReal(npart) );
if (ps.contains("weighting")) {
- Print() << "WARNING: Both '" << ps_name << ".q_tot' and '"
+ std::stringstream ss;
+ ss << "Both '" << ps_name << ".q_tot' and '"
<< ps_name << ".injection_file' specify a total charge.\n'"
- << ps_name << ".q_tot' will take precedence.\n";
+ << ps_name << ".q_tot' will take precedence.";
+ WarpX::GetInstance().RecordWarning("Species", ss.str());
}
}
// ED-PIC extension?
@@ -570,7 +573,9 @@ PhysicalParticleContainer::AddPlasmaFromFile(ParticleReal q_tot,
}
auto const np = particle_z.size();
if (np < npart) {
- Print() << "WARNING: Simulation box doesn't cover all particles\n";
+ WarpX::GetInstance().RecordWarning("Species",
+ "Simulation box doesn't cover all particles",
+ WarnPriority::high);
}
} // IO Processor
auto const np = particle_z.size();
@@ -2517,8 +2522,10 @@ PhysicalParticleContainer::InitIonizationModule ()
if (!do_field_ionization) return;
ParmParse pp_species_name(species_name);
if (charge != PhysConst::q_e){
- amrex::Warning(
- "charge != q_e for ionizable species: overriding user value and setting charge = q_e.");
+ WarpX::GetInstance().RecordWarning("Species",
+ "charge != q_e for ionizable species '" +
+ species_name + "':" +
+ "overriding user value and setting charge = q_e.");
charge = PhysConst::q_e;
}
queryWithParser(pp_species_name, "ionization_initial_level", ionization_initial_level);