File:/home/sbrandt/cactus/Cactus/configs/sim2/build/AHFinder/AHFinder_dat.f
1:# 19 "/home/sbrandt/cactus/Cactus/arrangements/EinsteinAnalysis/AHFinder/src/AHFinder_dat.F"
2:      module AHFinder_dat
3:
4:      implicit none
5:
6:      logical firstfun,firstleg,firstint
7:      logical nonaxi,refx,refy,refz,cartoon
8:      logical offset,wander
9:      logical minarea,flow,find_trapped_surface
10:      logical logfile,verbose,veryver,guessverbose
11:      logical interror,guessold
12:      logical find3,sloppy,inner,guess_absmin,manual_guess
13:      logical status_old,status_old_0,status_old_1,status_old_2
14:
15:      integer lmax,stepx,stepy,stepz
16:      integer ntheta,nphi
17:      integer mfind,ahf_ncall
18:      integer nx,ny,nz
19:      integer nprocs,myproc,ierr
20:
21:      INTEGER*4 nfile
22:      INTEGER*4 interror1,interror2,interror3
23:      INTEGER*4 inside_min_count,inside_min_neg_count
24:
25:      REAL*8 xc,yc,zc
26:      REAL*8 xmn,ymn,zmn,xmx,ymx,zmx
27:      REAL*8 xc_old,yc_old,zc_old
28:      REAL*8 intexp,intexp2,intexpdel2,intarea
29:      REAL*8 rhmax,rhmin
30:      REAL*8 circ_eq,meri_p1,meri_p2
31:
32:      REAL*8 hw,cw,nw
33:      REAL*8 dx,dy,dz
34:
35:      REAL*8 avgx,avgy,avgz
36:
37:      REAL*8, allocatable, dimension (:)   :: c0,c0_0,c0_1,c0_2,c0_old
38:      REAL*8, allocatable, dimension (:,:) :: cc,cc_0,cc_1,cc_2,cc_old
39:      REAL*8, allocatable, dimension (:,:) :: cs,cs_0,cs_1,cs_2,cs_old
40:
41:      REAL*8, allocatable, dimension (:)   :: hflow0,cflow0,nflow0
42:      REAL*8, allocatable, dimension (:,:) :: hflowc,cflowc,nflowc
43:      REAL*8, allocatable, dimension (:,:) :: hflows,cflows,nflows
44:
45:      character(len=200) :: filestr
46:
47:      data ahf_ncall / 0 /
48:      data status_old   / .false. /
49:      data status_old_0 / .false. /
50:      data status_old_1 / .false. /
51:      data status_old_2 / .false. /
52:
53:      save ahf_ncall
54:      save c0,c0_0,c0_1,c0_2
55:      save cc,cc_0,cc_1,cc_2
56:      save cs,cs_0,cs_1,cs_2
57:      save status_old,status_old_0,status_old_1,status_old_2
58:
59:!     Description of variables:
60:!
61:!     firstfun   First call to function FUNC?
62:!     firstleg   First call to function LEGEN?
63:!     firstint   First call to subroutine AHFinder_int?
64:!
65:!     nonaxi     Is the data non-axisymmetric?
66:!
67:!     refx       Reflection symmetry x->-x?
68:!
69:!     refy       Reflection symmetry y->-y?
70:!
71:!     refz       Reflection symmetry z->-z?
72:!
73:!     cartoon    Are we using cartoon_2d?
74:!
75:!     inner      Look for inner horizon?
76:!
77:!     sloppy     Sloppy initial guess?
78:!
79:!     offset     Is the center offset from the origin?
80:!     wander     Do we allow the center to wander?
81:!
82:!     minarea    Do we want to minimize area?
83:!
84:!     flow       Use fast flow algorithm instead of minimization?
85:!
86:!     logfile    Write log file?
87:!
88:!     verbose    Write messages to screen?
89:!
90:!     veryver    Write lots of messages to screen?
91:!
92:!     guessverbose   Write info on initial guess points?
93:!
94:!     lmax       Maximum number of terms in theta expansion.
95:!
96:!     stepx      1 if (refx=1), 0 otherwise.
97:!     stepy      1 if (refy=1), 0 otherwise.
98:!     stepz      1 if (refz=1), 0 otherwise.
99:!
100:!     ntheta     Number of subdivisions in theta.
101:!     nphi       Number of subdivisions in phi.
102:!
103:!     xc         Coordinate x of centre of surface.
104:!     yc         Coordinate y of centre of surface.
105:!     zc         Coordinate z of centre of surface.
106:!
107:!     xmn        Minimum value of x over the grid.
108:!     xmx        Maximum value of x over the grid.
109:!
110:!     ymn        Minimum value of y over the grid.
111:!     ymx        Maximum value of y over the grid.
112:!
113:!     zmn        Minimum value of z over the grid.
114:!     zmx        Maximum value of z over the grid.
115:!
116:!     intexp     Integral of expansion over the surface.
117:!     intexp2    Integral of expansion squared over the surface.
118:!     intarea    Area of the surface.
119:!
120:!     rhmax      Maximum radius of horizon.
121:!     rhmin      Minimum radius of horizon.
122:!
123:!     circ_eq    Equatorial circumference.
124:!     meri_p1    Length of meridian at phi=0.
125:!     meri_p2    Length of meridian at phi=pi/2.
126:!
127:!     c0(l)      Coefficients of LEGEN(l,0,cos(theta))
128:!     cc(l,m)    Coefficients of LEGEN(l,m,cos(theta))*cos(m*phi)
129:!     cs(l,m)    Coefficients of LEGEN(l,m,cos(theta))*sin(m*phi)
130:!
131:!     hflow*     Spectral components for H flow.
132:!     cflow*     Spectral components for C flow.
133:!     nflow*     Spectral components for N flow.
134:!
135:!     interror1  Different from zero if radius is negative.
136:!     interror2  Different from zero if outside computational domain.
137:!     interror3  Different from zero if inside mask
138:!
139:!     interror   True if any of the 3 errors above are non-zero.
140:!
141:!     find3      Look for 3 horizons?
142:!     mfind      Counter to see for which horizon we are looking.
143:!
144:!     inside_min_count        Number of elements in integral (should always
145:!                             be ntheta*nphi)
146:!
147:!     inside_min_neg_count    Number of elements in integral that have
148:!                             negative expansion.
149:!
150:!     avgx        X-position of centroid of apparent horizon
151:!     avgy        Y-position of centroid of apparent horizon
152:!     avgz        Z-position of centroid of apparent horizon
153:
154:
155:!     ***************
156:!     ***   END   ***
157:!     ***************
158:
159:      end module AHFinder_dat