aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpXWrappers.cpp
diff options
context:
space:
mode:
authorGravatar atmyers <atmyers2@gmail.com> 2017-03-23 10:53:53 -0700
committerGravatar atmyers <atmyers2@gmail.com> 2017-03-23 10:53:53 -0700
commitbe2588a65ccfad3a69f41b548611b18fd4aa5578 (patch)
tree9d6b5b153d26fd204144136cf19537abd71914fe /Source/WarpXWrappers.cpp
parentbe393aed49accfbbb3180dc5868d195f5cd75af9 (diff)
downloadWarpX-be2588a65ccfad3a69f41b548611b18fd4aa5578.tar.gz
WarpX-be2588a65ccfad3a69f41b548611b18fd4aa5578.tar.zst
WarpX-be2588a65ccfad3a69f41b548611b18fd4aa5578.zip
get the num_tiles from the ParticleContainer.
Diffstat (limited to 'Source/WarpXWrappers.cpp')
-rw-r--r--Source/WarpXWrappers.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/Source/WarpXWrappers.cpp b/Source/WarpXWrappers.cpp
index 2df4cb549..782f464ba 100644
--- a/Source/WarpXWrappers.cpp
+++ b/Source/WarpXWrappers.cpp
@@ -117,9 +117,7 @@ extern "C"
auto & myspc = mypc.GetParticleContainer(speciesnumber);
const int level = 0;
-
- WarpXParIter pti(myspc, level);
- *num_tiles = pti.numTiles();
+ *num_tiles = myspc.numLocalTilesAtLevel(level);
*particles_per_tile = (int*) malloc(*num_tiles*sizeof(int));
double** data = (double**) malloc(*num_tiles*sizeof(typename WarpXParticleContainer::ParticleType*));
@@ -138,9 +136,7 @@ extern "C"
auto & myspc = mypc.GetParticleContainer(speciesnumber);
const int level = 0;
-
- WarpXParIter pti(myspc, level);
- *num_tiles = pti.numTiles();
+ *num_tiles = myspc.numLocalTilesAtLevel(level);
*particles_per_tile = (int*) malloc(*num_tiles*sizeof(int));
double** data = (double**) malloc(*num_tiles*sizeof(double*));