diff options
Diffstat (limited to 'src/SetSym.F')
-rw-r--r-- | src/SetSym.F | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/src/SetSym.F b/src/SetSym.F index a7d4f45..a7c331b 100644 --- a/src/SetSym.F +++ b/src/SetSym.F @@ -77,3 +77,121 @@ c +,+,- c End. end subroutine AHFinder_SetSym + + + /*@@ + @file SetSym.F + @date Jan 2003 + @author Denis Pollney + @desc + Sets the reflection symmetry flags. + @enddesc + @@*/ + + subroutine AHFinder_SetReflections(CCTK_ARGUMENTS) + use AHFinder_dat + + implicit none + + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + DECLARE_CCTK_FUNCTIONS + + CCTK_REAL, parameter :: zero = 0.0D0 + CCTK_REAL, parameter :: half = 0.5D0 + CCTK_REAL, parameter :: one = 1.0D0 + +! Find out reflection symmetries depending on +! the values of the parameters. + + if ((CCTK_Equals(ahf_octant,"yes").eq.1).or. + . (CCTK_Equals(ahf_octant,"high").eq.1)) then + + refx = .true. + refy = .true. + refz = .true. + + else + + if (ahf_refx.ne.0) then + refx = .true. + else + refx = .false. + end if + + if (ahf_refy.ne.0) then + refy = .true. + else + refy = .false. + end if + + if (ahf_refz.ne.0) then + refz = .true. + else + refz = .false. + end if + + end if + + if (ahf_phi.eq.0) then + refx = .true. + refy = .true. + end if + +! Force grid symmetries. If the grid has some +! symmetry (octant, quadrant, bitant), and the +! horizon is centered on one of the symmetry +! planes, then the grid symmetries are forced +! on it regardless of the values of the symmetry +! parameters. + + if (CCTK_Equals(domain,"octant").eq.1) then + + if (xc.eq.zero) refx = .true. + if (yc.eq.zero) refy = .true. + if (zc.eq.zero) refz = .true. + + else if (CCTK_Equals(domain,"quadrant").eq.1) then + + if (xc.eq.zero) refx = .true. + if (yc.eq.zero) refy = .true. + + else if (CCTK_Equals(domain,"bitant").eq.1) then + + if (CCTK_Equals(bitant_plane,"xy").eq.1) then + if (zc.eq.zero) refz = .true. + else if (CCTK_Equals(bitant_plane,"xz").eq.1) then + if (yc.eq.zero) refy = .true. + else + if (xc.eq.zero) refx = .true. + end if + + end if + +! Check if we are using cartoon. If we are, then the +! corresponding symmetries are forced on the horizon. + + if (ahf_cartoon.ne.0) then + cartoon = .true. + else + cartoon = .false. + end if + + if (cartoon) then + nonaxi = .false. + refx = .true. + refy = .true. + end if + +! If desired, write values of symmetry flags to screen. + + if (veryver) then + write(*,*) + write(*,*) 'Symmetries used for horizon:' + write(*,*) 'refx = ',refx + write(*,*) 'refy = ',refy + write(*,*) 'refz = ',refz + write(*,*) + end if + + end subroutine AHFinder_SetReflections |