diff --git a/src/grid.irp.f b/src/grid.irp.f index 0c79bb8..16b833b 100644 --- a/src/grid.irp.f +++ b/src/grid.irp.f @@ -393,7 +393,9 @@ recursive subroutine find_attribution(ix,iy,iz,g,a) if (a(ix,iy,iz) == 0.) then current_partition_index += 1. a(ix,iy,iz) = current_partition_index - print '(3I3,2(2X,F10.7))', ix,iy,iz,average,sqrt(variance) + real :: x,y,z + call int_to_cart(ix,iy,iz,x,y,z) + print '(3(2X,F10.7))', x,y,z endif else ! Otherwise, get the partition index of the max value @@ -405,3 +407,12 @@ recursive subroutine find_attribution(ix,iy,iz,g,a) end +subroutine int_to_cart(ix,iy,iz,x,y,z) + implicit none + integer, intent(in) :: ix, iy, iz + real, intent(out) :: x, y, z + x = grid_origin(1)+(ix-1)*grid_step(1) + y = grid_origin(2)+(iy-1)*grid_step(2) + z = grid_origin(3)+(iz-1)*grid_step(3) +end +