From 1f21ec20973e472013ff02dd7966106ef570543b Mon Sep 17 00:00:00 2001
From: Grzegorz Kowal <grzegorz@gkowal.info>
Date: Sun, 5 Dec 2010 10:14:57 -0200
Subject: [PATCH] MESH: use field pos in prolong_block().

---
 src/mesh.F90 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesh.F90 b/src/mesh.F90
index 9542118..0345a35 100644
--- a/src/mesh.F90
+++ b/src/mesh.F90
@@ -894,12 +894,12 @@ module mesh
 !
       pchild => pblock%child(p)%ptr
 
-! calculate the position of child in the parent block
+! obtain the position of child in the parent block
 !
-      is = mod((p - 1)    ,2)
-      js = mod((p - 1) / 2,2)
+      is = pchild%pos(1)
+      js = pchild%pos(2)
 #if NDIMS == 3
-      ks = mod((p - 1) / 4,2)
+      ks = pchild%pos(3)
 #endif /* NDIMS == 3 */
 
 ! calculate indices of the current child subdomain