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.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp
index 958c800ff..1358011b9 100644
--- a/Source/Particles/PhysicalParticleContainer.cpp
+++ b/Source/Particles/PhysicalParticleContainer.cpp
@@ -2949,7 +2949,7 @@ PlasmaInjector* PhysicalParticleContainer::GetPlasmaInjector ()
return plasma_injector.get();
}
-void PhysicalParticleContainer::resample (const int timestep)
+void PhysicalParticleContainer::resample (const int timestep, const bool verbose)
{
// In heavily load imbalanced simulations, MPI processes with few particles will spend most of
// the time at the MPI synchronization in TotalNumberOfParticles(). Having two profiler entries
@@ -2967,7 +2967,11 @@ void PhysicalParticleContainer::resample (const int timestep)
WARPX_PROFILE_VAR_START(blp_resample_actual);
if (m_resampler.triggered(timestep, global_numparts))
{
- amrex::Print() << Utils::TextMsg::Info("Resampling " + species_name);
+ if (verbose) {
+ amrex::Print() << Utils::TextMsg::Info(
+ "Resampling " + species_name + " at step " + std::to_string(timestep)
+ );
+ }
for (int lev = 0; lev <= maxLevel(); lev++)
{
for (WarpXParIter pti(*this, lev); pti.isValid(); ++pti)
@@ -2977,7 +2981,6 @@ void PhysicalParticleContainer::resample (const int timestep)
}
}
WARPX_PROFILE_VAR_STOP(blp_resample_actual);
-
}