diff options
author | schnetter <schnetter@f75ba9e5-694f-0410-ac2c-87ea7ce7132b> | 2004-02-14 15:04:53 +0000 |
---|---|---|
committer | schnetter <schnetter@f75ba9e5-694f-0410-ac2c-87ea7ce7132b> | 2004-02-14 15:04:53 +0000 |
commit | d25673061d63055b0e2eef0175c73a84fda9d328 (patch) | |
tree | c2f8c96577677293aa20ab46378de8df44dc0dac /src/findboundary.F90 | |
parent | ebfba39ca547292af7cb28501756fa0b1c766eeb (diff) |
Add parameters to set the origin of the excision region for "fixed
excision".
When checking for (real-valued) mask values, do not check for
equality, but instead allow for a fudge factor.
Check that the thorn is activated when any of its routines are called.
When there is only a single point excised, do not abort with an
internal error, but pretend the normal extends into the x direction.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/LegoExcision/trunk@42 f75ba9e5-694f-0410-ac2c-87ea7ce7132b
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 |