diff --git a/tests/BlobAnalyzeParallel.cpp b/tests/BlobAnalyzeParallel.cpp index 8f11293a..cc86a15b 100644 --- a/tests/BlobAnalyzeParallel.cpp +++ b/tests/BlobAnalyzeParallel.cpp @@ -196,9 +196,6 @@ int main(int argc, char **argv) //......................................................................... // Populate the arrays needed to perform averaging if (rank==0) printf("Populate arrays \n"); - // Compute porosity - double porosity,sum,sum_global; - sum=0.0; for (int k=0; k 0.0){ - Dm.id[n]=1; - sum += 1.0; - } - else Dm.id[n]=0; + } } } delete [] DistEven; delete [] DistOdd; + // Compute porosity + double porosity,sum,sum_global; + sum=0.0; + for (int k=1; k 0.0){ + Dm.id[n]=1; + sum += 1.0; + } + else Dm.id[n]=0; + } + } + } MPI_Allreduce(&sum,&sum_global,1,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD); porosity = sum_global/Dm.Volume; if (rank==0) printf("Porosity = %f \n",porosity);