diff options
Diffstat (limited to 'Carpet/CarpetLib/src/vect.cc')
-rw-r--r-- | Carpet/CarpetLib/src/vect.cc | 39 |
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; |