aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhysicalParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Andrew Myers <atmyers@lbl.gov> 2020-08-27 11:12:55 -0700
committerGravatar GitHub <noreply@github.com> 2020-08-27 11:12:55 -0700
commit70025a828b399d305f48b6303365dd17b9bc92ab (patch)
tree6f3b2019a8e486f7e0a5833ae7b29f639fa09e9b /Source/Particles/PhysicalParticleContainer.cpp
parent322544908742aca8064e58cdcb03aa3432e057fa (diff)
downloadWarpX-70025a828b399d305f48b6303365dd17b9bc92ab.tar.gz
WarpX-70025a828b399d305f48b6303365dd17b9bc92ab.tar.zst
WarpX-70025a828b399d305f48b6303365dd17b9bc92ab.zip
Use Long to store pid (#1266)
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r--Source/Particles/PhysicalParticleContainer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp
index efce2245d..ac4fd0d79 100644
--- a/Source/Particles/PhysicalParticleContainer.cpp
+++ b/Source/Particles/PhysicalParticleContainer.cpp
@@ -677,7 +677,7 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox)
#endif
// Update NextID to include particles created in this function
- int pid;
+ Long pid;
#ifdef _OPENMP
#pragma omp critical (add_plasma_nextid)
#endif
@@ -685,7 +685,7 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox)
pid = ParticleType::NextID();
ParticleType::NextID(pid+max_new_particles);
}
- WarpXUtilMsg::AlwaysAssert(static_cast<int>(pid + max_new_particles) > 0,
+ WarpXUtilMsg::AlwaysAssert(static_cast<Long>(pid + max_new_particles) < LastParticleID,
"ERROR: overflow on particle id numbers");
const int cpuid = ParallelDescriptor::MyProc();