#include "cctk.h" /*@@ @routine SymmetryCondition @date Mon Mar 15 15:51:57 1999 @author Gerd Lanfermann @desc Routine performs the symmetry boundary operations. @enddesc @calls @calledby @history @endhistory @@*/ subroutine SymmetryCondition(nxyz,var,nghostzones,sym,doSym) implicit none integer i,j,k INTEGER nxyz(3) CCTK_REAL var(nxyz(1),nxyz(2),nxyz(3)) INTEGER nghostzones INTEGER sym(6) INTEGER doSym(6) INTEGER sw c Apply symmetry if c * the grid chunk has a physical boundary (bbox) c * its size in a direction is bigger than one (sh) c * we actually want a symmetry (sx.ne.ESYM_UNSET) if (doSym(2) .eq. 1 .or. doSym(4) .eq. 1 .or. doSym(6) .eq. 1) then call CCTKi_NotYetImplemented("Right hand side boundary conditions") end if if (doSym(1) .eq. 1) then do sw=1, nghostzones do j=1,nxyz(2) do k=1,nxyz(3) var(sw,j,k) = sym(1)*var(nghostzones+sw,j,k) end do end do end do end if if (doSym(3) .eq. 1) then do sw=1, nghostzones do i=1,nxyz(1) do k=1,nxyz(3) var(i,sw,k) = sym(3)*var(i,nghostzones+sw,k) end do end do end do end if if (doSym(5).eq.1) then do sw=1, nghostzones do i=1,nxyz(1) do j=1,nxyz(2) var(i,j,sw) = sym(5)*var(i,j,nghostzones+sw) end do end do end do end if return end