diff --git a/CarpetLib/src/bboxset1.hh b/CarpetLib/src/bboxset1.hh index 96fa77015..dd4746684 100644 --- a/CarpetLib/src/bboxset1.hh +++ b/CarpetLib/src/bboxset1.hh @@ -190,12 +190,25 @@ public: return expand(lohi[0], lohi[1], denom); } + /** Expand the set (convolute with a bbox) */ + bboxset expand(const T &lo, const T &hi) const { + return expand(vect(lo), vect(hi)); + } + + /** Expand the set (convolute with a bbox) */ + bboxset expand(const T &lohi) const { return expand(lohi, lohi); } + /** Shift the bboxset by multiples of a fraction of the stride. */ // cost: O(n) bboxset shift(const vect &v, const vect &denom) const { return expand(-v, v, denom); } + /** Shift all points */ + bboxset shift(const vect &dist, const T &dist_denom) const { + return shift(dist, vect(dist_denom)); + } + /** Find the smallest b-compatible box around this bbox. ("compatible" means having the same stride.) */ bboxset expanded_for(const box &b) const CCTK_MEMBER_ATTRIBUTE_PURE; diff --git a/CarpetLib/src/bboxset2.hh b/CarpetLib/src/bboxset2.hh index 4d8dc93a7..ea8a7ec9b 100644 --- a/CarpetLib/src/bboxset2.hh +++ b/CarpetLib/src/bboxset2.hh @@ -219,7 +219,7 @@ template class bboxset { iter0 != end0 ? iter0->first : numeric_limits::max(); \ const T next_pos1 = \ iter1 != end1 ? iter1->first : numeric_limits::max(); \ - const T pos = min(next_pos0, next_pos1); \ + const T pos = std::min(next_pos0, next_pos1); \ const bool active0 = next_pos0 == pos; \ const bool active1 = next_pos1 == pos; \ const bboxset1 *const subset0p = active0 ? iter0->second.get() : 0; \