Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make compatibility code compile once more #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CarpetLib/src/bboxset1.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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<T, D>(lo), vect<T, D>(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<T, D> &v, const vect<T, D> &denom) const {
return expand(-v, v, denom);
}

/** Shift all points */
bboxset shift(const vect<T, D> &dist, const T &dist_denom) const {
return shift(dist, vect<T, D>(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;
Expand Down
2 changes: 1 addition & 1 deletion CarpetLib/src/bboxset2.hh
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ template <typename T, int D> class bboxset {
iter0 != end0 ? iter0->first : numeric_limits<T>::max(); \
const T next_pos1 = \
iter1 != end1 ? iter1->first : numeric_limits<T>::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; \
Expand Down