aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--param.ccl4
-rw-r--r--src/AHFinder.F295
-rw-r--r--src/AHFinder_gau.F82
-rw-r--r--src/AHFinder_int.F31
4 files changed, 180 insertions, 232 deletions
diff --git a/param.ccl b/param.ccl
index 8f7f760..31c17f1 100644
--- a/param.ccl
+++ b/param.ccl
@@ -357,7 +357,7 @@ LOGICAL ahf_areamap "Find area map?"
{
} "no"
-LOGICAL ahf_gaussout "Output guassian curvature of horizon?"
+LOGICAL ahf_gaussout "Output gaussian curvature of horizon?"
{
} "yes"
@@ -404,6 +404,6 @@ EXTENDS STRING outdir "Name of IO output directory"
shares: grid
-EXTENDS KEYWORD symmetry ""
+EXTENDS KEYWORD domain ""
{
}
diff --git a/src/AHFinder.F b/src/AHFinder.F
index b9b41b7..aab5d8c 100644
--- a/src/AHFinder.F
+++ b/src/AHFinder.F
@@ -7,7 +7,7 @@ c Find an apparent horizon.
c @enddesc
c@@*/
-c Note that including cactus.h will also include AHFinder.h
+c Note thadmcevol_onpunc_0.250_128_neu2_drop/at including cactus.h will also include AHFinder.h
#include "cctk.h"
#include "cctk_parameters.h"
#include "cctk_arguments.h"
@@ -24,7 +24,6 @@ c Note that including cactus.h will also include AHFinder.h
logical status,horizon,gauss
-
integer handle,x_index,y_index,z_index,ierror
CCTK_REAL maxval(3),minval(3)
@@ -47,6 +46,9 @@ c Note that including cactus.h will also include AHFinder.h
save ahfafter,ahfso,atime
+#include "CactusEinstein/Einstein/src/Einstein.h"
+
+
! Description of variables:
!
@@ -103,6 +105,11 @@ c Note that including cactus.h will also include AHFinder.h
status = .false.
+
+! myproc = CCTK_MyProc(cctkGH)
+! nprocs = CCTK_nProcs(cctkGH)
+
+
! *********************************
! *** INITIALIZE FIRSTCALLS ***
! *********************************
@@ -115,6 +122,7 @@ c Note that including cactus.h will also include AHFinder.h
! *** CHECK IF WE WANT TO FIND 3 HORIZONS ***
! ***********************************************
+
! find3 = contains("ahf_find3","yes").ne.0
if (ahf_find3.ne.0) then
find3 = .true.
@@ -131,10 +139,6 @@ c Note that including cactus.h will also include AHFinder.h
if (ahf_ncall.eq.0) then
-! atime = getr8("ahf_findaftertime")
-! ahfafter = geti("ahf_findafter")
-! ahfso = geti("ahf_findevery")
-
atime = ahf_findaftertime
ahfafter = ahf_findafter
ahfso = ahf_findevery
@@ -235,73 +239,83 @@ c Note that including cactus.h will also include AHFinder.h
! write(*,*) 'filestr =', filestr
! write(*,*) 'nfile =',nfile
!
+ write(*,*) 'jetzt bin ich da, wo ich nicht sein sollte'
+ if (find3) then
+
+ if (mfind.eq.0) then
- if (find3) then
+ logf = filestr(1:nfile)//"ahf_logfile_0"
+ almf = filestr(1:nfile)//"ahf_coeff_0.alm"
- if (mfind.eq.0) then
+ areaf = filestr(1:nfile)//"ahf_area_0.tl"
+ massf = filestr(1:nfile)//"ahf_mass_0.tl"
- logf = filestr(1:nfile)//"ahf_logfile_0"
- almf = filestr(1:nfile)//"ahf_coeff_0.alm"
+ circeqf = filestr(1:nfile)//"ahf_circ_eq_0.tl"
+ merip1f = filestr(1:nfile)//"ahf_meri_p1_0.tl"
+ merip2f = filestr(1:nfile)//"ahf_meri_p2_0.tl"
- areaf = filestr(1:nfile)//"ahf_area_0.tl"
- massf = filestr(1:nfile)//"ahf_mass_0.tl"
+ else if (mfind.eq.1) then
- circeqf = filestr(1:nfile)//"ahf_circ_eq_0.tl"
- merip1f = filestr(1:nfile)//"ahf_meri_p1_0.tl"
- merip2f = filestr(1:nfile)//"ahf_meri_p2_0.tl"
+ logf = filestr(1:nfile)//"ahf_logfile_1"
+ almf = filestr(1:nfile)//"ahf_coeff_1.alm"
- else if (mfind.eq.1) then
+ areaf = filestr(1:nfile)//"ahf_area_1.tl"
+ massf = filestr(1:nfile)//"ahf_mass_1.tl"
- logf = filestr(1:nfile)//"ahf_logfile_1"
- almf = filestr(1:nfile)//"ahf_coeff_1.alm"
+ circeqf = filestr(1:nfile)//"ahf_circ_eq_1.tl"
+ merip1f = filestr(1:nfile)//"ahf_meri_p1_1.tl"
+ merip2f = filestr(1:nfile)//"ahf_meri_p2_1.tl"
+
+ else
- areaf = filestr(1:nfile)//"ahf_area_1.tl"
- massf = filestr(1:nfile)//"ahf_mass_1.tl"
+ logf = filestr(1:nfile)//"ahf_logfile_2"
+ almf = filestr(1:nfile)//"ahf_coeff_2.alm"
- circeqf = filestr(1:nfile)//"ahf_circ_eq_1.tl"
- merip1f = filestr(1:nfile)//"ahf_meri_p1_1.tl"
- merip2f = filestr(1:nfile)//"ahf_meri_p2_1.tl"
+ areaf = filestr(1:nfile)//"ahf_area_2.tl"
+ massf = filestr(1:nfile)//"ahf_mass_2.tl"
- else
+ circeqf = filestr(1:nfile)//"ahf_circ_eq_2.tl"
+ merip1f = filestr(1:nfile)//"ahf_meri_p1_2.tl"
+ merip2f = filestr(1:nfile)//"ahf_meri_p2_2.tl"
- logf = filestr(1:nfile)//"ahf_logfile_2"
- almf = filestr(1:nfile)//"ahf_coeff_2.alm"
+ end if
- areaf = filestr(1:nfile)//"ahf_area_2.tl"
- massf = filestr(1:nfile)//"ahf_mass_2.tl"
+ else
- circeqf = filestr(1:nfile)//"ahf_circ_eq_2.tl"
- merip1f = filestr(1:nfile)//"ahf_meri_p1_2.tl"
- merip2f = filestr(1:nfile)//"ahf_meri_p2_2.tl"
+ logf = filestr(1:nfile)//"ahf_logfile"
+ almf = filestr(1:nfile)//"ahf_coeff.alm"
+
+ areaf = filestr(1:nfile)//"ahf_area.tl"
+ massf = filestr(1:nfile)//"ahf_mass.tl"
+
+ circeqf = filestr(1:nfile)//"ahf_circ_eq.tl"
+ merip1f = filestr(1:nfile)//"ahf_meri_p1.tl"
+ merip2f = filestr(1:nfile)//"ahf_meri_p2.tl"
end if
-
- else
-
- logf = filestr(1:nfile)//"ahf_logfile"
- almf = filestr(1:nfile)//"ahf_coeff.alm"
-
- areaf = filestr(1:nfile)//"ahf_area.tl"
- massf = filestr(1:nfile)//"ahf_mass.tl"
-
- circeqf = filestr(1:nfile)//"ahf_circ_eq.tl"
- merip1f = filestr(1:nfile)//"ahf_meri_p1.tl"
- merip2f = filestr(1:nfile)//"ahf_meri_p2.tl"
-
- end if
end if
! **************************************************
! *** TRANSFORM CONFORMAL TO PHYSICAL METRIC ***
! **************************************************
+
+! call ConfToPhys(nx,ny,nz,psi,gxx,gxy,gxz,gyy,gyz,gzz)
+
+ call CCTK_WARN(4,"Converting metric: conformal -> physical")
-! call conf2phys(CONF2PHYSVARS_ARGS)
+ gxx=gxx*psi**4
+ gxy=gxy*psi**4
+ gxz=gxz*psi**4
+ gyy=gyy*psi**4
+ gyz=gyz*psi**4
+ gzz=gzz*psi**4
+ conformal_state = NOCONFORMAL_METRIC
! ***************************************
! *** FIND OUT THE TYPE OF OUTPUT ***
! ***************************************
- if (.false.) then
+
! logfile = contains("ahf_logfile","yes").ne.0
if (ahf_logfile.ne.0) then
logfile = .true.
@@ -315,7 +329,7 @@ c Note that including cactus.h will also include AHFinder.h
else
verbose = .false.
end if
-
+
! veryver = contains("ahf_veryverbose","yes").ne.0
if (ahf_veryverbose.ne.0) then
veryver = .true.
@@ -332,71 +346,33 @@ c Note that including cactus.h will also include AHFinder.h
! if (logfile.and.(myproc.eq.0)) then
- if (logfile) then
+ if (.false.) then
+ if (logfile) then
#ifdef MPI
- if (myproc.eq.0) then
+ 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'
- write(1,*)
- write(1,*) 'Note: During an evolution, This file will only'
- write(1,*) 'contain information about the last time that the'
- write(1,*) 'finder was called.'
- write(1,*)
- close(1)
+ open(1,file=logf,form='formatted',status='replace')
+ write(1,*)
+ write(1,*) 'LOG FILE FOR MINIMIZATION APPARENT HORIZON FINDER'
+ write(1,*)
+ write(1,*) 'Note: During an evolution, This file will only'
+ write(1,*) 'contain information about the last time that the'
+ write(1,*) 'finder was called.'
+ write(1,*)
+ close(1)
#ifdef MPI
- end if
+ end if
#endif
- end if
- end if
+ end if
+ endif
! *******************************************
! *** FIND {xmn,xmx,ymn,ymx,zmn,zmx} ***
! *******************************************
-
- call CCTK_CoordRange(cctkGH,xmn,xmx,x)
- call CCTK_CoordRange(cctkGH,ymn,ymx,y)
- call CCTK_CoordRange(cctkGH,zmn,zmx,z)
-
- write (*,*) 'xmin,xmax',xmn,xmx
- write (*,*) 'ymin,ymax',ymn,ymx
- write (*,*) 'zmin,zmax',zmn,zmx
-
-
-! call CCTK_ReductionHandle(handle,"minimum")
-! call CCTK_CoordIndex(x_index,"x")
-! call CCTK_CoordIndex(y_index,"y")
-! call CCTK_CoordIndex(z_index,"z")
-
-! call CCTK_Reduce(cctkGH,ierror,-1,handle,3,
-! . CCTK_VARIABLE_REAL,
-! . minval,3,x_index,y_index,z_index)
-
-! xmn = gf_min(x)
-! ymn = gf_min(y)
-! zmn = gf_min(z)
-
-! xmn = minval(1)
-! ymn = minval(2)
-! zmn = minval(3)
-
-! call CCTK_ReductionHandle(handle,"maximum")
-! call CCTK_CoordIndex(x_index,"x")
-! call CCTK_CoordIndex(y_index,"y")
-! call CCTK_CoordIndex(z_index,"z")
-
-! call CCTK_Reduce(cctkGH,ierror,-1,handle,3,
-! . CCTK_VARIABLE_REAL,
-! . maxval,3,x_index,y_index,z_index)
-
-! xmx = gf_max(x)
-! ymx = gf_max(y)
-! zmx = gf_max(z)
-
-! xmx = maxval(1)
-! ymx = maxval(2)
-! zmx = maxval(3)
+
+ call CCTK_CoordRange(ierr,cctkGH,xmn,xmx,"x")
+ call CCTK_CoordRange(ierr,cctkGH,ymn,ymx,"y")
+ call CCTK_CoordRange(ierr,cctkGH,zmn,zmx,"z")
! **********************************
@@ -405,31 +381,19 @@ c Note that including cactus.h will also include AHFinder.h
if (find3) then
if (mfind.eq.0) then
-! xc = getr8("ahf_xc_0")
-! yc = getr8("ahf_yc_0")
-! zc = getr8("ahf_zc_0")
xc = ahf_xc_0
yc = ahf_yc_0
zc = ahf_zc_0
else if (mfind.eq.1) then
-! xc = getr8("ahf_xc_1")
-! yc = getr8("ahf_yc_1")
-! zc = getr8("ahf_zc_1")
xc = ahf_xc_1
yc = ahf_yc_1
zc = ahf_zc_1
else
-! xc = getr8("ahf_xc_2")
-! yc = getr8("ahf_yc_2")
-! zc = getr8("ahf_zc_2")
xc = ahf_xc_2
yc = ahf_yc_2
zc = ahf_zc_2
end if
else
-! xc = getr8("ahf_xc")
-! yc = getr8("ahf_yc")
-! zc = getr8("ahf_zc")
xc = ahf_xc
yc = ahf_yc
zc = ahf_zc
@@ -490,8 +454,6 @@ c Note that including cactus.h will also include AHFinder.h
! Find out reflection symmetries.
-! if ((contains("ahf_octant","yes").ne.0).or.
-! . (contains("ahf_octant","high").ne.0)) then
if ((CCTK_Equals(ahf_octant,"yes").eq.1).or.
. (CCTK_Equals(ahf_octant,"high").eq.1)) then
@@ -515,9 +477,6 @@ c Note that including cactus.h will also include AHFinder.h
refz = .false.
end if
-! refx = contains("ahf_refx","yes").ne.0
-! refy = contains("ahf_refy","yes").ne.0
-! refz = contains("ahf_refz","yes").ne.0
end if
! if (contains("ahf_phi","no").ne.0) then
@@ -528,13 +487,11 @@ c Note that including cactus.h will also include AHFinder.h
! Force grid symmetries.
-! if (contains("grid","octant").ne.0) then
- if (CCTK_Equals(symmetry,"octant").eq.1) then
+ if (CCTK_Equals(domain,"octant").eq.1) then
if (xc.eq.zero) refx = .true.
if (yc.eq.zero) refy = .true.
if (zc.eq.zero) refz = .true.
-! else if (contains("grid","quadrant").ne.0) then
- else if (CCTK_Equals(symmetry,"quadrant").eq.1) then
+ else if (CCTK_Equals(domain,"quadrant").eq.1) then
if (xc.eq.zero) refx = .true.
if (yc.eq.zero) refy = .true.
end if
@@ -549,7 +506,6 @@ c Note that including cactus.h will also include AHFinder.h
if (refy) stepy=1
if (refz) stepz=1
-! if (contains("ahf_octant","high").ne.0) stepx=3
if (CCTK_Equals(ahf_octant,"high").eq.1) stepx=3
! Check if we are using Cartoon_2d, in which case
@@ -594,9 +550,6 @@ c Note that including cactus.h will also include AHFinder.h
! *** FIND {ntheta,nphi} ***
! *******************************
-! ntheta = geti("ahf_ntheta")
-! nphi = geti("ahf_nphi")
-
ntheta = ahf_ntheta
nphi = ahf_nphi
@@ -682,8 +635,7 @@ c Note that including cactus.h will also include AHFinder.h
! Octant.
-! else if (contains("grid","octant").ne.0) then
- else if (CCTK_Equals(symmetry,"octant").eq.1) then
+ else if (CCTK_Equals(domain,"octant").eq.1) then
if ((xc.eq.zero).and.(yc.eq.zero).and.(zc.eq.zero)) then
rmx = min(xmx,ymx,zmx)
else if ((xc.eq.zero).and.(yc.eq.zero)) then
@@ -704,8 +656,7 @@ c Note that including cactus.h will also include AHFinder.h
! Quadrant.
-! else if (contains("grid","quadrant").ne.0) then
- else if (CCTK_Equals(symmetry,"quadrant").eq.1) then
+ else if (CCTK_Equals(domain,"quadrant").eq.1) then
if ((xc.eq.zero).and.(yc.eq.zero)) then
rmx = min(xmx,ymx,zmx-zc,zc-zmn)
else if (xc.eq.zero) then
@@ -731,17 +682,13 @@ c Note that including cactus.h will also include AHFinder.h
if (find3) then
if (mfind.eq.0) then
-! r0 = getr8("ahf_r0_0")
r0 = ahf_r0_0
else if (mfind.eq.1) then
-! r0 = getr8("ahf_r0_1")
r0 = ahf_r0_1
else
-! r0 = getr8("ahf_r0_2")
r0 = ahf_r0_2
end if
else
-! r0 = getr8("ahf_r0")
r0 = ahf_r0
end if
@@ -815,22 +762,13 @@ c Note that including cactus.h will also include AHFinder.h
call AHFinder_min(CCTK_FARGUMENTS,NN,status,logf)
else if ((.not.flow).and.manual_guess) then
! if (contains("grid","octant").eq.0) then
- if (CCTK_Equals(symmetry,"octant").eq.0) then
+ if (CCTK_Equals(domain,"octant").eq.0) then
write(*,*) 'AHFinder: if you want to use ahf_manual_guess'
write(*,*) ' without grid=octant, you will have to make'
write(*,*) ' it work!'
STOP
endif
-! c0(0) = getr8("ahf_l0_guess")
-! c0_temp(2) = getr8("ahf_l2_guess")
-! c0_temp(4) = getr8("ahf_l4_guess")
-! c0_temp(6) = getr8("ahf_l6_guess")
-! c0_temp(8) = getr8("ahf_l8_guess")
-! c0_temp(10) = getr8("ahf_l10_guess")
-! c0_temp(12) = getr8("ahf_l12_guess")
-! c0_temp(14) = getr8("ahf_l14_guess")
-! c0_temp(16) = getr8("ahf_l16_guess")
-! c0_temp(18) = getr8("ahf_l18_guess")
+
c0(0) = ahf_l0_guess
c0_temp(2) = ahf_l2_guess
c0_temp(4) = ahf_l4_guess
@@ -841,7 +779,7 @@ c Note that including cactus.h will also include AHFinder.h
c0_temp(14) = ahf_l14_guess
c0_temp(16) = ahf_l16_guess
c0_temp(18) = ahf_l18_guess
- do i = 2,lmax,2
+ do i = 2,lmax,2
c0(i) = c0_temp(i)
enddo
call AHFinder_initguess(CCTK_FARGUMENTS,rmx)
@@ -897,16 +835,8 @@ c Note that including cactus.h will also include AHFinder.h
! gauss = contains("ahf_gaussout","yes").ne.0
if (ahf_gaussout.ne.0) then
- gauss = .true.
- else
- gauss = .false.
- end if
-
- if (.false.) then
- if (gauss) then
call AHFinder_gau(CCTK_FARGUMENTS,circ_eq,meri_p1,meri_p2)
end if
- end if
intexp_h = intexp
intexp2_h = intexp2
@@ -1267,23 +1197,24 @@ c Note that including cactus.h will also include AHFinder.h
write(*,*) 'AHFinder: No horizon found.'
write(*,*)
- if (logfile) then
- write(1,*)
- write(1,*) 'AHFinder: No horizon found.'
- write(1,*)
- end if
-
+ if (.false.) then
+ if (logfile) then
+ write(1,*)
+ write(1,*) 'AHFinder: No horizon found.'
+ write(1,*)
+ end if
+
! Close logfile
- write(*,*)
-
- if (logfile) then
- write(1,*)
- write(1,*) 'END OF LOG FILE'
- write(1,*)
- close(1)
- end if
+ write(*,*)
+ if (logfile) then
+ write(1,*)
+ write(1,*) 'END OF LOG FILE'
+ write(1,*)
+ close(1)
+ end if
+ endif
end if
#ifdef MPI
end if
@@ -1292,6 +1223,8 @@ c Note that including cactus.h will also include AHFinder.h
! ****************************
! *** WRITE DATA FILES ***
! ****************************
+
+ if (.false.) then
#ifdef MPI
if (myproc.eq.0) then
#endif
@@ -1433,7 +1366,9 @@ c Expansion coefficients.
#ifdef MPI
end if
#endif
-
+! modified
+ endif
+! end modified
! ********************************************************
! *** PREPARING {ahfgrid3,ahf_exp3} FOR OUTPUT ***
! ********************************************************
@@ -1447,7 +1382,6 @@ c Expansion coefficients.
! *** OUTPUT GRID FUNCTIONS ***
! *********************************
-! if (contains("ahf_2Doutput","yes").ne.0) then
if (ahf_2Doutput.ne.0) then
if (find3) then
if (mfind.eq.2) then
@@ -1481,7 +1415,6 @@ c Expansion coefficients.
end if
end if
-! if (contains("ahf_3Doutput","yes").ne.0) then
if (ahf_3Doutput.ne.0) then
! This is commented out because I still need
@@ -1521,8 +1454,18 @@ c Expansion coefficients.
! *** TRANSFORM PHYSICAL TO CONFORMAL METRIC ***
! **************************************************
-! call phys2conf(CONF2PHYSVARS_ARGS)
+! call PhysToConf(nx,ny,nz,psi,gxx,gxy,gxz,gyy,gyz,gzz)
+
+ call CCTK_WARN(4,"Converting metric: physical -> conformal")
+
+ gxx=gxx/psi**4
+ gxy=gxy/psi**4
+ gxz=gxz/psi**4
+ gyy=gyy/psi**4
+ gyz=gyz/psi**4
+ gzz=gzz/psi**4
+ conformal_state = CONFORMAL_METRIC
! **********************************************
! *** UPDATING COUNTER AND LOOP IF FIND3 ***
diff --git a/src/AHFinder_gau.F b/src/AHFinder_gau.F
index cc5f4a4..ebf3b9b 100644
--- a/src/AHFinder_gau.F
+++ b/src/AHFinder_gau.F
@@ -35,6 +35,8 @@ c Note that including cactus.h will also include AHFinder.h
logical firstgau
logical firstcal(4)
+ 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)
@@ -72,15 +74,11 @@ c Note that including cactus.h will also include AHFinder.h
! Declarations for macros.
-!#include "./thorn_StandardEinstein/src/macro/UPPERMET_declare.h"
-!#include "./thorn_StandardEinstein/src/macro/CHR2_declare.h"
-!#include "./thorn_StandardEinstein/src/macro/RICCI_declare.h"
-!#include "./thorn_StandardEinstein/src/macro/TRRICCI_declare.h"
-
-#include "../../Einstein/src/macro/UPPERMET_declare.h"
-#include "../../Einstein/src/macro/CHR2_declare.h"
-#include "../../Einstein/src/macro/RICCI_declare.h"
-#include "../../Einstein/src/macro/TRRICCI_declare.h"
+#include "CactusEinstein/Einstein/src/Einstein.h"
+#include "CactusEinstein/Einstein/src/macro/UPPERMET_declare.h"
+#include "CactusEinstein/Einstein/src/macro/CHR2_declare.h"
+#include "CactusEinstein/Einstein/src/macro/RICCI_declare.h"
+#include "CactusEinstein/Einstein/src/macro/TRRICCI_declare.h"
! Data.
@@ -263,15 +261,10 @@ c Note that including cactus.h will also include AHFinder.h
call CCTK_CoordIndex(y_index,"y")
call CCTK_CoordIndex(z_index,"z")
- call CCTK_Reduce(cctkGH,ierror,-1,handle,3,
+ call CCTK_Reduce(cctkGH,ierror,-1,handle,1,
. CCTK_VARIABLE_REAL,minval,3,
. x_index,y_index,z_index)
-! xmn = gf_min(x)
-! ymn = gf_min(y)
-! zmn = gf_min(z)
-! minval = -9.45D0
-
xmn = minval(1)
ymn = minval(2)
zmn = minval(3)
@@ -281,15 +274,10 @@ c Note that including cactus.h will also include AHFinder.h
call CCTK_CoordIndex(y_index,"y")
call CCTK_CoordIndex(z_index,"z")
- call CCTK_Reduce(cctkGH,ierror,-1,handle,3,
+ call CCTK_Reduce(cctkGH,ierror,-1,handle,1,
. CCTK_VARIABLE_REAL,maxval,3,
. x_index,y_index,z_index)
-! xmx = gf_max(x)
-! ymx = gf_max(y)
-! zmx = gf_max(z)
-! maxval =9.45D0
-
xmx = maxval(1)
ymx = maxval(2)
zmx = maxval(3)
@@ -354,7 +342,7 @@ c Note that including cactus.h will also include AHFinder.h
! Find upper spatial metric using standard macro.
-#include "../../Einstein/src/macro/UPPERMET_guts.h"
+#include "CactusEinstein/Einstein/src/macro/UPPERMET_guts.h"
ug(1,1) = UPPERMET_UXX
ug(2,2) = UPPERMET_UYY
@@ -376,7 +364,7 @@ c Note that including cactus.h will also include AHFinder.h
! Find Christoffel symbols using standard macros.
-#include "../../Einstein/src/macro/CHR2_guts.h"
+#include "CactusEinstein/Einstein/src/macro/CHR2_guts.h"
! Find extrinsic curvature of the 2-surfaces defined
! as the level sets of the horizon function. The
@@ -453,8 +441,8 @@ c Note that including cactus.h will also include AHFinder.h
! Find 3-Ricci and 3-Ricci scalar using standard macros.
-#include "../../Einstein/src/macro/RICCI_guts.h"
-#include "../../Einstein/src/macro/TRRICCI_guts.h"
+#include "CactusEinstein/Einstein/src/macro/RICCI_guts.h"
+#include "CactusEinstein/Einstein/src/macro/TRRICCI_guts.h"
! Find 2-Ricci scalar using the contracted Gauss-Codazzi
! relations:
@@ -476,10 +464,10 @@ c Note that including cactus.h will also include AHFinder.h
! Undefine macros!
-#include "../../Einstein/src/macro/UPPERMET_undefine.h"
-#include "../../Einstein/src/macro/CHR2_undefine.h"
-#include "../../Einstein/src/macro/RICCI_undefine.h"
-#include "../../Einstein/src/macro/TRRICCI_undefine.h"
+#include "CactusEinstein/Einstein/src/macro/UPPERMET_undefine.h"
+#include "CactusEinstein/Einstein/src/macro/CHR2_undefine.h"
+#include "CactusEinstein/Einstein/src/macro/RICCI_undefine.h"
+#include "CactusEinstein/Einstein/src/macro/TRRICCI_undefine.h"
end do
end do
@@ -632,15 +620,27 @@ c Note that including cactus.h will also include AHFinder.h
npoints = 1
end if
- call start_getpointsgroup()
- call getpoints(gxx,xa,ya,za,txx,npoints)
- call getpoints(gyy,xa,ya,za,tyy,npoints)
- call getpoints(gzz,xa,ya,za,tzz,npoints)
- call getpoints(gxy,xa,ya,za,txy,npoints)
- call getpoints(gxz,xa,ya,za,txz,npoints)
- call getpoints(gyz,xa,ya,za,tyz,npoints)
- call getpoints(ahfgauss,xa,ya,za,gaussian,npoints)
- call cleanup_getpointsgroup()
+! new interp
+ call CCTK_GetInterpHandle (handle, "simple")
+ call CCTK_VarIndex (gxx_index, "einstein::gxx")
+ call CCTK_VarIndex (gyy_index, "einstein::gyy")
+ call CCTK_VarIndex (gzz_index, "einstein::gzz")
+ call CCTK_VarIndex (gxy_index, "einstein::gxy")
+ call CCTK_VarIndex (gxz_index, "einstein::gxz")
+ call CCTK_VarIndex (gyz_index, "einstein::gyz")
+ call CCTK_VarIndex (ahfgauss_index, "ahfinder::ahfgauss")
+
+
+ call CCTK_InterpGF (cctkGH, ierror, handle, npoints, 3, 7, 7,
+ $ xa, ya, za,
+ $ CCTK_VARIABLE_REAL, CCTK_VARIABLE_REAL,
+ $ CCTK_VARIABLE_REAL,
+ $ gxx_index,gyy_index,gzz_index,
+ $ gxy_index,gxz_index,gyz_index,ahfgauss_index,
+ $ txx,tyy,tzz,txy,txz,tyz,gaussian,
+ $ CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,
+ $ CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,
+ $ CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL )
! *********************************
@@ -1055,7 +1055,11 @@ c Note that including cactus.h will also include AHFinder.h
! *** SAVE GAUSSIAN CURVATURE ***
! ***********************************
+ if (.false.) then
+
+
if (myproc.eq.0) then
+
if (find3) then
if (mfind.eq.0) then
gaussf = filestr(1:nfile)//"mahf_0.gauss"
@@ -1144,7 +1148,7 @@ c Note that including cactus.h will also include AHFinder.h
close(1)
end if
-
+ endif
! *****************************
! *** DEALLOCATE MEMORY ***
diff --git a/src/AHFinder_int.F b/src/AHFinder_int.F
index 4023d42..ef6c4aa 100644
--- a/src/AHFinder_int.F
+++ b/src/AHFinder_int.F
@@ -1,4 +1,4 @@
-c/*@@
+/*@@
c @file AHFinder_int.F
c @date April 1998
c @author Miguel Alcubierre
@@ -30,7 +30,7 @@ c Note that including cactus.h will also include AHFinder.h
include 'mpif.h'
#endif
- integer handle,x_index,y_index,z_index,ierror
+ integer handle,x_index,y_index,z_index
CCTK_REAL maxval(3),minval(3)
@@ -165,20 +165,25 @@ c Note that including cactus.h will also include AHFinder.h
! *** INITIALIZE PARAMETERS ***
! *********************************
+
+
if (firstint) then
firstint = .false.
! Find grid boundaries.
+
call CCTK_ReductionHandle(handle,"minimum")
call CCTK_CoordIndex(x_index,"x")
call CCTK_CoordIndex(y_index,"y")
call CCTK_CoordIndex(z_index,"z")
- call CCTK_Reduce(cctkGH,ierror,-1,handle,3,
+
+ call CCTK_Reduce(cctkGH,ierror,-1,handle,1,
. CCTK_VARIABLE_REAL,minval,3,
. x_index,y_index,z_index)
+
! xmn = gf_min(x)
! ymn = gf_min(y)
@@ -194,10 +199,13 @@ c Note that including cactus.h will also include AHFinder.h
call CCTK_CoordIndex(y_index,"y")
call CCTK_CoordIndex(z_index,"z")
- call CCTK_Reduce(cctkGH,ierror,-1,handle,3,
+ call CCTK_Reduce(cctkGH,ierror,-1,handle,1,
. CCTK_VARIABLE_REAL,maxval,3,
. x_index,y_index,z_index)
+
+
+
! xmx = gf_max(x)
! ymx = gf_max(y)
! zmx = gf_max(z)
@@ -207,6 +215,7 @@ c Note that including cactus.h will also include AHFinder.h
ymx = maxval(2)
zmx = maxval(3)
+
! Find {dtheta,dphi,dtp}.
dtheta = pi/dble(ntheta)
@@ -405,6 +414,8 @@ c Note that including cactus.h will also include AHFinder.h
end if
+
+
! **************************************
! *** ALLOCATE MEMORY FOR ARRAYS ***
! **************************************
@@ -583,16 +594,6 @@ c Note that including cactus.h will also include AHFinder.h
npoints = (l_ntheta+1)*(l_nphi+1)
-! call start_getpointsgroup()
-! call getpoints(ahf_exp,xa,ya,za,exp,npoints)
-! call getpoints(ahfgradn,xa,ya,za,gradn,npoints)
-! call getpoints(gxx,xa,ya,za,txx,npoints)
-! call getpoints(gyy,xa,ya,za,tyy,npoints)
-! call getpoints(gzz,xa,ya,za,tzz,npoints)
-! call getpoints(gxy,xa,ya,za,txy,npoints)
-! call getpoints(gxz,xa,ya,za,txz,npoints)
-! call getpoints(gyz,xa,ya,za,tyz,npoints)
-! call cleanup_getpointsgroup()
! new interp
call CCTK_GetInterpHandle (handle, "simple")
@@ -606,7 +607,7 @@ c Note that including cactus.h will also include AHFinder.h
call CCTK_VarIndex (gradn_index, "ahfinder::ahfgradn")
call CCTK_InterpGF (cctkGH, ierror, handle, npoints, 3, 8, 8,
- $ xa, ya, za,
+ $ xa, ya, za,
$ CCTK_VARIABLE_REAL, CCTK_VARIABLE_REAL,
$ CCTK_VARIABLE_REAL,
$ gxx_index,gyy_index,gzz_index,