aboutsummaryrefslogtreecommitdiff
path: root/src/AHFinder_gau.F
diff options
context:
space:
mode:
authortradke <tradke@89daf98e-ef62-4674-b946-b8ff9de2216c>2001-02-16 14:23:33 +0000
committertradke <tradke@89daf98e-ef62-4674-b946-b8ff9de2216c>2001-02-16 14:23:33 +0000
commit373a43b2e824c760fe4cabfcce097b666cc43d5c (patch)
tree8db3d55a84e94894a13cad8d5d487d2dd3c54fe7 /src/AHFinder_gau.F
parent202c91c91037dbf6437931439c92cf2a00df2d43 (diff)
Use the new interpolation flesh API routines and call the new interpolation
operators from PUGHInterp (according to the setting of the AHFinder::interpolation_order parameter). Also fixed a couple of bugs related to datatypes: handles are integers but reduction variables can only be CCTK_XXX types. Unfortunately, on the T3E it still passes only the second testsuite. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinder/trunk@184 89daf98e-ef62-4674-b946-b8ff9de2216c
Diffstat (limited to 'src/AHFinder_gau.F')
-rw-r--r--src/AHFinder_gau.F61
1 files changed, 41 insertions, 20 deletions
diff --git a/src/AHFinder_gau.F b/src/AHFinder_gau.F
index 1fccdf5..9177355 100644
--- a/src/AHFinder_gau.F
+++ b/src/AHFinder_gau.F
@@ -31,15 +31,15 @@
integer i,j,k,l,m,n,p
integer npoints
+ integer interp_handle,coord_system_handle,sum_handle
+ integer ierror
CCTK_INT rerror,error1,error2
- CCTK_INT handle,sum_handle,ierror
CCTK_REAL LEGEN
CCTK_REAL theta,phi,xp,yp,zp,rp
CCTK_REAL cost,sint,cosp,sinp
CCTK_REAL dtheta,dphi,dtp,idtheta,idphi,phistart
- 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 deta,ideta
CCTK_REAL nlx,nly,nlz,nux,nuy,nuz
@@ -52,6 +52,8 @@
CCTK_REAL, dimension(2,2,2) :: d1a,gammad,gamma
CCTK_REAL, dimension(2,2,2,2) :: d2a,gamma2
+ integer, dimension(7) :: in_array_indices
+
CCTK_REAL, allocatable, dimension(:,:) :: rr,xa,ya,za
CCTK_REAL, allocatable, dimension(:,:) :: txx,tyy,tzz,txy,txz,tyz
CCTK_REAL, allocatable, dimension(:,:) :: g11,g22,g12
@@ -626,30 +628,49 @@
npoints = 1
end if
-! Interpolator handle.
+! Interpolator and coordinate system handle.
+
+ interp_handle = -1
+ coord_system_handle = -1
- call CCTK_InterpHandle(handle,"simple")
+ if (interpolation_order .eq. 1) then
+ call CCTK_InterpHandle (interp_handle, "first-order uniform cartesian")
+ else if (interpolation_order .eq. 2) then
+ call CCTK_InterpHandle (interp_handle, "second-order uniform cartesian")
+ else if (interpolation_order .eq. 3) then
+ call CCTK_InterpHandle (interp_handle, "third-order uniform cartesian")
+ endif
-! Local origin of spatial coordinates.
+ call CCTK_CoordSystemHandle (coord_system_handle, "cart3d")
- 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")
+ if (interp_handle .lt. 0 .or. coord_system_handle .lt. 0) then
+ call CCTK_WARN (0, "Couldn't get handles for interpolation operator and/or coordinate system")
+ endif
! 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)
+ call CCTK_VarIndex (in_array_indices(1), "einstein::gxx")
+ call CCTK_VarIndex (in_array_indices(2), "einstein::gyy")
+ call CCTK_VarIndex (in_array_indices(3), "einstein::gzz")
+ call CCTK_VarIndex (in_array_indices(4), "einstein::gxy")
+ call CCTK_VarIndex (in_array_indices(5), "einstein::gxz")
+ call CCTK_VarIndex (in_array_indices(6), "einstein::gyz")
+ call CCTK_VarIndex (in_array_indices(7), "ahfinder::ahfgauss")
+
+ call CCTK_InterpGV (ierror, cctkGH, interp_handle, coord_system_handle,
+ . npoints, 7, 7,
+ . xa, ya, za,
+ . CCTK_VARIABLE_REAL, CCTK_VARIABLE_REAL,
+ . CCTK_VARIABLE_REAL,
+ . in_array_indices(1), in_array_indices(2),
+ . in_array_indices(3), in_array_indices(4),
+ . in_array_indices(5), in_array_indices(6),
+ . in_array_indices(7),
+ . 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, CCTK_VARIABLE_REAL)
! *********************************