From 70025a828b399d305f48b6303365dd17b9bc92ab Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Thu, 27 Aug 2020 11:12:55 -0700 Subject: Use Long to store pid (#1266) --- Source/Particles/PhysicalParticleContainer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') 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(pid + max_new_particles) > 0, + WarpXUtilMsg::AlwaysAssert(static_cast(pid + max_new_particles) < LastParticleID, "ERROR: overflow on particle id numbers"); const int cpuid = ParallelDescriptor::MyProc(); -- cgit v1.2.3