From 414ce3e0ecc10817bd9fd90fdb5646aebe827e7e Mon Sep 17 00:00:00 2001 From: tradke Date: Tue, 18 Jun 2002 13:12:28 +0000 Subject: Use the generic routines sqrt(), sin(), cos(), etc. instead of double-precision ones dsqrt(), dsin(), dcos(), detc. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/Extract/trunk@59 5301f0c2-dbc4-4cee-b2f5-8d7afba4d129 --- src/D2_extract.F | 38 +++++++++++++++++++------------------- src/Extract.F | 10 +++++----- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/D2_extract.F b/src/D2_extract.F index 780fe19..ca832f5 100644 --- a/src/D2_extract.F +++ b/src/D2_extract.F @@ -115,7 +115,7 @@ c ------------------ c Calculate ADM mass using standard formula DO j = 2, Np+1 DO i = 2, Nt+1 - temp(i,j) = ADMmass_int1(i-1,j-1)*DSIN(theta(i-1)) + temp(i,j) = ADMmass_int1(i-1,j-1)*SIN(theta(i-1)) ENDDO ENDDO ADMmass(1) = sphere_int(temp,igrid,Nt+1,Np+1,Dt,Dp) @@ -126,7 +126,7 @@ c Calculate ADM mass using standard formula c Calculate ADM mass using conformal formula DO j = 2, Np+1 DO i = 2, Nt+1 - temp(i,j) = ADMmass_int2(i-1,j-1)*DSIN(theta(i-1)) + temp(i,j) = ADMmass_int2(i-1,j-1)*SIN(theta(i-1)) ENDDO ENDDO ADMmass(2) = sphere_int(temp,igrid,Nt+1,Np+1,Dt,Dp) @@ -139,21 +139,21 @@ c ------------------ DO j = 2, Np+1 DO i = 2, Nt+1 - temp(i,j) = momentum_int1(i-1,j-1)*DSIN(theta(i-1)) + temp(i,j) = momentum_int1(i-1,j-1)*SIN(theta(i-1)) ENDDO ENDDO momentum(1) = sphere_int(temp,igrid,Nt+1,Np+1,Dt,Dp) DO j = 2, Np+1 DO i = 2, Nt+1 - temp(i,j) = momentum_int2(i-1,j-1)*DSIN(theta(i-1)) + temp(i,j) = momentum_int2(i-1,j-1)*SIN(theta(i-1)) ENDDO ENDDO momentum(2) = sphere_int(temp,igrid,Nt+1,Np+1,Dt,Dp) DO j = 2, Np+1 DO i = 2, Nt+1 - temp(i,j) = momentum_int3(i-1,j-1)*DSIN(theta(i-1)) + temp(i,j) = momentum_int3(i-1,j-1)*SIN(theta(i-1)) ENDDO ENDDO momentum(3) = sphere_int(temp,igrid,Nt+1,Np+1,Dt,Dp) @@ -166,21 +166,21 @@ c -------------- DO j = 2, Np+1 DO i = 2, Nt+1 - temp(i,j) = spin_int1(i-1,j-1)*DSIN(theta(i-1)) + temp(i,j) = spin_int1(i-1,j-1)*SIN(theta(i-1)) ENDDO ENDDO spin(1) = sphere_int(temp,igrid,Nt+1,Np+1,Dt,Dp) DO j = 2, Np+1 DO i = 2, Nt+1 - temp(i,j) = spin_int2(i-1,j-1)*DSIN(theta(i-1)) + temp(i,j) = spin_int2(i-1,j-1)*SIN(theta(i-1)) ENDDO ENDDO spin(2) = sphere_int(temp,igrid,Nt+1,Np+1,Dt,Dp) DO j = 2, Np+1 DO i = 2, Nt+1 - temp(i,j) = spin_int3(i-1,j-1)*DSIN(theta(i-1)) + temp(i,j) = spin_int3(i-1,j-1)*SIN(theta(i-1)) ENDDO ENDDO spin(3) = sphere_int(temp,igrid,Nt+1,Np+1,Dt,Dp) @@ -196,7 +196,7 @@ c ------------------------------------------------------------------ c ... g00 DO j = 2, Np+1 DO i = 2, Nt+1 - temp(i,j) = g00(i-1,j-1)*DSIN(theta(i-1)) + temp(i,j) = g00(i-1,j-1)*SIN(theta(i-1)) ENDDO ENDDO dtaudt = sqrt(one/(four*Pi)*sphere_int(temp,igrid,Nt+1,Np+1,Dt,Dp)) @@ -204,7 +204,7 @@ c ... g00 c ... g11 DO j = 2, Np+1 DO i = 2, Nt+1 - temp(i,j) = g11(i-1,j-1)*DSIN(theta(i-1)) + temp(i,j) = g11(i-1,j-1)*SIN(theta(i-1)) ENDDO ENDDO sph_g11 = one/(four*Pi)*sphere_int(temp,igrid,Nt+1,Np+1,Dt,Dp) @@ -212,7 +212,7 @@ c ... g11 c ... g22 DO j = 2, Np+1 DO i = 2, Nt+1 - temp(i,j) = g22(i-1,j-1)*DSIN(theta(i-1)) + temp(i,j) = g22(i-1,j-1)*SIN(theta(i-1)) ENDDO ENDDO sph_g22 = one/(four*Pi)*sphere_int(temp,igrid,Nt+1,Np+1,Dt,Dp) @@ -220,7 +220,7 @@ c ... g22 c ... dg22 DO j = 2, Np+1 DO i = 2, Nt+1 - temp(i,j) = dg22(i-1,j-1)*DSIN(theta(i-1)) + temp(i,j) = dg22(i-1,j-1)*SIN(theta(i-1)) ENDDO ENDDO sph_dg22 = one/(four*Pi)*sphere_int(temp,igrid,Nt+1,Np+1,Dt,Dp) @@ -229,7 +229,7 @@ c ... dg22 c ... g33/sin(theta)**2 DO j = 2, Np+1 DO i = 2, Nt+1 - temp(i,j) = g33(i-1,j-1)/DSIN(theta(i-1)) + temp(i,j) = g33(i-1,j-1)/SIN(theta(i-1)) ENDDO ENDDO sph_g33 = one/(four*Pi)*sphere_int(temp,igrid,Nt+1,Np+1,Dt,Dp) @@ -263,7 +263,7 @@ c temp(i,j) = g22(i-1,j-1)*SIN(theta(i-1)) rsch2= one/(four*Pi)*sphere_int(temp,igrid,Nt+1,Np+1,Dt,Dp) - rsch = DSQRT(rsch2) + rsch = SQRT(rsch2) c ------------------------------------------------------------------ @@ -866,12 +866,12 @@ c Local variables c ------------------------------------------------------------------ - Pi = DACOS(-one) + Pi = ACOS(-one) rl = DBLE(l) rm = DBLE(m) - cot_theta = DCOS(theta)/DSIN(theta) + cot_theta = COS(theta)/SIN(theta) CALL spherical_harmonic(l+1,m,theta,phi,Yplus) @@ -884,8 +884,8 @@ c Find Y ... c Find Y1 ... DO i = 1,2 - Y1(i) = -(rl+one)*cot_theta*Y(i)+Yplus(i)/DSIN(theta)* - & DSQRT(((rl+one)**2-rm**2)*(rl+half)/(rl+one+half)) + Y1(i) = -(rl+one)*cot_theta*Y(i)+Yplus(i)/SIN(theta)* + & SQRT(((rl+one)**2-rm**2)*(rl+half)/(rl+one+half)) ENDDO @@ -898,7 +898,7 @@ c Find Y2 ... c Find Y3 ... DO i = 1,2 - Y3(i) = -two*cot_theta*Y1(i)+(two*rm*rm/(DSIN(theta)**2) + Y3(i) = -two*cot_theta*Y1(i)+(two*rm*rm/(SIN(theta)**2) & -rl*(rl+one))*Y(i) ENDDO diff --git a/src/Extract.F b/src/Extract.F index e7d9f56..1ea5e86 100644 --- a/src/Extract.F +++ b/src/Extract.F @@ -262,15 +262,15 @@ c ------------------------------------------------------------------ r_max = MIN(xmax-two*Dx-orig(1), & ymax-two*Dy-orig(2), & zmax-two*Dz-orig(3), - & DABS(xmin+two*Dx-orig(1)), - & DABS(ymin+two*Dy-orig(2))) + & ABS(xmin+two*Dx-orig(1)), + & ABS(ymin+two*Dy-orig(2))) ELSE r_max = MIN(xmax-two*Dx-orig(1), & ymax-two*Dy-orig(2), & zmax-two*Dz-orig(3), - & DABS(xmin+two*Dx-orig(1)), - & DABS(ymin+two*Dy-orig(2)), - & DABS(zmin+two*Dz-orig(3))) + & ABS(xmin+two*Dx-orig(1)), + & ABS(ymin+two*Dy-orig(2)), + & ABS(zmin+two*Dz-orig(3))) END IF -- cgit v1.2.3