diff options
Diffstat (limited to 'src/EHFinder_SetSym.F90')
-rw-r--r-- | src/EHFinder_SetSym.F90 | 100 |
1 files changed, 64 insertions, 36 deletions
diff --git a/src/EHFinder_SetSym.F90 b/src/EHFinder_SetSym.F90 index 817ec2e..b04672d 100644 --- a/src/EHFinder_SetSym.F90 +++ b/src/EHFinder_SetSym.F90 @@ -15,15 +15,24 @@ subroutine EHFinder_SetSym(CCTK_ARGUMENTS) DECLARE_CCTK_PARAMETERS CCTK_INT, dimension(3) :: sym + CCTK_INT :: l + character(len=14) :: fname sym = 1 - call SetCartSymVN(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 - - call SetCartSymVN(ierr,cctkGH,sym,'ehfinder::sc') + do l = 0, eh_number_level_sets - 1 + write(fname,'(a12,i1,a1)') 'ehfinder::f[', l, ']' + call SetCartSymVN(ierr,cctkGH,sym,fname) + if ( ierr .gt. 0 ) then + call CCTK_WARN(1,'Failed to register symmetry for the level set function') + end if +! call SetCartSymVN(ierr,cctkGH,sym,'ehfinder::f[2]') +! if ( ierr .gt. 0 ) then +! call CCTK_WARN(1,'Failed to register symmetry for the level set function') +! end if + end do + + 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 @@ -47,21 +56,27 @@ subroutine EHFinder_ApplySymAll(CCTK_ARGUMENTS) DECLARE_CCTK_PARAMETERS DECLARE_CCTK_FUNCTIONS - call CartSymVN(ierr,cctkGH,'ehfinder::f') + CCTK_INT :: l + character(len=14) :: fname + + do l = 0, eh_number_level_sets - 1 + write(fname,'(a12,i1,a1)') 'ehfinder::f[', l, ']' + call CartSymVN(ierr,cctkGH,fname) + end do # include "include/physical_part.h" if ( symx ) then - eh_mask(ngx:1:-1,:,:) = eh_mask(ngx+1:ngx+ngx,:,:) - rep_mask(ngx:1:-1,:,:) = rep_mask(ngx+1:ngx+ngx,:,:) + eh_mask(ngx:1:-1,:,:,:) = eh_mask(ngx+1:ngx+ngx,:,:,:) +! rep_mask(ngx:1:-1,:,:,:) = rep_mask(ngx+1:ngx+ngx,:,:,:) end if if ( symy ) then - eh_mask(:,ngy:1:-1,:) = eh_mask(:,ngy+1:ngy+ngy,:) - rep_mask(:,ngy:1:-1,:) = rep_mask(:,ngy+1:ngy+ngy,:) + eh_mask(:,ngy:1:-1,:,:) = eh_mask(:,ngy+1:ngy+ngy,:,:) +! rep_mask(:,ngy:1:-1,:,:) = rep_mask(:,ngy+1:ngy+ngy,:,:) end if if ( symz ) then - eh_mask(:,:,ngz:1:-1) = eh_mask(:,:,ngz+1:ngz+ngz) - rep_mask(:,:,ngz:1:-1) = rep_mask(:,:,ngz+1:ngz+ngz) + eh_mask(:,:,ngz:1:-1,:) = eh_mask(:,:,ngz+1:ngz+ngz,:) +! rep_mask(:,:,ngz:1:-1,:) = rep_mask(:,:,ngz+1:ngz+ngz,:) end if return end subroutine EHFinder_ApplySymAll @@ -77,7 +92,14 @@ subroutine EHFinder_ApplySymF(CCTK_ARGUMENTS) DECLARE_CCTK_PARAMETERS DECLARE_CCTK_FUNCTIONS - call CartSymVN(ierr,cctkGH,'ehfinder::f') + CCTK_INT :: l + character(len=14) :: fname + + do l = 0, eh_number_level_sets - 1 + write(fname,'(a12,i1,a1)') 'ehfinder::f[', l, ']' + call CartSymVN(ierr,cctkGH,fname) + end do + return end subroutine EHFinder_ApplySymF @@ -94,15 +116,15 @@ subroutine EHFinder_ApplySymRep(CCTK_ARGUMENTS) # include "include/physical_part.h" - if ( symx ) then - rep_mask(ngx:1:-1,:,:) = rep_mask(ngx+1:ngx+ngx,:,:) - end if - if ( symy ) then - rep_mask(:,ngy:1:-1,:) = rep_mask(:,ngy+1:ngy+ngy,:) - end if - if ( symz ) then - rep_mask(:,:,ngz:1:-1) = rep_mask(:,:,ngz+1:ngz+ngz) - end if +! if ( symx ) then +! rep_mask(ngx:1:-1,:,:,:) = rep_mask(ngx+1:ngx+ngx,:,:,:) +! end if +! if ( symy ) then +! rep_mask(:,ngy:1:-1,:,:) = rep_mask(:,ngy+1:ngy+ngy,:,:) +! end if +! if ( symz ) then +! rep_mask(:,:,ngz:1:-1,:) = rep_mask(:,:,ngz+1:ngz+ngz,:) +! end if return end subroutine EHFinder_ApplySymRep @@ -117,19 +139,25 @@ subroutine EHFinder_ApplySymFRep(CCTK_ARGUMENTS) DECLARE_CCTK_PARAMETERS DECLARE_CCTK_FUNCTIONS + CCTK_INT :: l + character(len=14) :: fname + # include "include/physical_part.h" - call CartSymVN(ierr,cctkGH,'ehfinder::f') + do l = 0, eh_number_level_sets - 1 + write(fname,'(a12,i1,a1)') 'ehfinder::f[', l, ']' + call CartSymVN(ierr,cctkGH,fname) + end do - if ( symx ) then - rep_mask(ngx:1:-1,:,:) = rep_mask(ngx+1:ngx+ngx,:,:) - end if - if ( symy ) then - rep_mask(:,ngy:1:-1,:) = rep_mask(:,ngy+1:ngy+ngy,:) - end if - if ( symz ) then - rep_mask(:,:,ngz:1:-1) = rep_mask(:,:,ngz+1:ngz+ngz) - end if +! if ( symx ) then +! rep_mask(ngx:1:-1,:,:,:) = rep_mask(ngx+1:ngx+ngx,:,:,:) +! end if +! if ( symy ) then +! rep_mask(:,ngy:1:-1,:,:) = rep_mask(:,ngy+1:ngy+ngy,:,:) +! end if +! if ( symz ) then +! rep_mask(:,:,ngz:1:-1,:) = rep_mask(:,:,ngz+1:ngz+ngz,:) +! end if return end subroutine EHFinder_ApplySymFRep @@ -147,13 +175,13 @@ subroutine EHFinder_ApplySymMask(CCTK_ARGUMENTS) # include "include/physical_part.h" if ( symx ) then - eh_mask(ngx:1:-1,:,:) = eh_mask(ngx+1:ngx+ngx,:,:) + eh_mask(ngx:1:-1,:,:,:) = eh_mask(ngx+1:ngx+ngx,:,:,:) end if if ( symy ) then - eh_mask(:,ngy:1:-1,:) = eh_mask(:,ngy+1:ngy+ngy,:) + eh_mask(:,ngy:1:-1,:,:) = eh_mask(:,ngy+1:ngy+ngy,:,:) end if if ( symz ) then - eh_mask(:,:,ngz:1:-1) = eh_mask(:,:,ngz+1:ngz+ngz) + eh_mask(:,:,ngz:1:-1,:) = eh_mask(:,:,ngz+1:ngz+ngz,:) end if return end subroutine EHFinder_ApplySymMask |