aboutsummaryrefslogtreecommitdiff
path: root/src/AHFinder_mask.F
diff options
context:
space:
mode:
authorlars <lars@89daf98e-ef62-4674-b946-b8ff9de2216c>1999-07-21 09:50:23 +0000
committerlars <lars@89daf98e-ef62-4674-b946-b8ff9de2216c>1999-07-21 09:50:23 +0000
commitc5c68fbff7f9b27f7bb7439b6fcc77879823dcd9 (patch)
treef8ddb8690186d9961b73172736a300fcdf8047c3 /src/AHFinder_mask.F
parent8fafcd075208081ec07cb07155b40939889cf234 (diff)
This commit was generated by cvs2svn to compensate for changes in r2, which
included commits to RCS files with non-trunk default branches. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinder/trunk@3 89daf98e-ef62-4674-b946-b8ff9de2216c
Diffstat (limited to 'src/AHFinder_mask.F')
-rw-r--r--src/AHFinder_mask.F81
1 files changed, 81 insertions, 0 deletions
diff --git a/src/AHFinder_mask.F b/src/AHFinder_mask.F
new file mode 100644
index 0000000..9fec702
--- /dev/null
+++ b/src/AHFinder_mask.F
@@ -0,0 +1,81 @@
+c/*@@
+c @file AHFinder_mask.F
+c @date November 1998
+c @author Miguel Alcubierre
+c @desc
+c Set up horizon mask for black hole excision.
+c @enddesc
+c@@*/
+
+c Note that including cactus.h will also include AHFinder.h
+!#include "cactus.h"
+#include "cctk.h"
+#include "cctk_parameters.h"
+#include "cctk_arguments.h"
+
+ subroutine AHFinder_mask(CCTK_FARGUMENTS)
+
+! Set up the horizon mask. All this routine does is
+! set up the value of the grid function `ahmask' to
+! one for points outside the horizon, and to zero
+! for points inside the horizon. This is only necessary
+! if we want to use black hole excision.
+
+ use AHFinder_dat
+
+ implicit none
+
+ DECLARE_CCTK_FARGUMENTS
+ DECLARE_CCTK_PARAMETERS
+
+ integer i,j,k
+
+ CCTK_REAL zero,one
+ CCTK_REAL shrink
+
+
+! *****************************
+! *** DEFINE {zero,one} ***
+! *****************************
+
+ zero = 0.0D0
+ one = 1.0D0
+
+
+! *************************
+! *** START ROUTINE ***
+! *************************
+
+ call AHFinder_fun(CCTK_FARGUMENTS)
+
+! Find out how big is the buffer zone. Notice that
+! a negative value for shrink puts the masked region
+! safely inside the horizon, while a positive value
+! moves the masked region outside the horizon.
+
+! shrink = getr8("ahf_maskshrink")*dx
+ shrink = ahf_maskshrink*dx
+
+! Mask points.
+
+ do k=1,nz
+ do j=1,ny
+ do i=1,nx
+
+ if (ahfgrid(i,j,k).ge.shrink) then
+ ahmask(i,j,k) = one
+ else
+ ahmask(i,j,k) = zero
+ end if
+
+ end do
+ end do
+ end do
+
+
+! ***************
+! *** END ***
+! ***************
+
+ end subroutine AHFinder_mask
+