Display position of attractors

This commit is contained in:
Anthony Scemama 2010-06-25 09:58:53 +02:00
parent 3ef75ef8b8
commit 94ac846d36
1 changed files with 12 additions and 1 deletions

View File

@ -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