aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/bboxset.hh
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetLib/src/bboxset.hh')
-rw-r--r--Carpet/CarpetLib/src/bboxset.hh17
1 files changed, 16 insertions, 1 deletions
diff --git a/Carpet/CarpetLib/src/bboxset.hh b/Carpet/CarpetLib/src/bboxset.hh
index 5624ef4b1..23b2dc18c 100644
--- a/Carpet/CarpetLib/src/bboxset.hh
+++ b/Carpet/CarpetLib/src/bboxset.hh
@@ -142,11 +142,26 @@ public:
/** Find the pseudo-inverse. */
bboxset pseudo_inverse (const int n) const;
- /** Expand (enlarge) the bbox by multiples of the stride. */
+ /** Expand (enlarge) the bboxset by multiples of the stride. */
bboxset expand (const vect<T,D>& lo, const vect<T,D>& hi) const;
bboxset expand (const vect<vect<T,D>,2>& lohi) const
{ return expand (lohi[0], lohi[1]); }
+ /** Shift the bboxset by multiples of the stride. */
+ bboxset shift (const vect<T,D>& v) const
+ { return expand (-v, v); }
+
+ /** Expand (enlarge) the bboxset by multiples of a fraction of the
+ stride. */
+ bboxset expand (const vect<T,D>& lo, const vect<T,D>& hi,
+ const vect<T,D>& denom) const;
+ bboxset expand (const vect<vect<T,D>,2>& lohi, const vect<T,D>& denom) const
+ { return expand (lohi[0], lohi[1], denom); }
+
+ /** Shift the bboxset by multiples of a fraction of the stride. */
+ bboxset shift (const vect<T,D>& v, const vect<T,D>& denom) const
+ { return expand (-v, v, denom); }
+
/** Find the smallest b-compatible box around this bbox.
("compatible" means having the same stride.) */
bboxset expanded_for (const box& b) const;