aboutsummaryrefslogtreecommitdiff
path: root/src/AHFinder_int.F
diff options
context:
space:
mode:
authormiguel <miguel@89daf98e-ef62-4674-b946-b8ff9de2216c>2000-10-29 17:40:41 +0000
committermiguel <miguel@89daf98e-ef62-4674-b946-b8ff9de2216c>2000-10-29 17:40:41 +0000
commitd0106335167ef8c41badd4192493defbe8ebfed9 (patch)
tree4730e82133c37c9382366fb1233069a1b0049302 /src/AHFinder_int.F
parent149cbca4fb7d5bf11f645956c6f4238f83c2c11d (diff)
Making sure I don't do unnecessary interpolations. This seems to have
a huge impact on the speed of the flow algorithm. It is now twice as fast on the testsuite! git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinder/trunk@143 89daf98e-ef62-4674-b946-b8ff9de2216c
Diffstat (limited to 'src/AHFinder_int.F')
-rw-r--r--src/AHFinder_int.F48
1 files changed, 44 insertions, 4 deletions
diff --git a/src/AHFinder_int.F b/src/AHFinder_int.F
index c434930..a7cb0d2 100644
--- a/src/AHFinder_int.F
+++ b/src/AHFinder_int.F
@@ -422,13 +422,13 @@
! *** INITIALIZE VARIABLES ***
! ********************************
-! Initialize {interror1,interror2}.
+! Initialize error flags.
interror1 = 0
interror2 = 0
interror3 = 0
-! Initialize {intexp,intexp2,intarea}.
+! Initialize surface integrals.
if (.not.flow) then
@@ -551,7 +551,10 @@
end if
-! Reduce the errors across processors.
+
+! *******************************************
+! *** REDUCE ERRORS ACROSS PROCESSORS ***
+! *******************************************
call CCTK_ReduceLocalScalar(ierror,cctkGH,-1,reduction_handle,
. interror1,red_tmp,CCTK_VARIABLE_INT)
@@ -593,7 +596,29 @@
call CCTK_InterpHandle(handle,"simple")
- call CCTK_Interp(ierror,cctkGH,handle,npoints,3,9,9,
+! For minimization we need the interpolated metric,
+! the expansion and the mask.
+
+ if (.not.flow) then
+
+ call CCTK_Interp(ierror,cctkGH,handle,npoints,3,8,8,
+ . nx,ny,nz,xa,ya,za,CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,
+ . CCTK_VARIABLE_REAL,origin(1),origin(2),origin(3),
+ . dx,dy,dz,gxx,gyy,gzz,gxy,gxz,gyz,ahf_exp,ahmask,
+ . CCTK_VARIABLE_REAL,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,exp,intmask,
+ . CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,
+ . CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,
+ . CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL)
+
+! For N flow, we need the interpolated metric, the expansion,
+! the norm of the gradient of the horizon function, and the mask.
+
+ else if (nw.ne.zero) then
+
+ call CCTK_Interp(ierror,cctkGH,handle,npoints,3,9,9,
. nx,ny,nz,xa,ya,za,CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,
. CCTK_VARIABLE_REAL,origin(1),origin(2),origin(3),
. dx,dy,dz,gxx,gyy,gzz,gxy,gxz,gyz,ahf_exp,ahfgradn,ahmask,
@@ -605,6 +630,21 @@
. CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,
. CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL)
+! For H of C flows, we need the interpolated expansion, the
+! norm of the gradient of the horizon function, and the mask.
+
+ else
+
+ call CCTK_Interp(ierror,cctkGH,handle,npoints,3,3,3,
+ . nx,ny,nz,xa,ya,za,CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,
+ . CCTK_VARIABLE_REAL,origin(1),origin(2),origin(3),
+ . dx,dy,dz,ahf_exp,ahfgradn,ahmask,
+ . CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,
+ . exp,gradn,intmask,
+ . CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL)
+
+ end if
+
! ***************************************
! *** CHECK IF WE ARE INSIDE MASK ***