diff options
author | 2017-11-15 08:24:59 -0800 | |
---|---|---|
committer | 2017-11-15 08:24:59 -0800 | |
commit | 0af58798392aa5250475414c9cfd7c882ce2879b (patch) | |
tree | 6a142407d0ed609eab92287c30a93a84ca90e670 /Source/PhysicalParticleContainer.cpp | |
parent | ebf7a53e792841fb446e6a7bf96d81c26b1beaf6 (diff) | |
download | WarpX-0af58798392aa5250475414c9cfd7c882ce2879b.tar.gz WarpX-0af58798392aa5250475414c9cfd7c882ce2879b.tar.zst WarpX-0af58798392aa5250475414c9cfd7c882ce2879b.zip |
Allow compilation for both 3D and 2D
Diffstat (limited to 'Source/PhysicalParticleContainer.cpp')
-rw-r--r-- | Source/PhysicalParticleContainer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/PhysicalParticleContainer.cpp b/Source/PhysicalParticleContainer.cpp index 871dc6a6b..848878f16 100644 --- a/Source/PhysicalParticleContainer.cpp +++ b/Source/PhysicalParticleContainer.cpp @@ -204,7 +204,11 @@ PhysicalParticleContainer::AddPlasma(int lev, RealBox part_realbox ) #endif // If the new particle is not inside the tile box, // go to the next generated particle. - if(!tile_realbox.contains({x, y, z})) continue; +#if ( BL_SPACEDIM == 3 ) + if(!tile_realbox.contains( {x, y, z} )) continue; +#elif ( BL_SPACEDIM == 2 ) + if(!tile_realbox.contains( {x, z} )) continue; +#endif if (plasma_injector->insideBounds(x, y, z)) { Real dens; |