diff options
Diffstat (limited to 'src/findboundary.F90')
-rw-r--r-- | src/findboundary.F90 | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/findboundary.F90 b/src/findboundary.F90 index 454c91a..2eaa1e1 100644 --- a/src/findboundary.F90 +++ b/src/findboundary.F90 @@ -4,9 +4,8 @@ ! Return a mask where the outermost 0s have been replaced by 0.5s. #include "cctk.h" -#include "cctk_Parameters.h" - #include "cctk_Functions.h" +#include "cctk_Parameters.h" #include "maskvalues.h" @@ -34,6 +33,10 @@ subroutine excision_findboundary (ierr, mask, ni, nj, nk) integer i,j,k integer ii,jj,kk logical bnd + + if (CCTK_IsThornActive(CCTK_THORNSTRING) == 0) then + call CCTK_WARN (0, "The routine excision_findboundary was called, but thorn " // CCTK_THORNSTRING // " is not active") + end if ! Loop over grid points. @@ -43,7 +46,7 @@ subroutine excision_findboundary (ierr, mask, ni, nj, nk) ! Check if we are in an excised point. - if (mask(i,j,k)==MASK_EXCISED) then + if (abs(mask(i,j,k)-MASK_EXCISED)<0.01) then bnd = .false. @@ -53,7 +56,7 @@ subroutine excision_findboundary (ierr, mask, ni, nj, nk) 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.abs(mask(ii,jj,kk)-MASK_ACTIVE)<0.01 end do end do end do |