aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetReduce
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetReduce')
-rw-r--r--Carpet/CarpetReduce/src/mask_carpet.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/Carpet/CarpetReduce/src/mask_carpet.cc b/Carpet/CarpetReduce/src/mask_carpet.cc
index f176057e0..08c8e4a5c 100644
--- a/Carpet/CarpetReduce/src/mask_carpet.cc
+++ b/Carpet/CarpetReduce/src/mask_carpet.cc
@@ -234,7 +234,9 @@ namespace CarpetMask {
cctk_lsh[0],cctk_lsh[1],cctk_lsh[2])
{
int const ind = CCTK_GFINDEX3D (cctkGH, i, j, k);
- iweight[ind] &= imask[ind];
+ if (imask[ind] != 0) {
+ iweight[ind] &= imask[ind];
+ }
} LC_ENDLOOP3(CarpetMaskSetup_restriction_boundary_apply);
} END_LOCAL_COMPONENT_LOOP;