diff options
author | Erik Schnetter <schnetter@gmail.com> | 2013-01-25 10:06:49 -0500 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2013-01-25 10:06:49 -0500 |
commit | a857c18c883613c79f33028ef7ba6636785ebdd6 (patch) | |
tree | 12d063d5a7b76d2a04098c361e5581960d6778e6 | |
parent | ccd9a0e8a74c9dd6f91da5ea351d8d720835868c (diff) |
CarpetRegrid2: Correct another error in handling min_fraction
-rw-r--r-- | Carpet/CarpetRegrid2/src/property.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Carpet/CarpetRegrid2/src/property.cc b/Carpet/CarpetRegrid2/src/property.cc index e7df4ea24..ac80721f5 100644 --- a/Carpet/CarpetRegrid2/src/property.cc +++ b/Carpet/CarpetRegrid2/src/property.cc @@ -202,10 +202,12 @@ namespace CarpetRegrid2 { CCTK_REAL const combined_size = static_cast <CCTK_REAL> (combined.size()); - // Is the current setup simple enough? (It is "simple enough" if - // using a single bbox would be too inefficient.) + // Is the current setup "simple enough"? (It is "simple enough" if + // either it already consists of a single box, or if using a + // single bbox would be too inefficient.) // TODO: Check this also for pairs of regions - return min_fraction * combined_size > regions_size; + return (regions.at(rl).setsize() == 1 or + min_fraction * combined_size > regions_size); } void combine_regions:: |