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.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp
index af1992de4..0efb6f61c 100644
--- a/Source/Particles/PhysicalParticleContainer.cpp
+++ b/Source/Particles/PhysicalParticleContainer.cpp
@@ -32,6 +32,7 @@
#include "Particles/SpeciesPhysicalProperties.H"
#include "Particles/WarpXParticleContainer.H"
#include "Utils/IonizationEnergiesTable.H"
+#include "Utils/TextMsg.H"
#include "Utils/WarpXAlgorithmSelection.H"
#include "Utils/WarpXConst.H"
#include "Utils/WarpXProfilerWrapper.H"
@@ -257,16 +258,15 @@ PhysicalParticleContainer::PhysicalParticleContainer (AmrCore* amr_core, int isp
pp_species_name.query("do_classical_radiation_reaction", do_classical_radiation_reaction);
//if the species is not a lepton, do_classical_radiation_reaction
//should be false
- WarpXUtilMsg::AlwaysAssert(
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
!(do_classical_radiation_reaction &&
!(AmIA<PhysicalSpecies::electron>() ||
AmIA<PhysicalSpecies::positron>() )),
- "ERROR: can't enable classical radiation reaction for non lepton species '"
- + species_name + "'."
- );
+ "can't enable classical radiation reaction for non lepton species '"
+ + species_name + "'.");
//Only Boris pusher is compatible with radiation reaction
- AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
!(do_classical_radiation_reaction &&
WarpX::particle_pusher_algo != ParticlePusherAlgo::Boris),
"Radiation reaction can be enabled only if Boris pusher is used");
@@ -535,7 +535,7 @@ PhysicalParticleContainer::AddPlasmaFromFile(ParticleReal q_tot,
#ifdef WARPX_USE_OPENPMD
//TODO: Make changes for read/write in multiple MPI ranks
if (ParallelDescriptor::IOProcessor()) {
- AMREX_ALWAYS_ASSERT_WITH_MESSAGE(plasma_injector,
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(plasma_injector,
"AddPlasmaFromFile: plasma injector not initialized.\n");
// take ownership of the series and close it when done
auto series = std::move(plasma_injector->m_openpmd_input_series);
@@ -896,8 +896,9 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox)
pid = ParticleType::NextID();
ParticleType::NextID(pid+max_new_particles);
}
- WarpXUtilMsg::AlwaysAssert(static_cast<Long>(pid + max_new_particles) < LastParticleID,
- "ERROR: overflow on particle id numbers");
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
+ static_cast<Long>(pid + max_new_particles) < LastParticleID,
+ "ERROR: overflow on particle id numbers");
const int cpuid = ParallelDescriptor::MyProc();
@@ -1427,8 +1428,9 @@ PhysicalParticleContainer::AddPlasmaFlux (amrex::Real dt)
pid = ParticleType::NextID();
ParticleType::NextID(pid+max_new_particles);
}
- WarpXUtilMsg::AlwaysAssert(static_cast<Long>(pid + max_new_particles) < LastParticleID,
- "ERROR: overflow on particle id numbers");
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
+ static_cast<Long>(pid + max_new_particles) < LastParticleID,
+ "overflow on particle id numbers");
const int cpuid = ParallelDescriptor::MyProc();
@@ -2546,7 +2548,7 @@ PhysicalParticleContainer::PushPX (WarpXParIter& pti,
amrex::Real dt, ScaleFields scaleFields,
DtType a_dt_type)
{
- AMREX_ALWAYS_ASSERT_WITH_MESSAGE((gather_lev==(lev-1)) ||
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE((gather_lev==(lev-1)) ||
(gather_lev==(lev )),
"Gather buffers only work for lev-1");
// If no particles, do not do anything
@@ -2822,7 +2824,7 @@ void PhysicalParticleContainer::resample (const int timestep)
WARPX_PROFILE_VAR_START(blp_resample_actual);
if (m_resampler.triggered(timestep, global_numparts))
{
- amrex::Print() << "Resampling " << species_name << ".\n";
+ amrex::Print() << Utils::TextMsg::Info("Resampling " + species_name);
for (int lev = 0; lev <= maxLevel(); lev++)
{
for (WarpXParIter pti(*this, lev); pti.isValid(); ++pti)