aboutsummaryrefslogtreecommitdiff
path: root/Source/PhysicalParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Andrew Myers <atmyers2@gmail.com> 2017-09-18 20:10:52 -0700
committerGravatar Andrew Myers <atmyers2@gmail.com> 2017-09-18 20:10:52 -0700
commit76388914fbb155b6648b71921eabf703a9b2aba4 (patch)
treeee4df6aaab1085451517ec63a7d179c14ee9697c /Source/PhysicalParticleContainer.cpp
parent87f1371be9703da25902454725e63562cb581572 (diff)
downloadWarpX-76388914fbb155b6648b71921eabf703a9b2aba4.tar.gz
WarpX-76388914fbb155b6648b71921eabf703a9b2aba4.tar.zst
WarpX-76388914fbb155b6648b71921eabf703a9b2aba4.zip
add option to serialize initial condition generation and enable it in the regression tests.
Diffstat (limited to 'Source/PhysicalParticleContainer.cpp')
-rw-r--r--Source/PhysicalParticleContainer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/PhysicalParticleContainer.cpp b/Source/PhysicalParticleContainer.cpp
index 64bddfb00..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;