aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/findnormals.F906
1 files changed, 3 insertions, 3 deletions
diff --git a/src/findnormals.F90 b/src/findnormals.F90
index 85f56c1..e9aebfe 100644
--- a/src/findnormals.F90
+++ b/src/findnormals.F90
@@ -94,9 +94,9 @@ subroutine excision_findnormals (ierr, mask, dirx, diry, dirz, ni, nj, nk)
! To do this, I add 1/2 to all components (with the
! correct sign), ang get the integer part.
- sx = dble(int(dabs(sx)+0.5D0))*sx/dabs(sx)
- sy = dble(int(dabs(sy)+0.5D0))*sy/dabs(sy)
- sz = dble(int(dabs(sz)+0.5D0))*sz/dabs(sz)
+ if (sx /= 0.0D0) sx = dble(int(dabs(sx)+0.5D0))*sx/dabs(sx)
+ if (sy /= 0.0D0) sy = dble(int(dabs(sy)+0.5D0))*sy/dabs(sy)
+ if (sz /= 0.0D0) sz = dble(int(dabs(sz)+0.5D0))*sz/dabs(sz)
! Copy the vector (sx,sy,sz) into the normal arrays.