aboutsummaryrefslogtreecommitdiff
path: root/Source/PhysicalParticleContainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/PhysicalParticleContainer.cpp')
-rw-r--r--Source/PhysicalParticleContainer.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/PhysicalParticleContainer.cpp b/Source/PhysicalParticleContainer.cpp
index c221ddd84..b9ddd8ec4 100644
--- a/Source/PhysicalParticleContainer.cpp
+++ b/Source/PhysicalParticleContainer.cpp
@@ -103,16 +103,18 @@ PhysicalParticleContainer::AddParticles (int lev, Box part_box)
#elif BL_SPACEDIM==2
scale_fac = dx[0]*dx[2]/num_ppc;
#endif
-
+
+#ifdef _OPENMP
// First touch all tiles in the map in serial
for (MFIter mfi = MakeMFIter(lev); mfi.isValid(); ++mfi) {
const int grid_id = mfi.index();
const int tile_id = mfi.LocalTileIndex();
GetParticles(lev)[std::make_pair(grid_id, tile_id)];
}
+#endif
#ifdef _OPENMP
-#pragma omp parallel
+#pragma omp parallel if (not WarpX::serialize_ics)
#endif
{
std::array<Real,PIdx::nattribs> attribs;
@@ -474,8 +476,8 @@ PhysicalParticleContainer::Evolve (int lev,
long ngRho = (rho) ? rho->nGrow() : 0;
- long ngRhoDeposit = (WarpX::use_filter) ? ngRho : ngRho + 1;
- long ngJDeposit = (WarpX::use_filter) ? ngJ : ngJ + 1;
+ long ngRhoDeposit = (WarpX::use_filter) ? ngRho +1 : ngRho;
+ long ngJDeposit = (WarpX::use_filter) ? ngJ +1 : ngJ;
BL_ASSERT(OnSameGrids(lev,Ex));