aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ADMConstraints.F13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ADMConstraints.F b/src/ADMConstraints.F
index 7715ce9..41e9224 100644
--- a/src/ADMConstraints.F
+++ b/src/ADMConstraints.F
@@ -41,6 +41,7 @@ c Stencil width used for calculating constraints
c (for outer boundary condition)
integer sw(3)
+ logical docalc
c Return code from Cactus sync routine and boundary conditions.
@@ -109,8 +110,16 @@ c Calculate constraints.
do k=2,nz-1
do j=2,ny-1
do i=2,nx-1
-
- if ((use_mask .eq. 0) .or. (emask(i,j,k) .eq. 1)) then
+
+ docalc = 1
+
+ if (use_mask .eq. 1) then
+ if (emask(i,j,k) .ne. 1) then
+ docalc = 0
+ end if
+ end if
+
+ if (docalc) then
ialp = 1.0D0/alp(i,j,k)
ialp2 = ialp**2