aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/vect.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2009-09-03 16:19:15 -0500
committerBarry Wardell <barry.wardell@gmail.com>2011-12-14 16:42:31 +0000
commit11c4d98017cbb86d08e15fd1b549180184b58a26 (patch)
tree2546a154c6f7bc0bec87de7316125ae7d1453569 /Carpet/CarpetLib/src/vect.cc
parentf520477b1c14e02f1495cfa8d3e09f4e21ab34d0 (diff)
Import Carpet
Ignore-this: 309b4dd613f4af2b84aa5d6743fdb6b3
Diffstat (limited to 'Carpet/CarpetLib/src/vect.cc')
-rw-r--r--Carpet/CarpetLib/src/vect.cc39
1 files changed, 30 insertions, 9 deletions
diff --git a/Carpet/CarpetLib/src/vect.cc b/Carpet/CarpetLib/src/vect.cc
index 28eff14dc..e38ed745a 100644
--- a/Carpet/CarpetLib/src/vect.cc
+++ b/Carpet/CarpetLib/src/vect.cc
@@ -43,21 +43,42 @@ void vect<T,D>::output (ostream& os) const {
+// Specialise some constructors for lower dimensions
+// These functions are declared, but must not be used.
+
+template<> vect<int,0>::vect (const int& x, const int& y) { assert(0); }
+template<> vect<int,1>::vect (const int& x, const int& y) { assert(0); }
+template<> vect<int,3>::vect (const int& x, const int& y) { assert(0); }
+template<> vect<int,4>::vect (const int& x, const int& y) { assert(0); }
+
+template<> vect<int,0>::vect (const int& x, const int& y, const int& z) { assert(0); }
+template<> vect<int,1>::vect (const int& x, const int& y, const int& z) { assert(0); }
+template<> vect<int,2>::vect (const int& x, const int& y, const int& z) { assert(0); }
+template<> vect<int,4>::vect (const int& x, const int& y, const int& z) { assert(0); }
+
+template<> vect<int,0>::vect (const int& x, const int& y, const int& z, const int& t) { assert(0); }
+template<> vect<int,1>::vect (const int& x, const int& y, const int& z, const int& t) { assert(0); }
+template<> vect<int,2>::vect (const int& x, const int& y, const int& z, const int& t) { assert(0); }
+template<> vect<int,3>::vect (const int& x, const int& y, const int& z, const int& t) { assert(0); }
+
+
+
// Note: We need all dimensions all the time.
template class vect<int,0>;
template class vect<int,1>;
template class vect<int,2>;
template class vect<int,3>;
+template class vect<int,4>;
-template void vect<CCTK_REAL,3>::input (istream& is);
-template void vect<vect<bool,2>,3>::input (istream& is);
-template void vect<vect<bool,3>,2>::input (istream& is);
+template void vect<CCTK_REAL,dim>::input (istream& is);
+template void vect<vect<bool,2>,dim>::input (istream& is);
+template void vect<vect<bool,dim>,2>::input (istream& is);
template void vect<bool,2>::output (ostream& os) const;
-template void vect<bool,3>::output (ostream& os) const;
+template void vect<bool,dim>::output (ostream& os) const;
template void vect<CCTK_REAL,2>::output (ostream& os) const;
-template void vect<CCTK_REAL,3>::output (ostream& os) const;
-template void vect<vect<bool,2>,3>::output (ostream& os) const;
-template void vect<vect<int,2>,3>::output (ostream& os) const;
-template void vect<vect<bool,3>,2>::output (ostream& os) const;
-template void vect<vect<int,3>,2>::output (ostream& os) const;
+template void vect<CCTK_REAL,dim>::output (ostream& os) const;
+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;