diff options
author | allen <allen@89daf98e-ef62-4674-b946-b8ff9de2216c> | 1999-09-24 08:57:07 +0000 |
---|---|---|
committer | allen <allen@89daf98e-ef62-4674-b946-b8ff9de2216c> | 1999-09-24 08:57:07 +0000 |
commit | 27d6f112a588ddaeb048c0c5f992e9c6d18e033d (patch) | |
tree | 1606720b430f0e72c624db2805a4632a6c03c331 /src | |
parent | 44673801ab613c6a99e9fa81ae297f2616f91c4e (diff) |
Removed ' in comments for preprocessor, removed ifdef MPIs, fixed
couple of compiler complaints
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinder/trunk@13 89daf98e-ef62-4674-b946-b8ff9de2216c
Diffstat (limited to 'src')
-rw-r--r-- | src/AHFinder.F | 25 | ||||
-rw-r--r-- | src/AHFinder_calcsigma.F | 10 | ||||
-rw-r--r-- | src/AHFinder_dat.F | 7 | ||||
-rw-r--r-- | src/AHFinder_exp.F | 11 | ||||
-rw-r--r-- | src/AHFinder_fun.F | 10 | ||||
-rw-r--r-- | src/AHFinder_gau.F | 16 | ||||
-rw-r--r-- | src/AHFinder_int.F | 27 | ||||
-rw-r--r-- | src/AHFinder_leg.F | 6 | ||||
-rw-r--r-- | src/AHFinder_mask.F | 2 | ||||
-rw-r--r-- | src/AHFinder_min.F | 2 | ||||
-rw-r--r-- | src/AHFinder_pow.F | 6 |
11 files changed, 43 insertions, 79 deletions
diff --git a/src/AHFinder.F b/src/AHFinder.F index 4384066..53cbd3b 100644 --- a/src/AHFinder.F +++ b/src/AHFinder.F @@ -18,7 +18,6 @@ c Note thadmcevol_onpunc_0.250_128_neu2_drop/at including cactus.h will also inc implicit none - DECLARE_CCTK_FARGUMENTS DECLARE_CCTK_PARAMETERS @@ -351,9 +350,7 @@ c Note thadmcevol_onpunc_0.250_128_neu2_drop/at including cactus.h will also inc ! if (logfile.and.(myproc.eq.0)) then if (.false.) then if (logfile) then -#ifdef MPI if (myproc.eq.0) then -#endif open(1,file=logf,form='formatted',status='replace') write(1,*) write(1,*) 'LOG FILE FOR MINIMIZATION APPARENT HORIZON FINDER' @@ -363,9 +360,7 @@ c Note thadmcevol_onpunc_0.250_128_neu2_drop/at including cactus.h will also inc write(1,*) 'finder was called.' write(1,*) close(1) -#ifdef MPI end if -#endif end if endif @@ -821,7 +816,7 @@ c Note thadmcevol_onpunc_0.250_128_neu2_drop/at including cactus.h will also inc ! consistent with zero. ! ! 3) The integral of the square of the expansion at the surface -! must be smaller by a factor of `small2' than the same +! must be smaller by a factor of "small2" than the same ! integral slightly outside and slightly inside. horizon = .true. @@ -910,9 +905,7 @@ c Note thadmcevol_onpunc_0.250_128_neu2_drop/at including cactus.h will also inc end if ! Messages to screen. -#ifdef MPI if (myproc.eq.0) then -#endif ! Open logfile. if (logfile) then @@ -921,7 +914,7 @@ c Note thadmcevol_onpunc_0.250_128_neu2_drop/at including cactus.h will also inc end if ! Surface information. Notice that here I define -! the surface `mass' as: +! the surface "mass" as: ! ! M = sqrt( A / (16 pi) ) = 0.141047396 sqrt(A) @@ -1178,15 +1171,11 @@ c Note thadmcevol_onpunc_0.250_128_neu2_drop/at including cactus.h will also inc write(1,*) close(1) end if -#ifdef MPI end if -#endif ! No surface found. else -#ifdef MPI if (myproc.eq.0) then -#endif ! Open logfile. if (logfile) then @@ -1219,18 +1208,14 @@ c Note thadmcevol_onpunc_0.250_128_neu2_drop/at including cactus.h will also inc end if endif end if -#ifdef MPI end if -#endif ! **************************** ! *** WRITE DATA FILES *** ! **************************** if (.false.) then -#ifdef MPI if (myproc.eq.0) then -#endif c Expansion coefficients. if (ahf_ncall.eq.1) then @@ -1366,9 +1351,7 @@ c Expansion coefficients. end if if (status) write(1,"(2ES14.6)") cctk_time,meri_p2 close(1) -#ifdef MPI end if -#endif ! modified endif ! end modified @@ -1421,7 +1404,7 @@ c Expansion coefficients. if (ahf_3Doutput.ne.0) then ! This is commented out because I still need -! to write the c routine `AHFinder_3dio'. +! to write the c routine "AHFinder_3dio". ! call AHFinder_2dio(ahfgrid,ahf_ncall) ! call AHFinder_2dio(ahf_exp,ahf_ncall) @@ -1449,10 +1432,8 @@ c Expansion coefficients. ahmask = one end if -#ifdef MPI ! call synconefunc(ahmask) call CCTK_SyncGroup(cctkGH,"ahfinder::ahfmask") -#endif ! ************************************************** ! *** TRANSFORM PHYSICAL TO CONFORMAL METRIC *** diff --git a/src/AHFinder_calcsigma.F b/src/AHFinder_calcsigma.F index 1cfaf9b..a3b84ab 100644 --- a/src/AHFinder_calcsigma.F +++ b/src/AHFinder_calcsigma.F @@ -74,7 +74,9 @@ c Note that including cactus.h will also include AHFinder.h ! Calculate quantities in spherical coordinates. er = sqrt(xp**2 + yp**2 + zp**2) - if (er .eq. 0.d0) stop 'r=0 in AHFinder_calcsigma' + if (er .eq. 0.d0) then + call CCTK_WARN(0,'r=0 in AHFinder_calcsigma') + end if C ********PATCH****************************************** C Keep away from the z-axis, artificially. @@ -111,7 +113,7 @@ C Other l>0. C Initialize m = l: C c1 = sqrt(2l+1) * sqrt(2l!) / 2^l / l! C Y_ll = c1 * sin(theta)^l -C Y_ll' = c1 * l * sin(theta)^(l-1) * costheta +C Y_llp = c1 * l * sin(theta)^(l-1) * costheta m = l prod = - prod * sqrt(dble(2*l-1) / dble(2*l)) c1 = sqrt(dble(2*l+1)) * prod @@ -122,7 +124,7 @@ C Recursion relations for the other m: C c2 = sqrt[(2l+1)(2l-1)/(l^2-m^2)] C c3 = sqrt[((l-1)^2-m^2)(2l=1)/(l^2-m^2)/(2l-3)] C Y_lm = c2 Y_l-1,m cos(theta) + c3 Y_l-2,m -C Y_lm' = c2 Y_l-1,m' cos(theta) + c2 Y_l-1,m + c3 Y_l-2,m' +C Y_lmp = c2 Y_l-1,mp cos(theta) + c2 Y_l-1,m + c3 Y_l-2,mp m = l-1 c2 = sqrt(dble((2*l+1)*(2*l-1)) $ / dble(l**2-m**2)) @@ -168,7 +170,7 @@ C to the basis cos/sin(mphi). end do else C See above for a patch that avoids ever getting here. - stop 'ylmder2 cannot handle axis' + call CCTK_WARN(0,'ylmder2 cannot handle axis') C For x = y = 0 the following are not defined. ! cosphi = 7.d77 ! sinphi = 7.d77 diff --git a/src/AHFinder_dat.F b/src/AHFinder_dat.F index c765baf..4bcce98 100644 --- a/src/AHFinder_dat.F +++ b/src/AHFinder_dat.F @@ -35,7 +35,6 @@ c@@*/ integer nprocs,myproc integer ierr - CCTK_REAL dx,dy,dz CCTK_REAL xc,yc,zc CCTK_REAL xc_old,yc_old,zc_old CCTK_REAL intexp,intexp2,intexpdel2,intarea @@ -116,9 +115,9 @@ c@@*/ ! cc(l,m) Coefficients of LEGEN(l,m,cos(theta))*cos(m*phi) ! cs(l,m) Coefficients of LEGEN(l,m,cos(theta))*sin(m*phi) ! -! hflow* Spectral components for `H' flow. -! cflow* Spectral components for `C' flow. -! nflow* Spectral components for `N' flow. +! hflow* Spectral components for "H" flow. +! cflow* Spectral components for "C" flow. +! nflow* Spectral components for "N" flow. ! ! interror1 Different from zero if radius is negative. ! interror2 Different from zero if outside computational domain. diff --git a/src/AHFinder_exp.F b/src/AHFinder_exp.F index ada292c..2c079bb 100644 --- a/src/AHFinder_exp.F +++ b/src/AHFinder_exp.F @@ -135,7 +135,7 @@ c Note that including cactus.h will also include AHFinder.h kdxz = kxz(i,j,k) kdyz = kyz(i,j,k) -! Find D's using finite differences. +! Find Ds using finite differences. ddxxx = idx*(gxx(i+1,j,k) - gxx(i-1,j,k)) ddxyy = idx*(gyy(i+1,j,k) - gyy(i-1,j,k)) @@ -307,18 +307,15 @@ c Note that including cactus.h will also include AHFinder.h ahf_exp(i,j,k) = T1 + T2 - T3 - T4 -! Check for NaN's. +! Check for NaNs. if (ahf_exp(i,j,k).ge.zero) then else if (ahf_exp(i,j,k).lt.zero) then else -#ifdef MPI + if (myproc.eq.0) then -#endif write(*,*) 'NaN in ahf_exp at point',i,j,k -#ifdef MPI end if -#endif STOP end if @@ -412,7 +409,6 @@ c Note that including cactus.h will also include AHFinder.h ! Synchronize. -#ifdef MPI call CCTK_SyncGroup(cctkGH,"ahfinder::ahfgradient") call CCTK_SyncGroup(cctkGH,"ahfinder::ahfindergrid") ! call synconefunc(ahf_exp) @@ -420,7 +416,6 @@ c Note that including cactus.h will also include AHFinder.h ! call synconefunc(ahfgrady) ! call synconefunc(ahfgradz) ! call synconefunc(ahfgradn) -#endif ! *************** ! *** END *** diff --git a/src/AHFinder_fun.F b/src/AHFinder_fun.F index edff9c4..0acafd3 100644 --- a/src/AHFinder_fun.F +++ b/src/AHFinder_fun.F @@ -133,18 +133,15 @@ c Note that including cactus.h will also include AHFinder.h ahfgrid(i,j,k) = rp - aux1 -! Check for NaN's. +! Check for NaNs. if (ahfgrid(i,j,k).ge.zero) then else if (ahfgrid(i,j,k).lt.zero) then else -#ifdef MPI + if (myproc.eq.0) then -#endif write(*,*) 'NaN in ahfgrid at point',i,j,k -#ifdef MPI end if -#endif STOP end if @@ -154,10 +151,7 @@ c Note that including cactus.h will also include AHFinder.h ! Synchronize. -#ifdef MPI -! call synconefunc(ahfgrid) call CCTK_SyncGroup(cctkGH,"ahfinder::ahfindergrid") -#endif ! *************** ! *** END *** diff --git a/src/AHFinder_gau.F b/src/AHFinder_gau.F index 72c4359..3261bc7 100644 --- a/src/AHFinder_gau.F +++ b/src/AHFinder_gau.F @@ -7,7 +7,7 @@ c Find gaussian curvature of surface. The gaussian c curvature is defined as -R/2, where R is the Ricci c scalar of the induced 2-geometry of the surface. c -c As an extra `goody', this routine also integrates +c As an extra "goody", this routine also integrates c the equatorial circumference of the horizon and c two polar circumferences at phi=0 and phi=pi/2. c @enddesc @@ -38,7 +38,6 @@ c Note that including cactus.h will also include AHFinder.h integer gxx_index,gyy_index,gzz_index,gxy_index,gxz_index,gyz_index integer ahfgauss_index integer handle,x_index,y_index,z_index - CCTK_INT ierror CCTK_REAL maxval(3),minval(3) INTEGER istat @@ -303,8 +302,7 @@ c Note that including cactus.h will also include AHFinder.h dphi = 0.25D0*dphi else if (refx) then dphi = half*dphi - print *, 'This combination of symmetries has not' - print *, 'been properly implemented yet!' + call CCTK_INFO('This combination of symmetries has not been properly implemented yet!') else if (refy) then dphi = half*dphi end if @@ -485,10 +483,10 @@ c Note that including cactus.h will also include AHFinder.h ! Synchronize. -#ifdef MPI + call CCTK_SyncGroup(cctkGH,"ahfinder::ahfinder_gauss") ! call synconefunc(ahfgauss) -#endif + ! ************************************* ! *** FIND INTERPOLATING POINTS *** @@ -530,7 +528,7 @@ c Note that including cactus.h will also include AHFinder.h ! Notice how the sum over m is first. This will allow ! me to use the recursion relations to avoid having to ! start from scratch every time. Also, I sum over all -! l's even if I don't want some terms. This is +! l s even if I do not want some terms. This is ! because in order to use the recursion relations I ! need all polynomials. @@ -593,14 +591,12 @@ c Note that including cactus.h will also include AHFinder.h ! below). #ifdef MPI - call mpi_allreduce(error1,i,1,MPI_INTEGER, . MPI_SUM,MPI_COMM_WORLD,ierror) error1 = i call mpi_allreduce(error2,i,1,MPI_INTEGER, . MPI_SUM,MPI_COMM_WORLD,ierror) error2 = i - #endif ! If there was an error then return from the subroutine @@ -818,7 +814,7 @@ c Note that including cactus.h will also include AHFinder.h ! This was the old calculation of the gaussian curvature. ! It is correct as far as I know, but it depends on taking ! second derivatives of the interpolated metric, and this -! seems not to behave well numerically. I didn't want to +! seems not to behave well numerically. I did not want to ! delete the code since it might be useful in the future, ! so I just jump over it. diff --git a/src/AHFinder_int.F b/src/AHFinder_int.F index 7367d13..83e73cb 100644 --- a/src/AHFinder_int.F +++ b/src/AHFinder_int.F @@ -11,8 +11,6 @@ c the case, I use less processors). c @enddesc c@@*/ -c Note that including cactus.h will also include AHFinder.h -!#include "cactus.h" #include "cctk.h" #include "cctk_parameters.h" #include "cctk_arguments.h" @@ -236,8 +234,7 @@ c Note that including cactus.h will also include AHFinder.h if (refx.and.refy) then dphi = quarter*dphi else if (refx) then - print *, 'This combination of symmetries has not' - print *, 'been properly implemented yet!' + call CCTK_INFO('This combination of symmetries has not been properly implemented yet!') else if (refy) then dphi = half*dphi end if @@ -283,14 +280,14 @@ c Note that including cactus.h will also include AHFinder.h else if (aux.eq.int(aux)) then -! `nprocs' is the square of an integer. +! "nprocs" is the square of an integer. npt = int(aux) npp = int(aux) else -! Check if `nprocs' is a power of two. +! Check if "nprocs" is a power of two. l = 1 m = 1 @@ -312,18 +309,18 @@ c Note that including cactus.h will also include AHFinder.h end do -! `nprocs' is a power of two. +! "nprocs" is a power of two. if (l*m.eq.nprocs) then npt = l npp = m -! `nprocs' is not a power of two. This is where I +! "nprocs" is not a power of two. This is where I ! would need to do something clever. At the moment, ! I will just use fewer processors. The number of ! processors I use is the power of two or the square -! of an integer that is closest to `nprocs'. +! of an integer that is closest to "nprocs". else @@ -339,7 +336,7 @@ c Note that including cactus.h will also include AHFinder.h end if ! Figure out the number of grid points per processor, -! and the `origin' for a given processor. +! and the "origin" for a given processor. if (myproc.ge.npt*npp) then @@ -359,10 +356,10 @@ c Note that including cactus.h will also include AHFinder.h l_ntheta = ntheta/npt l_nphi = nphi/npp -! And take the `origin' as the corresponding displacement +! And take the "origin" as the corresponding displacement ! from the real origin. Notice that mod(myproc,npt) -! tells my on which `theta' bin I am, while myproc/npt -! tells me on which `phi' bin I am. +! tells my on which "theta" bin I am, while myproc/npt +! tells me on which "phi" bin I am. i = mod(myproc,npt) j = myproc/npt @@ -509,7 +506,7 @@ c Note that including cactus.h will also include AHFinder.h ! Notice how the sum over m is first. This will allow ! me to use the recursion relations to avoid having to ! start from scratch every time. Also, I sum over all -! l's even if I don't want some terms. This is +! l s even if I do not want some terms. This is ! because in order to use the recursion relations I ! need all polynomials. @@ -831,7 +828,7 @@ c Note that including cactus.h will also include AHFinder.h intw = half*intw end if -! Find `sigma' for Nakamura flow (see Carsten's paper). +! Find "sigma" for Nakamura flow (see Carstens paper). if (nw.eq.0.0) then sigma = zero diff --git a/src/AHFinder_leg.F b/src/AHFinder_leg.F index 2297bb7..4f4003f 100644 --- a/src/AHFinder_leg.F +++ b/src/AHFinder_leg.F @@ -54,12 +54,12 @@ c@@*/ ! *** HARDWIRE FIRST FEW POLYNOMIALS FOR M=0 *** ! ************************************************* -! Notice that it doesn't make sense to go much higher +! Notice that it does not make sense to go much higher ! than L=12 since the explicit expressions for the ! polynomials have large terms with alternating signs, ! so for high L we rapidly loose accuracy in the sum. ! The method from Numerical Recipes that comes below -! is slow, but doesn't have this problem. +! is slow, but does not have this problem. Y = X**2 @@ -271,7 +271,7 @@ c@@*/ ! functions f _lm are such that: ! ! / -! | f_lm f_l'm' sin(theta) dtheta dphi = 4 pi delta_mm' delta_ll' +! | f_lm f_l;mp sin(theta) dtheta dphi = 4 pi delta_mm' delta_ll' ! / ! ! Notice the extra factor of 4 pi. This is there because diff --git a/src/AHFinder_mask.F b/src/AHFinder_mask.F index 9fec702..5e71b3c 100644 --- a/src/AHFinder_mask.F +++ b/src/AHFinder_mask.F @@ -16,7 +16,7 @@ c Note that including cactus.h will also include AHFinder.h subroutine AHFinder_mask(CCTK_FARGUMENTS) ! Set up the horizon mask. All this routine does is -! set up the value of the grid function `ahmask' to +! set up the value of the grid function "ahmask" to ! one for points outside the horizon, and to zero ! for points inside the horizon. This is only necessary ! if we want to use black hole excision. diff --git a/src/AHFinder_min.F b/src/AHFinder_min.F index 0a5e55e..5a522bd 100644 --- a/src/AHFinder_min.F +++ b/src/AHFinder_min.F @@ -240,7 +240,7 @@ c Note that including cactus.h will also include AHFinder.h ! If no minimum was found, it might still be because ! there were to many iterations, in which case there -! is a minimum, we just didn't converge to it in the +! is a minimum, we just did not converge to it in the ! maximum number of iterations allowed. else diff --git a/src/AHFinder_pow.F b/src/AHFinder_pow.F index 00e1e17..1b0f5e4 100644 --- a/src/AHFinder_pow.F +++ b/src/AHFinder_pow.F @@ -57,8 +57,8 @@ c Note that including cactus.h will also include AHFinder.h ! function value at P, and ITER is the number of iterations taken. ! ! Extra output added by myself (Miguel Alcubierre) is a logical -! variable `found' that is set to true is a minimum was indeed -! found, and to false if it wasn't. +! variable "found" that is set to true is a minimum was indeed +! found, and to false if it was not. use AHFinder_dat @@ -421,7 +421,7 @@ c Note that including cactus.h will also include AHFinder.h U = XB - ((XB-XC)*Q - (XB-XA)*S) . / (2.0D0*SIGN(MAX(DABS(Q-S),TINY),Q-S)) -! We won't go further than this. +! We will not go further than this. ULIM = XB + GLIMIT*(XC-XB) |