diff options
Diffstat (limited to 'src/EHFinder_SetSym.F90')
-rw-r--r-- | src/EHFinder_SetSym.F90 | 58 |
1 files changed, 31 insertions, 27 deletions
diff --git a/src/EHFinder_SetSym.F90 b/src/EHFinder_SetSym.F90 index 0a734b0..f130a5e 100644 --- a/src/EHFinder_SetSym.F90 +++ b/src/EHFinder_SetSym.F90 @@ -52,20 +52,21 @@ subroutine EHFinder_ApplySymAll(CCTK_ARGUMENTS) DECLARE_CCTK_PARAMETERS DECLARE_CCTK_FUNCTIONS - character(len=80) :: warn_message + CCTK_INT :: ierr -! 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 +! Select the variable groups for the None boundary condition. When the +! physical boundary condition (a noop in this case) is applied the +! symmetry boundary conditions will be applied automatically. -! 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') + ierr = Boundary_SelectGroupForBC ( cctkGH, CCTK_ALL_FACES, 1, -1, & + 'ehfinder::f', 'None' ) + if ( ierr /= 0 ) then + call CCTK_WARN ( 0, 'Could not select f for boundary condition' ) + end if + ierr = Boundary_SelectGroupForBC ( cctkGH, CCTK_ALL_FACES, 1, -1, & + 'ehfinder::eh_mask', 'None' ) + if ( ierr /= 0 ) then + call CCTK_WARN ( 0, 'Could not select eh_mask for boundary condition' ) end if return @@ -83,13 +84,12 @@ subroutine EHFinder_ApplySymF(CCTK_ARGUMENTS) DECLARE_CCTK_FUNCTIONS character(len=80) :: warn_message + CCTK_INT :: ierr -! 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) ) + ierr = Boundary_SelectGroupForBC ( cctkGH, CCTK_ALL_FACES, 1, -1, & + 'ehfinder::f', 'None' ) + if ( ierr /= 0 ) then + call CCTK_WARN ( 0, 'Could not select f for boundary condition' ) end if return @@ -106,10 +106,13 @@ subroutine EHFinder_ApplySymMask(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') + CCTK_INT :: ierr + + ierr = Boundary_SelectGroupForBC ( cctkGH, CCTK_ALL_FACES, 1, -1, & + 'ehfinder::eh_mask', 'None' ) + + if ( ierr /= 0 ) then + call CCTK_WARN ( 0, 'Could not select eh_mask for boundary condition' ) end if return @@ -127,12 +130,13 @@ subroutine EHFinder_ApplySymSC(CCTK_ARGUMENTS) DECLARE_CCTK_FUNCTIONS character(len=80) :: warn_message + CCTK_INT :: ierr -! 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) ) + ierr = Boundary_SelectGroupForBC ( cctkGH, CCTK_ALL_FACES, 1, -1, & + 'ehfinder::surface_index', 'None' ) + + if ( ierr /= 0 ) then + call CCTK_WARN ( 0, 'Could not select sc for boundary condition' ) end if return |