diff options
author | diener <diener@89daf98e-ef62-4674-b946-b8ff9de2216c> | 2001-09-05 16:58:13 +0000 |
---|---|---|
committer | diener <diener@89daf98e-ef62-4674-b946-b8ff9de2216c> | 2001-09-05 16:58:13 +0000 |
commit | fee6a3d7a3a966941795e528afa6df6e2e99fd7b (patch) | |
tree | 8126331a57a09b3eb65eff085572a8713b4a8442 /src/AHFinder_gau.F | |
parent | e069750d8da438d761596c72486e66e49850f317 (diff) |
Subtracted 1 from mfind to make it consistent with the drift_correct_horizon
parameter. Moved the "ahf_centrid_[xy] = avg[xy]" statements into the if
statement, so that it is only done for the horizon determined by the
drift_correct_horizon parameter. Made sure that the shift is not changed
on the first call to the apparent horizon finder, by adding
an "if (ahf_ncall.gt.1) then" statement.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinder/trunk@242 89daf98e-ef62-4674-b946-b8ff9de2216c
Diffstat (limited to 'src/AHFinder_gau.F')
-rw-r--r-- | src/AHFinder_gau.F | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/src/AHFinder_gau.F b/src/AHFinder_gau.F index 79c8967..6534a56 100644 --- a/src/AHFinder_gau.F +++ b/src/AHFinder_gau.F @@ -582,14 +582,15 @@ avgx = avgx/dble(npoints) avgy = avgy/dble(npoints) - ahf_centroid_x = avgx - ahf_centroid_y = avgy - ! Calculate correction in omega to stop "drift" of apparent horizon. if (drift_correct_on.eq.1) then + if ((.not.find3).or. - . (find3.and.(mfind.eq.drift_correct_horizon))) then + . (find3.and.(mfind-1.eq.drift_correct_horizon))) then + + ahf_centroid_x = avgx + ahf_centroid_y = avgy xi_new = atan2(avgx,avgy) @@ -618,6 +619,7 @@ else omega_cum = rotation_omega + omega_corr = zero end if @@ -641,30 +643,31 @@ ! omega_corr from processor 0 to all other processors. ! (Recommended by Thomas Radke) - omega_corr = 0.0D0 + omega_corr = zero end if ! Actually apply drift correction to shift. if (drift_correct_on.eq.1) then - if ((.not.find3).or. - . (find3.and.(mfind.eq.drift_correct_horizon))) then - - call CCTK_ReduceLocalScalar(ierror,cctkGH,-1,sum_handle, - . omega_corr,omega_corr_all,CCTK_VARIABLE_REAL) - if (ierror.ne.0) then - call CCTK_WARN(1,"Reduction failed!") - end if + if (ahf_ncall.gt.1) then + if ((.not.find3).or. + . (find3.and.(mfind-1.eq.drift_correct_horizon))) then - omega_corr = omega_corr_all + call CCTK_ReduceLocalScalar(ierror,cctkGH,-1,sum_handle, + . omega_corr,omega_corr_all,CCTK_VARIABLE_REAL) + if (ierror.ne.0) then + call CCTK_WARN(1,"Reduction failed!") + end if - ahf_omega_corr = omega_corr - ahf_omega_cum = omega_cum + omega_corr = omega_corr_all - betax = betax - y*omega_corr/psi**2 - betay = betay + x*omega_corr/psi**2 + ahf_omega_corr = omega_corr + ahf_omega_cum = omega_cum + betax = betax - y*omega_corr/psi**2 + betay = betay + x*omega_corr/psi**2 + end if end if end if |