aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormiguel <miguel@89daf98e-ef62-4674-b946-b8ff9de2216c>2000-10-30 08:39:21 +0000
committermiguel <miguel@89daf98e-ef62-4674-b946-b8ff9de2216c>2000-10-30 08:39:21 +0000
commit01ef8ee5e9e164969a5a1f57dd4ad21ee587dfc4 (patch)
tree4eee17ae4c323048bd8c77b08d20970107311ef5
parent246843fcd8e09670405aadfc3c59699ab2f818fd (diff)
Chnaging the way the interpolator was called to have it in the exact same
way as in routine AHFinder_int.F git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinder/trunk@145 89daf98e-ef62-4674-b946-b8ff9de2216c
-rw-r--r--src/AHFinder_gau.F61
1 files changed, 38 insertions, 23 deletions
diff --git a/src/AHFinder_gau.F b/src/AHFinder_gau.F
index 91687b6..efe359c 100644
--- a/src/AHFinder_gau.F
+++ b/src/AHFinder_gau.F
@@ -44,6 +44,7 @@
CCTK_REAL cost,sint,cosp,sinp
CCTK_REAL dtheta,dphi,dtp,idtheta,idphi
CCTK_REAL xmn,ymn,zmn,xmx,ymx,zmx
+ CCTK_REAL xmn_l,ymn_l,zmn_l,xmx_l,ymx_l,zmx_l
CCTK_REAL trr,ttt,tpp,trt,trp,ttp,ft,fp
CCTK_REAL circ_eq,meri_p1,meri_p2
CCTK_REAL deta,ideta
@@ -619,31 +620,44 @@
! *** INTERPOLATE ***
! ***********************
+! Here I should really only interpolate the gaussian curvature.
+! The interpolation of the metric is only needed for the old
+! gaussian curvature calculation (which I don't use any more),
+! and for the calculation of the circumferences (which really
+! should be done in the routine AHFinder_int.F). I need to fix
+! this sometime soon! (October 2000).
+
+! Number of points to interpolate.
+
if (myproc.eq.0) then
npoints = (ntheta+1)*(nphi+1)
else
npoints = 1
end if
- call CCTK_InterpHandle (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 (ierror, cctkGH, 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 )
+! Interpolator handle.
+
+ call CCTK_InterpHandle (handle,"simple")
+
+! Local origin of spatial coordinates.
+
+ call CCTK_CoordLocalRange(ierror,cctkGH,xmn_l,xmx_l,-1,"x","cart3d")
+ call CCTK_CoordLocalRange(ierror,cctkGH,ymn_l,ymx_l,-1,"y","cart3d")
+ call CCTK_CoordLocalRange(ierror,cctkGH,zmn_l,zmx_l,-1,"z","cart3d")
+
+! Interpolation.
+
+ call CCTK_Interp(ierror,cctkGH,handle,npoints,3,7,7,
+ . nx,ny,nz,xa,ya,za,CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,
+ . CCTK_VARIABLE_REAL,xmn_l,ymn_l,zmn_l,
+ . dx,dy,dz,gxx,gyy,gzz,gxy,gxz,gyz,ahfgauss,
+ . CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,
+ . CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,
+ . CCTK_VARIABLE_REAL,
+ . 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)
! *********************************
@@ -817,12 +831,13 @@
! *** OLD CALCULATION OF GAUSSIAN CURVATURE ***
! *************************************************
-! This was the old calculation of the gaussian curvature.
+! This is 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 did not want to
-! delete the code since it might be useful in the future,
-! so I just jump over it.
+! seems not to behave well numerically (we would need higher
+! order interpolation). I did not want to delete this code
+! since it might be useful in the future, so I here just jump
+! over it.
if (.false.) then