diff options
author | Erik Schnetter <schnetter@gmail.com> | 2013-05-26 16:25:12 -0400 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2013-05-26 16:25:12 -0400 |
commit | 9791222a06c996805b3509be67f30aa731fcae10 (patch) | |
tree | 594ef1893f6c604421840265e59c7997fc7d6eae /Carpet/CarpetLib/src/bboxset1.cc | |
parent | 606c70ba30488ae8b5bf9384bbe85dc94e0cc522 (diff) |
CarpetLib: New class bboxset2
Rename bboxset to bboxset1.
Implement new class bboxset2, which uses a different internal datastructure than bboxset1.
Make bboxset a typedef for either bboxset1 (default) or bboxset2, as selected by the compile-time macro CARPET_BBOXSET2.
Disable all bboxset2 code if CARPET_NO_BBOXSET2 is given, since bboxset2 uses newer C++ constructs not available on some older compilers.
Diffstat (limited to 'Carpet/CarpetLib/src/bboxset1.cc')
-rw-r--r-- | Carpet/CarpetLib/src/bboxset1.cc | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/bboxset1.cc b/Carpet/CarpetLib/src/bboxset1.cc new file mode 100644 index 000000000..def1a6ba6 --- /dev/null +++ b/Carpet/CarpetLib/src/bboxset1.cc @@ -0,0 +1,55 @@ +#include <algorithm> +#include <cassert> +#include <iostream> +#include <limits> +#include <set> +#include <stack> +#include <vector> + +#include "defs.hh" + +#include "bboxset1.hh" + +using namespace std; + + + +namespace bboxset1 { + + + +template class bboxset<int,1>; +template void bboxset<int,1>::serialise (set<bbox<int,1> >& s) const; +template void bboxset<int,1>::serialise (vector<bbox<int,1> >& v) const; +template size_t memoryof (const bboxset<int,1>& s); +template istream& operator>> (istream& is, bboxset<int,1>& s); +template ostream& operator<< (ostream& os, const bboxset<int,1>& s); + +template class bboxset<int,2>; +template void bboxset<int,2>::serialise (set<bbox<int,2> >& s) const; +template void bboxset<int,2>::serialise (vector<bbox<int,2> >& v) const; +template size_t memoryof (const bboxset<int,2>& s); +template istream& operator>> (istream& is, bboxset<int,2>& s); +template ostream& operator<< (ostream& os, const bboxset<int,2>& s); + +template class bboxset<int,3>; +template void bboxset<int,3>::serialise (set<bbox<int,3> >& s) const; +template void bboxset<int,3>::serialise (vector<bbox<int,3> >& f) const; +template size_t memoryof (const bboxset<int,3>& s); +template istream& operator>> (istream& is, bboxset<int,3>& s); +template ostream& operator<< (ostream& os, const bboxset<int,3>& s); + +} // namespace bboxset1 + + + +#include "dh.hh" +#include "region.hh" + +namespace bboxset1 { + +template bboxset<int,dim>::bboxset (const vector<dh::full_dboxes>& vb, const bbox<int,dim> dh::full_dboxes::* const v); +template bboxset<int,dim>::bboxset (const vector<dh::full_dboxes>& vb, const bboxset<int,dim> dh::full_dboxes::* const v); +template bboxset<int,dim>::bboxset (const vector<region_t>& vb, const bbox<int,dim> region_t::* const v); + +} // namespace bboxset1 |