From 4f862253c5ac04f683d7b5f2911f555c917097b8 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 22 May 2011 21:32:17 -0400 Subject: CarpetReduce: Correct check for sufficient ghost zones --- Carpet/CarpetReduce/src/reduce.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Carpet/CarpetReduce') diff --git a/Carpet/CarpetReduce/src/reduce.cc b/Carpet/CarpetReduce/src/reduce.cc index 05a166461..8b256bb93 100644 --- a/Carpet/CarpetReduce/src/reduce.cc +++ b/Carpet/CarpetReduce/src/reduce.cc @@ -889,7 +889,9 @@ namespace CarpetReduce { for (int d=0; d=0); - assert (mynghostzones[d]>=0 and 2*mynghostzones[d]<=mylsh[d]); + assert (mynghostzones[d]>=0); + int const nb = !mybbox[2*d] + !mybbox[2*d+1]; + assert (nb*mynghostzones[d]<=mylsh[d]); } const int vartypesize = CCTK_VarTypeSize(outtype); @@ -1409,7 +1411,9 @@ namespace CarpetReduce { assert (not ierr); for (int d=0; d=0); - assert (nghostzones[d]>=0 and 2*nghostzones[d]<=lsh[d]); + assert (nghostzones[d]>=0); + int const nb = !bbox[2*d] + !bbox[2*d+1]; + assert (nb*nghostzones[d]<=lsh[d]); } vect mylsh, mynghostzones; -- cgit v1.2.3