! Registration of symmetries for the necessary grid functions. ! $Header$ #include "cctk.h" #include "cctk_Arguments.h" #include "cctk_Parameters.h" #include "cctk_Functions.h" subroutine EHFinder_SetSym(CCTK_ARGUMENTS) use EHFinder_mod implicit none DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS CCTK_INT, dimension(3) :: sym ! All grid functions have even symmetries in all directions. sym = 1 ! Set up symmetries for the level set function. call SetCartSymGN ( ierr, cctkGH, sym, 'ehfinder::f' ) if ( ierr .gt. 0 ) then call CCTK_WARN(1,'Failed to register symmetry for the level set function') end if ! Set up symmetries for the mask function. call SetCartSymGN( ierr, cctkGH, sym, 'ehfinder::eh_mask' ) if ( ierr .gt. 0 ) then call CCTK_WARN(1,'Failed to register symmetry for eh_mask') end if ! Set up symmetries for the surface index function. call SetCartSymGN(ierr,cctkGH,sym,'ehfinder::surface_index') if ( ierr .gt. 0 ) then call CCTK_WARN(1,'Failed to register symmetry for sc') end if return end subroutine EHFinder_SetSym subroutine EHFinder_ApplySymAll(CCTK_ARGUMENTS) use EHFinder_mod implicit none DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS DECLARE_CCTK_FUNCTIONS character(len=80) :: warn_message ! Apply symmetry for the level set function. call CartSymGN ( ierr, cctkGH, 'ehfinder::f' ) if ( ierr .gt. 0 ) then warn_message = 'Failed to perform symmetry operation on the level ' warn_message = trim(warn_message)//'set function' call CCTK_WARN( 1, trim(warn_message) ) end if ! Apply symmetry for the mask function. call CartSymGN ( ierr, cctkGH, 'ehfinder::eh_mask' ) if ( ierr .gt. 0 ) then call CCTK_WARN( 1, 'Failed to perform symmetry operation on the mask') end if return end subroutine EHFinder_ApplySymAll subroutine EHFinder_ApplySymF(CCTK_ARGUMENTS) use EHFinder_mod implicit none DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS DECLARE_CCTK_FUNCTIONS character(len=80) :: warn_message ! Apply symmetry for the level set function. call CartSymGN ( ierr, cctkGH, 'ehfinder::f' ) if ( ierr .gt. 0 ) then warn_message = 'Failed to perform symmetry operation on the level ' warn_message = trim(warn_message)//'set function' call CCTK_WARN( 1, trim(warn_message) ) end if return end subroutine EHFinder_ApplySymF subroutine EHFinder_ApplySymMask(CCTK_ARGUMENTS) use EHFinder_mod implicit none DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS DECLARE_CCTK_FUNCTIONS ! Apply symmetry for the mask function. call CartSymGN ( ierr, cctkGH, 'ehfinder::eh_mask' ) if ( ierr .gt. 0 ) then call CCTK_WARN( 1, 'Failed to perform symmetry operation on the mask') end if return end subroutine EHFinder_ApplySymMask subroutine EHFinder_ApplySymSC(CCTK_ARGUMENTS) use EHFinder_mod implicit none DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS DECLARE_CCTK_FUNCTIONS character(len=80) :: warn_message ! Apply the symmetry for the surface index function. call CartSymGN ( ierr, cctkGH, 'ehfinder::surface_index' ) if ( ierr .gt. 0 ) then warn_message = 'Failed to perform symmetry operation on the surface index' call CCTK_WARN( 1, trim(warn_message) ) end if return end subroutine EHFinder_ApplySymSC