aboutsummaryrefslogtreecommitdiff
path: root/Source/Python/WarpXWrappers.cpp
diff options
context:
space:
mode:
authorGravatar Dave Grote <grote1@llnl.gov> 2019-06-14 16:26:47 -0700
committerGravatar Dave Grote <grote1@llnl.gov> 2019-06-14 16:26:47 -0700
commitee5dbceb99e5498250be3ef5db919518bd6783f3 (patch)
tree37995ee440a6b514bc63d27d3f96d3dde178093b /Source/Python/WarpXWrappers.cpp
parent771a6966692d27af1d8f002afb7e12b4fc9c94fe (diff)
downloadWarpX-ee5dbceb99e5498250be3ef5db919518bd6783f3.tar.gz
WarpX-ee5dbceb99e5498250be3ef5db919518bd6783f3.tar.zst
WarpX-ee5dbceb99e5498250be3ef5db919518bd6783f3.zip
Updated Python interface, adding WarpInterface
Diffstat (limited to 'Source/Python/WarpXWrappers.cpp')
-rw-r--r--Source/Python/WarpXWrappers.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Python/WarpXWrappers.cpp b/Source/Python/WarpXWrappers.cpp
index 10e5ed8dd..3ed4830f5 100644
--- a/Source/Python/WarpXWrappers.cpp
+++ b/Source/Python/WarpXWrappers.cpp
@@ -20,11 +20,11 @@ namespace
*shapes = (int*) malloc(shapesize * (*num_boxes) * sizeof(int));
double** data = (double**) malloc((*num_boxes) * sizeof(double*));
- int i = 0;
#ifdef _OPENMP
#pragma omp parallel
#endif
- for ( amrex::MFIter mfi(mf, false); mfi.isValid(); ++mfi, ++i ) {
+ for ( amrex::MFIter mfi(mf, false); mfi.isValid(); ++mfi ) {
+ int i = mfi.LocalIndex();
data[i] = (double*) mf[mfi].dataPtr();
for (int j = 0; j < AMREX_SPACEDIM; ++j) {
(*shapes)[shapesize*i+j] = mf[mfi].box().length(j);