aboutsummaryrefslogtreecommitdiff
path: root/src/AHFinder_gau.F
diff options
context:
space:
mode:
authormiguel <miguel@89daf98e-ef62-4674-b946-b8ff9de2216c>2002-10-08 20:43:33 +0000
committermiguel <miguel@89daf98e-ef62-4674-b946-b8ff9de2216c>2002-10-08 20:43:33 +0000
commit9882f6095edcfe85002713856243046620f1df17 (patch)
tree78c075b78b7409dc806b29be0e75f1e70f5a5d5f /src/AHFinder_gau.F
parentca51933e7c9468e7830cdb67c204895a5c1bd001 (diff)
minor cleaning up, plus a stupid fix to a problem with the absoft compiler.
It turns out I needed to change the order of two definitions to stop the damm compiler from inventing a non-existent NaN. &%$#*! git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinder/trunk@316 89daf98e-ef62-4674-b946-b8ff9de2216c
Diffstat (limited to 'src/AHFinder_gau.F')
-rw-r--r--src/AHFinder_gau.F23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/AHFinder_gau.F b/src/AHFinder_gau.F
index 05160c3..28ab392 100644
--- a/src/AHFinder_gau.F
+++ b/src/AHFinder_gau.F
@@ -505,6 +505,7 @@
avgx = 0.0D0
avgy = 0.0D0
+ avgz = 0.0D0
do j=1,nphi+1
do i=1,ntheta+1
@@ -573,9 +574,6 @@
xp = xa(i,j)
yp = ya(i,j)
zp = za(i,j)
-
- avgx = avgx + xp
- avgy = avgy + yp
if ((xp.gt.xmx).or.(xp.lt.xmn).or.
. (yp.gt.ymx).or.(yp.lt.ymn).or.
@@ -583,22 +581,39 @@
error2 = 1
end if
+! Add to sums for average position.
+
+ avgx = avgx + xp
+ avgy = avgy + yp
+ avgz = avgz + zp
+
end do
end do
+! Find position of horizon centroid.
+
avgx = avgx/dble(npoints)
avgy = avgy/dble(npoints)
+ avgz = avgz/dble(npoints)
if ((.not.find3).or.
. (find3.and.(mfind-1.eq.horizon_centroid))) then
+
ahf_centroid_x = avgx
ahf_centroid_y = avgy
+! Take symmetries into account.
+
+ if (refx) ahf_centroid_x = xc
+ if (refy) ahf_centroid_y = yc
+
if (verbose) then
+ write(*,*)
write(6,*) 'AHFinder_gau: ahf_centroid_x = ', ahf_centroid_x
write(6,*) 'AHFinder_gau: ahf_centroid_y = ', ahf_centroid_y
end if
- endif
+
+ end if
! Other processors.