aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Carpet/CarpetLib/src/vect.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/vect.hh b/Carpet/CarpetLib/src/vect.hh
index 47ee1e214..c91a88068 100644
--- a/Carpet/CarpetLib/src/vect.hh
+++ b/Carpet/CarpetLib/src/vect.hh
@@ -284,6 +284,12 @@ public:
return r;
}
+ vect reverse () const {
+ vect r;
+ for (int d=0; d<D; ++d) r[d]=elt[D-1-d];
+ return r;
+ }
+
vect operator+ () const {
vect r;
for (int d=0; d<D; ++d) r[d]=+elt[d];