From 50de206ab0003b552fd418498cee9d5579209525 Mon Sep 17 00:00:00 2001 From: miguel Date: Tue, 3 Apr 2001 15:13:57 +0000 Subject: Added comments. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/LegoExcision/trunk@16 f75ba9e5-694f-0410-ac2c-87ea7ce7132b --- src/findboundary.F90 | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/findboundary.F90 b/src/findboundary.F90 index c729fe8..0dbc5b6 100644 --- a/src/findboundary.F90 +++ b/src/findboundary.F90 @@ -26,25 +26,40 @@ subroutine excision_findboundary (ierr, mask, ni, nj, nk) ! inout: mask CCTK_REAL :: mask(ni,nj,nk) - + +! Internal variables. + integer i,j,k integer ii,jj,kk logical bnd - + +! Loop over grid points. + do k=2,nk-1 do j=2,nj-1 do i=2,ni-1 + +! Check if we are in an excised point. + if (mask(i,j,k)==MASK_EXCISED) then + bnd = .false. + +! If any neighbour is active, mask the point +! as a boundary point. + do kk=k-1,k+1 do jj=j-1,j+1 do ii=i-1,i+1 - bnd = bnd .or. mask(ii,jj,kk)==MASK_ACTIVE + bnd = bnd.or.mask(ii,jj,kk)==MASK_ACTIVE end do end do end do + if (bnd) mask(i,j,k) = MASK_BOUNDARY + end if + end do end do end do -- cgit v1.2.3