]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Generate instantiations automatically.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 9 Dec 2007 18:36:33 +0000 (18:36 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 9 Dec 2007 18:36:33 +0000 (18:36 +0000)
git-svn-id: https://svn.dealii.org/trunk@15579 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/precondition_block.cc
deal.II/lac/source/precondition_block.inst.in [new file with mode: 0644]

index a5d8dd40af517823956ba7236b34063b2bd0bc70..6305abd17290f7385a48183374ba9fd129cb9968 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005, 2006 by the deal.II authors
+//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 #include <lac/sparse_matrix.h>
 
 DEAL_II_NAMESPACE_OPEN
-
-
-// explicit instantiations for "float" PreconditionBlock
-template class PreconditionBlock<SparseMatrix<float>, float>;
-
-// the instantiation for class PreconditionBlock<SparseMatrix<float>, double> is skipped
-// because it does not make sense to have inverse block matrices with
-// higher precision than the matrix itself
-
-
-// explicit instantiations for "double" PreconditionBlock
-template class PreconditionBlock<SparseMatrix<double>, float>;
-
-template class PreconditionBlock<SparseMatrix<double>, double>;
-
-
-/*--------------------- PreconditionBlockJacobi -----------------------*/
-
-
-// explicit instantiations for "float" PreconditionBlock
-template class PreconditionBlockJacobi<SparseMatrix<float>, float>;
-
-template void PreconditionBlockJacobi<SparseMatrix<float>, float>::vmult<float>
-(Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<float>, float>::vmult<double>
-(Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<float>, float>::Tvmult<float>
-(Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<float>, float>::Tvmult<double>
-(Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<float>, float>::vmult_add<float>
-(Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<float>, float>::vmult_add<double>
-(Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<float>, float>::Tvmult_add<float>
-(Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<float>, float>::Tvmult_add<double>
-(Vector<double> &, const Vector<double> &) const;
-
-template class PreconditionBlockJacobi<SparseMatrix<double>, float>;
-
-template void PreconditionBlockJacobi<SparseMatrix<double>, float>::vmult<float>
-(Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<double>, float>::vmult<double>
-(Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<double>, float>::Tvmult<float>
-(Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<double>, float>::Tvmult<double>
-(Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<double>, float>::vmult_add<float>
-(Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<double>, float>::vmult_add<double>
-(Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<double>, float>::Tvmult_add<float>
-(Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<double>, float>::Tvmult_add<double>
-(Vector<double> &, const Vector<double> &) const;
-
-template class PreconditionBlockJacobi<SparseMatrix<double>, double>;
-
-template void PreconditionBlockJacobi<SparseMatrix<double>, double>::vmult<float>
-(Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<double>, double>::vmult<double>
-(Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<double>, double>::Tvmult<float>
-(Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<double>, double>::Tvmult<double>
-(Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<double>, double>::vmult_add<float>
-(Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<double>, double>::vmult_add<double>
-(Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<double>, double>::Tvmult_add<float>
-(Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockJacobi<SparseMatrix<double>, double>::Tvmult_add<double>
-(Vector<double> &, const Vector<double> &) const;
-
-/*--------------------- PreconditionBlockGaussSeidel -----------------------*/
-
-
-// explicit instantiations for "float" PreconditionBlock
-template class PreconditionBlockSOR<SparseMatrix<float>, float>;
-
-template void PreconditionBlockSOR<SparseMatrix<float>, float>::vmult<float> (
-  Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockSOR<SparseMatrix<float>, float>::vmult<double> (
-  Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockSOR<SparseMatrix<float>, float>::Tvmult<float> (
-  Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockSOR<SparseMatrix<float>, float>::Tvmult<double> (
-  Vector<double> &, const Vector<double> &) const;
-
-
-// the instantiation for class PreconditionBlockSOR<SparseMatrix<float>, double> is skipped
-// because it does not make sense to have inverse block matrices with
-// higher precision than the matrix itself
-
-
-// explicit instantiations for "double" PreconditionBlockSOR
-template class PreconditionBlockSOR<SparseMatrix<double>, float>;
-
-
-template void PreconditionBlockSOR<SparseMatrix<double>, float>::vmult<float> (
-  Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockSOR<SparseMatrix<double>, float>::vmult<double> (
-  Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockSOR<SparseMatrix<double>, float>::Tvmult<float> (
-  Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockSOR<SparseMatrix<double>, float>::Tvmult<double> (
-  Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockSOR<SparseMatrix<double>, float>::vmult_add<float> (
-  Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockSOR<SparseMatrix<double>, float>::vmult_add<double> (
-  Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockSOR<SparseMatrix<double>, float>::Tvmult_add<float> (
-  Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockSOR<SparseMatrix<double>, float>::Tvmult_add<double> (
-  Vector<double> &, const Vector<double> &) const;
-
-template class PreconditionBlockSOR<SparseMatrix<double>, double>;
-
-template void PreconditionBlockSOR<SparseMatrix<double>, double>::vmult<float> (
-  Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockSOR<SparseMatrix<double>, double>::vmult<double> (
-  Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockSOR<SparseMatrix<double>, double>::Tvmult<float> (
-  Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockSOR<SparseMatrix<double>, double>::Tvmult<double> (
-  Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockSOR<SparseMatrix<double>, double>::vmult_add<float> (
-  Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockSOR<SparseMatrix<double>, double>::vmult_add<double> (
-  Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockSOR<SparseMatrix<double>, double>::Tvmult_add<float> (
-  Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockSOR<SparseMatrix<double>, double>::Tvmult_add<double> (
-  Vector<double> &, const Vector<double> &) const;
-
-
-/*--------------------- PreconditionBlockSSOR -----------------------*/
-
-
-// explicit instantiations for "float" PreconditionBlock
-template class PreconditionBlockSSOR<SparseMatrix<float>, float>;
-
-template void PreconditionBlockSSOR<SparseMatrix<float>, float>::vmult<float> (
-  Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockSSOR<SparseMatrix<float>, float>::vmult<double> (
-  Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockSSOR<SparseMatrix<float>, float>::Tvmult<float> (
-  Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockSSOR<SparseMatrix<float>, float>::Tvmult<double> (
-  Vector<double> &, const Vector<double> &) const;
-
-
-// the instantiation for class PreconditionBlockSSOR<SparseMatrix<float>, double> is skipped
-// because it does not make sense to have inverse block matrices with
-// higher precision than the matrix itself
-
-
-// explicit instantiations for "double" PreconditionBlockSSOR
-template class PreconditionBlockSSOR<SparseMatrix<double>, float>;
-
-
-template void PreconditionBlockSSOR<SparseMatrix<double>, float>::vmult<float> (
-  Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockSSOR<SparseMatrix<double>, float>::vmult<double> (
-  Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockSSOR<SparseMatrix<double>, float>::Tvmult<float> (
-  Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockSSOR<SparseMatrix<double>, float>::Tvmult<double> (
-  Vector<double> &, const Vector<double> &) const;
-
-template class PreconditionBlockSSOR<SparseMatrix<double>, double>;
-
-template void PreconditionBlockSSOR<SparseMatrix<double>, double>::vmult<float> (
-  Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockSSOR<SparseMatrix<double>, double>::vmult<double> (
-  Vector<double> &, const Vector<double> &) const;
-template void PreconditionBlockSSOR<SparseMatrix<double>, double>::Tvmult<float> (
-  Vector<float> &, const Vector<float> &) const;
-template void PreconditionBlockSSOR<SparseMatrix<double>, double>::Tvmult<double> (
-  Vector<double> &, const Vector<double> &) const;
-
+#include "precondition_block.inst"
 DEAL_II_NAMESPACE_CLOSE
diff --git a/deal.II/lac/source/precondition_block.inst.in b/deal.II/lac/source/precondition_block.inst.in
new file mode 100644 (file)
index 0000000..f2df344
--- /dev/null
@@ -0,0 +1,79 @@
+//---------------------------------------------------------------------------
+//    $Id: precondition_block.cc 14038 2006-10-23 02:46:34Z bangerth $
+//    Version: $Name$
+//
+//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//---------------------------------------------------------------------------
+
+
+for (S1, S2 : REAL_SCALAR)
+  {
+    template class PreconditionBlock<SparseMatrix<S1>, S2>;
+
+// ------------ PreconditionBlockJacobi -----------------
+    template class PreconditionBlockJacobi<SparseMatrix<S1>, S2>;
+
+    template
+      void PreconditionBlockJacobi<SparseMatrix<S1>, S2>::vmult<S2>
+      (Vector<S2> &, const Vector<S2> &) const;
+    template
+      void PreconditionBlockJacobi<SparseMatrix<S1>, S2>::vmult<S1>
+      (Vector<S1> &, const Vector<S1> &) const;
+    template
+      void PreconditionBlockJacobi<SparseMatrix<S1>, S2>::Tvmult<S2>
+      (Vector<S2> &, const Vector<S2> &) const;
+    template
+      void PreconditionBlockJacobi<SparseMatrix<S1>, S2>::Tvmult<S1>
+      (Vector<S1> &, const Vector<S1> &) const;
+    template
+      void PreconditionBlockJacobi<SparseMatrix<S1>, S2>::vmult_add<S2>
+      (Vector<S2> &, const Vector<S2> &) const;
+    template
+      void PreconditionBlockJacobi<SparseMatrix<S1>, S2>::vmult_add<S1>
+      (Vector<S1> &, const Vector<S1> &) const;
+    template
+      void PreconditionBlockJacobi<SparseMatrix<S1>, S2>::Tvmult_add<S2>
+      (Vector<S2> &, const Vector<S2> &) const;
+    template
+      void PreconditionBlockJacobi<SparseMatrix<S1>, S2>::Tvmult_add<S1>
+      (Vector<S1> &, const Vector<S1> &) const;
+
+// ------------ PreconditionBlockSOR -----------------
+    template class PreconditionBlockSOR<SparseMatrix<S1>, S2>;
+
+    template
+      void PreconditionBlockSOR<SparseMatrix<S1>, S2>::vmult<S2>
+      (Vector<S2> &, const Vector<S2> &) const;
+    template
+      void PreconditionBlockSOR<SparseMatrix<S1>, S2>::vmult<S1>
+      (Vector<S1> &, const Vector<S1> &) const;
+    template
+      void PreconditionBlockSOR<SparseMatrix<S1>, S2>::Tvmult<S2>
+      (Vector<S2> &, const Vector<S2> &) const;
+    template
+      void PreconditionBlockSOR<SparseMatrix<S1>, S2>::Tvmult<S1>
+      (Vector<S1> &, const Vector<S1> &) const;
+
+// ------------ PreconditionBlockSSOR -----------------
+    template class PreconditionBlockSSOR<SparseMatrix<S1>, S2>;
+
+    template
+      void PreconditionBlockSSOR<SparseMatrix<S1>, S2>::vmult<S2>
+      (Vector<S2> &, const Vector<S2> &) const;
+    template
+      void PreconditionBlockSSOR<SparseMatrix<S1>, S2>::vmult<S1>
+      (Vector<S1> &, const Vector<S1> &) const;
+    template
+      void PreconditionBlockSSOR<SparseMatrix<S1>, S2>::Tvmult<S2>
+      (Vector<S2> &, const Vector<S2> &) const;
+    template
+      void PreconditionBlockSSOR<SparseMatrix<S1>, S2>::Tvmult<S1>
+      (Vector<S1> &, const Vector<S1> &) const;
+  }
+

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.