aboutsummaryrefslogtreecommitdiff
path: root/src/AHFinder_gau.F
diff options
context:
space:
mode:
authormiguel <miguel@89daf98e-ef62-4674-b946-b8ff9de2216c>2001-01-04 21:25:55 +0000
committermiguel <miguel@89daf98e-ef62-4674-b946-b8ff9de2216c>2001-01-04 21:25:55 +0000
commit8096fdddc9feb81b0eb40e8cc41880d5812b2820 (patch)
tree4bb154aefe4d80e30982c4447e512a8710ad6721 /src/AHFinder_gau.F
parent67fb69d4af836f778b9c4fb4c5e57315a602495e (diff)
Trying to fix the testsuite in the t3e. The flow algorithm passes, but the
minimization still fails. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinder/trunk@164 89daf98e-ef62-4674-b946-b8ff9de2216c
Diffstat (limited to 'src/AHFinder_gau.F')
-rw-r--r--src/AHFinder_gau.F61
1 files changed, 33 insertions, 28 deletions
diff --git a/src/AHFinder_gau.F b/src/AHFinder_gau.F
index 06246f5..f0e6795 100644
--- a/src/AHFinder_gau.F
+++ b/src/AHFinder_gau.F
@@ -28,11 +28,12 @@
logical firstgau
logical firstcal(4)
-
- integer handle,sum_handle
+
integer i,j,k,l,m,n,p
integer npoints
- integer error1,error2,ierror
+
+ CCTK_INT rerror,error1,error2
+ CCTK_INT handle,sum_handle,ierror
CCTK_REAL LEGEN
CCTK_REAL theta,phi,xp,yp,zp,rp
@@ -301,6 +302,12 @@
end if
+! Initialize circumferences.
+
+ circ_eq = zero
+ meri_p1 = zero
+ meri_p2 = zero
+
! *******************************************************
! *** FIND GAUSSIAN CURVATURE AS 3D GRID FUNCTION ***
@@ -576,21 +583,21 @@
! know about this since all will participate on the interpolation
! below).
- call CCTK_ReduceLocalScalar(ierror, cctkGH, -1, sum_handle,
- . error1, i, CCTK_VARIABLE_INT)
+ call CCTK_ReduceLocalScalar(ierror,cctkGH,-1,sum_handle,
+ . error1,rerror,CCTK_VARIABLE_INT)
if (ierror.ne.0) then
- call CCTK_WARN(1,"Reduction failed!");
+ call CCTK_WARN(1,"Reduction failed!")
end if
- error1 = i
+ error1 = rerror
- call CCTK_ReduceLocalScalar(ierror, cctkGH, -1, sum_handle,
- . error2, i, CCTK_VARIABLE_INT)
+ call CCTK_ReduceLocalScalar(ierror,cctkGH,-1,sum_handle,
+ . error2,rerror,CCTK_VARIABLE_INT)
if (ierror.ne.0) then
- call CCTK_WARN(1,"Reduction failed!");
+ call CCTK_WARN(1,"Reduction failed!")
end if
- error2 = i
+ error2 = rerror
! If there was an error then return from the subroutine
! (but remember to deallocate the arrays first!).
@@ -649,7 +656,7 @@
! *** FIND SPHERICAL METRIC ***
! *********************************
- if (myproc.eq.zero) then
+ if (myproc.eq.0) then
do j=0,nphi
do i=0,ntheta
@@ -735,16 +742,14 @@
end do
end do
+ end if
-! ************************************
-! *** CALCULATE CIRCUMFERENCES ***
-! ************************************
-! Find length of equator and meridians
+! ************************************
+! *** CALCULATE CIRCUMFERENCES ***
+! ************************************
- circ_eq = zero
- meri_p1 = zero
- meri_p2 = zero
+ if (myproc.eq.0) then
! Equatorial circumference.
@@ -752,7 +757,7 @@
do j=0,nphi-1
circ_eq = circ_eq + dphi
- . *dsqrt(dabs(half*(g22(ntheta,j) + g22(ntheta,j+1))))
+ . *dsqrt(dabs(half*(g22(ntheta,j) + g22(ntheta,j+1))))
end do
else
@@ -766,17 +771,17 @@
else
do j=0,nphi-1
circ_eq = circ_eq + dphi
- . *((one-aux)*dsqrt(dabs(half*(g22(i,j) + g22(i,j+1))))
- . + aux*dsqrt(dabs(half*(g22(i+1,j) + g22(i+1,j+1)))))
+ . *((one-aux)*dsqrt(dabs(half*(g22(i,j) + g22(i,j+1))))
+ . + aux*dsqrt(dabs(half*(g22(i+1,j) + g22(i+1,j+1)))))
end do
end if
end if
-! Meridians
+! Meridians.
do i=0,ntheta-1
meri_p1 = meri_p1 + dtheta
- . *dsqrt(dabs(half*(g11(i,0) + g11(i+1,0))))
+ . *dsqrt(dabs(half*(g11(i,0) + g11(i+1,0))))
end do
if (cartoon) then
@@ -784,7 +789,7 @@
else if (refx.and.refy) then
do i=0,ntheta-1
meri_p2 = meri_p2 + dtheta
- . *dsqrt(dabs(half*(g11(i,nphi) + g11(i+1,nphi))))
+ . *dsqrt(dabs(half*(g11(i,nphi) + g11(i+1,nphi))))
end do
else
aux = half*pi/dphi
@@ -792,8 +797,8 @@
aux = aux - int(aux)
do i=0,ntheta-1
meri_p2 = meri_p2 + dtheta
- . *((one-aux)*dsqrt(dabs(half*(g11(i,j) + g11(i,j))))
- . + aux*dsqrt(dabs(half*(g11(i,j+1) + g11(i,j+1)))))
+ . *((one-aux)*dsqrt(dabs(half*(g11(i,j) + g11(i,j))))
+ . + aux*dsqrt(dabs(half*(g11(i,j+1) + g11(i,j+1)))))
end do
end if
@@ -852,7 +857,7 @@
gamma2 = zero
gammad = zero
- if (myproc.eq.zero) then
+ if (myproc.eq.0) then
! Interior points.