diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2011-05-22 21:32:17 -0400 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2011-12-14 18:26:19 +0000 |
commit | 4f862253c5ac04f683d7b5f2911f555c917097b8 (patch) | |
tree | 64b4fce62a09a727c851237ea672964045e5fd50 /Carpet/CarpetReduce | |
parent | f7f69d561635cfdcc5dfb610184e581086b4e7af (diff) |
CarpetReduce: Correct check for sufficient ghost zones
Diffstat (limited to 'Carpet/CarpetReduce')
-rw-r--r-- | Carpet/CarpetReduce/src/reduce.cc | 8 |
1 files changed, 6 insertions, 2 deletions
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<dim; ++d) { assert (mylsh[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<grpdim; ++d) { assert (lsh[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<int,dim> mylsh, mynghostzones; |