fix pack_index for hilbert filling curve
authorYanhuaSun <sun51@illinois.edu>
Mon, 28 Oct 2013 03:11:31 +0000 (22:11 -0500)
committerYanhuaSun <sun51@illinois.edu>
Mon, 28 Oct 2013 03:11:31 +0000 (22:11 -0500)
src/util/partitioning_strategies.C

index 60ca5e6cb677e3232c280ccd1f4a313489e61c79..d183c34024e9f4d269042f10aeeccb54da2f7c27 100644 (file)
@@ -57,7 +57,7 @@ static int pack_index(vector<int> chunks, int dim) {
   int chunk_size = chunks.size();
   int val = 0;
   for (int i = 0;i < chunk_size; i++) {
-    val += chunks[i] * p;
+      val = val*p + chunks[i] ;
   }
   return val;
 }