diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2010-04-27 09:46:29 -0500 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2011-12-14 16:45:43 +0000 |
commit | 5758e652fb8f26243b59b54970cdbbbec39178fe (patch) | |
tree | 9909ed0435d6095ad976e4d4d258c6ff4db16752 /Carpet/CarpetLib/src/vect.cc | |
parent | d99f67e3830f67507267bf9bfcbe946ce8634d15 (diff) |
CarpetLib: Add new bboxset functions
New functions:
- construct a bboxset from a container of bboxes
- expand or contract bboxsets
Diffstat (limited to 'Carpet/CarpetLib/src/vect.cc')
-rw-r--r-- | Carpet/CarpetLib/src/vect.cc | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/vect.cc b/Carpet/CarpetLib/src/vect.cc index 4a573d6af..b02a46979 100644 --- a/Carpet/CarpetLib/src/vect.cc +++ b/Carpet/CarpetLib/src/vect.cc @@ -4,6 +4,7 @@ #include "cctk.h" #include "defs.hh" +#include "bboxset.hh" #include "vect.hh" @@ -83,3 +84,37 @@ template void vect<vect<bool,2>,dim>::output (ostream& os) const; template void vect<vect<int,2>,dim>::output (ostream& os) const; template void vect<vect<bool,dim>,2>::output (ostream& os) const; template void vect<vect<int,dim>,2>::output (ostream& os) const; +template void vect<vect<CCTK_REAL,dim>,2>::output (ostream& os) const; + + + +// Instantiate for bboxset class + +#define DEFINE_FAKE_VECT_OPERATIONS(T,D) \ +template<> vect<T,D> vect<T,D>::dir (const int d) { assert(0); } \ +template<> vect<T,D> vect<T,D>::seq () { assert(0); } \ +template<> vect<T,D> vect<T,D>::seq (const int n) { assert(0); } \ +template<> vect<T,D> vect<T,D>::seq (const int n, const int s) { assert(0); } \ +template<> vect<T,D>& vect<T,D>::operator*= (const vect<T,D>&) { assert(0); } \ +template<> vect<T,D>& vect<T,D>::operator*= (const T&) { assert(0); } \ +template<> vect<T,D>& vect<T,D>::operator/= (const vect<T,D>&) { assert(0); } \ +template<> vect<T,D>& vect<T,D>::operator/= (const T&) { assert(0); } \ +template<> vect<T,D>& vect<T,D>::operator%= (const vect<T,D>&) { assert(0); } \ +template<> vect<T,D>& vect<T,D>::operator%= (const T&) { assert(0); } \ +template<> vect<T,D>& vect<T,D>::operator^= (const vect<T,D>&) { assert(0); } \ +template<> vect<T,D>& vect<T,D>::operator^= (const T&) { assert(0); } \ +template<> vect<T,D> vect<T,D>::operator+ () const { assert(0); } \ +template<> vect<T,D> vect<T,D>::operator- () const { assert(0); } \ +template<> vect<T,D> vect<T,D>::operator~ () const { assert(0); } \ +template class vect<T,D>; \ +template size_t memoryof (const vect<T,D>&); \ +template istream& operator>> (istream& is, vect<T,D>&); \ +template ostream& operator<< (ostream& os, const vect<T,D>&); + +typedef bboxset<int,dim> T1; +typedef vect<bboxset<int,dim>,2> T2; + +DEFINE_FAKE_VECT_OPERATIONS(T1,dim) +DEFINE_FAKE_VECT_OPERATIONS(T2,dim) + +#undef DEFINE_FAKE_VECT_OPERATIONS |