]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
driver file fixed and split in matrix and vector part
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 30 May 2003 18:40:46 +0000 (18:40 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 30 May 2003 18:40:46 +0000 (18:40 +0000)
git-svn-id: https://svn.dealii.org/trunk@7688 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/sparse_matrix.double.cc
deal.II/lac/source/sparse_matrix.float.cc
deal.II/lac/source/sparse_matrix.in.h [deleted file]
deal.II/lac/source/sparse_matrix_matrix.in.h [new file with mode: 0644]
deal.II/lac/source/sparse_matrix_vector.in.h [new file with mode: 0644]

index bec54b5bd04fed992a77f97fec47b18079a3c96b..67a3b2b1923f0827be7631f9c010dbf24c2b181c 100644 (file)
@@ -1,4 +1,4 @@
-//----------------------------  sparse_matrix.double.cc  ---------------------------
+//---------------------------------------------------------------------------
 //    $Id$
 //    Version: $Name$
 //
@@ -9,7 +9,7 @@
 //    to the file deal.II/doc/license.html for the  text  and
 //    further information on this license.
 //
-//----------------------------  sparse_matrix.double.cc  ---------------------------
+//---------------------------------------------------------------------------
 
 
 #include <lac/sparse_matrix.templates.h>
 
 template class SparseMatrix<TYPEMAT>;
 
-#define TYPEVEC float
+#define TYPE2 float
+#include "sparse_matrix_matrix.in.h"
+#undef TYPE2
 
-#include "sparse_matrix.in.h"
+#define TYPE2 double
+#include "sparse_matrix_matrix.in.h"
+#undef TYPE2
 
+#define TYPEVEC float
+#include "sparse_matrix_vector.in.h"
 #undef TYPEVEC
-#define TYPEVEC double
 
-#include "sparse_matrix.in.h"
+#define TYPEVEC double
+#include "sparse_matrix_vector.in.h"
+#undef TYPEVEC
 
                                 // a prerelease of gcc3.0 fails to
                                 // compile this due to long double
@@ -34,5 +41,4 @@ template class SparseMatrix<TYPEMAT>;
 
 //  #include <lac/sparse_matrix.2.templates>
 
-#undef TYPEVEC
 #undef TYPEMAT
index c5baea8a8e188b45ecdf18bbaddfad1a1bb06b4b..7aae94aac1db0190f93ad107725f0365f8b195bb 100644 (file)
@@ -1,4 +1,4 @@
-//----------------------------  sparse_matrix.float.cc  ---------------------------
+//---------------------------------------------------------------------------
 //    $Id$
 //    Version: $Name$
 //
@@ -9,7 +9,7 @@
 //    to the file deal.II/doc/license.html for the  text  and
 //    further information on this license.
 //
-//----------------------------  sparse_matrix.float.cc  ---------------------------
+//---------------------------------------------------------------------------
 
 
 #include <lac/sparse_matrix.templates.h>
 
 template class SparseMatrix<TYPEMAT>;
 
-#define TYPEVEC float
+#define TYPE2 float
+#include "sparse_matrix_matrix.in.h"
+#undef TYPE2
 
-#include "sparse_matrix.in.h"
+#define TYPE2 double
+#include "sparse_matrix_matrix.in.h"
+#undef TYPE2
 
+#define TYPEVEC float
+#include "sparse_matrix_vector.in.h"
 #undef TYPEVEC
-#define TYPEVEC double
 
-#include "sparse_matrix.in.h"
+#define TYPEVEC double
+#include "sparse_matrix_vector.in.h"
+#undef TYPEVEC
 
                                 // a prerelease of gcc3.0 fails to
                                 // compile this due to long double
@@ -34,5 +41,4 @@ template class SparseMatrix<TYPEMAT>;
 
 //  #include <lac/sparse_matrix.2.templates>
 
-#undef TYPEVEC
 #undef TYPEMAT
diff --git a/deal.II/lac/source/sparse_matrix.in.h b/deal.II/lac/source/sparse_matrix.in.h
deleted file mode 100644 (file)
index 4417d0d..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-//---------------------------------------------------------------------------
-//    $Id$
-//    Version: $Name$
-//
-//    Copyright (C) 2002, 2003 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.
-//
-//---------------------------------------------------------------------------
-
-
-// File copied from sparse_matrix.2.templates.h and modified
-
-// Driver file for SparseMatrixEZ functions with two types.
-
-// TYPEMAT and TYPE2 are defined in sparsematrix?.cc
-
-//template SparseMatrixEZ<TYPEMAT> &
-//SparseMatrixEZ<TYPEMAT>::copy_from<TYPE2> (const SparseMatrixEZ<TYPE2> &);
-
-//template 
-//void SparseMatrixEZ<TYPEMAT>::copy_from<TYPE2> (const FullMatrix<TYPE2> &);
-
-//template void SparseMatrixEZ<TYPEMAT>::add_scaled<TYPE2> (const TYPEMAT,
-//                                                       const SparseMatrixEZ<TYPE2> &);
-
-template void SparseMatrixEZ<TYPEMAT>::vmult<TYPEVEC> (Vector<TYPEVEC> &,
-                                                    const Vector<TYPEVEC> &) const;
-template void SparseMatrixEZ<TYPEMAT>::Tvmult<TYPEVEC> (Vector<TYPEVEC> &,
-                                                     const Vector<TYPEVEC> &) const;
-template void SparseMatrixEZ<TYPEMAT>::vmult_add<TYPEVEC> (Vector<TYPEVEC> &,
-                                                        const Vector<TYPEVEC> &) const;
-template void SparseMatrixEZ<TYPEMAT>::Tvmult_add<TYPEVEC> (Vector<TYPEVEC> &,
-                                                         const Vector<TYPEVEC> &) const;
-
-//template TYPEVEC
-//SparseMatrixEZ<TYPEMAT>::matrix_norm_square<TYPEVEC> (const Vector<TYPEVEC> &) const;
-
-//template TYPEVEC
-//SparseMatrixEZ<TYPEMAT>::matrix_scalar_product<TYPEVEC> (const Vector<TYPEVEC> &,
-//                                                    const Vector<TYPEVEC> &) const;
-
-//template TYPEVEC SparseMatrixEZ<TYPEMAT>::residual<TYPEVEC> (Vector<TYPEVEC> &,
-//                                                      const Vector<TYPEVEC> &,
-//                                                      const Vector<TYPEVEC> &) const;
-
-template void SparseMatrixEZ<TYPEMAT>::precondition_SSOR<TYPEVEC> (Vector<TYPEVEC> &,
-                                                                const Vector<TYPEVEC> &,
-                                                                const TYPEMAT) const;
-
-template void SparseMatrixEZ<TYPEMAT>::precondition_SOR<TYPEVEC> (Vector<TYPEVEC> &,
-                                                               const Vector<TYPEVEC> &,
-                                                               const TYPEMAT) const;
-
-template void SparseMatrixEZ<TYPEMAT>::precondition_TSOR<TYPEVEC> (Vector<TYPEVEC> &,
-                                                                const Vector<TYPEVEC> &,
-                                                                const TYPEMAT) const;
-
-template void SparseMatrixEZ<TYPEMAT>::precondition_Jacobi<TYPEVEC> (Vector<TYPEVEC> &,
-                                                                  const Vector<TYPEVEC> &,
-                                                                  const TYPEMAT) const;
-
diff --git a/deal.II/lac/source/sparse_matrix_matrix.in.h b/deal.II/lac/source/sparse_matrix_matrix.in.h
new file mode 100644 (file)
index 0000000..5bdab36
--- /dev/null
@@ -0,0 +1,26 @@
+//----------------------------  sparse_matrix.2.templates  ---------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 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.
+//
+//----------------------------  sparse_matrix.2.templates  ---------------------------
+
+
+// Driver file for SparseMatrix functions with two types.
+
+// TYPEMAT and TYPE2 are defined in sparsematrix?.cc
+
+template SparseMatrix<TYPEMAT> &
+SparseMatrix<TYPEMAT>::copy_from<TYPE2> (const SparseMatrix<TYPE2> &);
+
+template 
+void SparseMatrix<TYPEMAT>::copy_from<TYPE2> (const FullMatrix<TYPE2> &);
+
+template void SparseMatrix<TYPEMAT>::add_scaled<TYPE2> (const TYPEMAT,
+                                                       const SparseMatrix<TYPE2> &);
diff --git a/deal.II/lac/source/sparse_matrix_vector.in.h b/deal.II/lac/source/sparse_matrix_vector.in.h
new file mode 100644 (file)
index 0000000..4287bd6
--- /dev/null
@@ -0,0 +1,79 @@
+//----------------------------  sparse_matrix.2.templates  ---------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 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.
+//
+//----------------------------  sparse_matrix.2.templates  ---------------------------
+
+
+// Driver file for SparseMatrix functions with two types.
+
+// TYPEMAT and TYPEVEC are defined in sparsematrix?.cc
+
+template void SparseMatrix<TYPEMAT>::vmult<TYPEVEC> (Vector<TYPEVEC> &,
+                                                  const Vector<TYPEVEC> &) const;
+template void SparseMatrix<TYPEMAT>::Tvmult<TYPEVEC> (Vector<TYPEVEC> &,
+                                                   const Vector<TYPEVEC> &) const;
+template void SparseMatrix<TYPEMAT>::vmult_add<TYPEVEC> (Vector<TYPEVEC> &,
+                                                      const Vector<TYPEVEC> &) const;
+template void SparseMatrix<TYPEMAT>::Tvmult_add<TYPEVEC> (Vector<TYPEVEC> &,
+                                                       const Vector<TYPEVEC> &) const;
+
+template TYPEVEC
+SparseMatrix<TYPEMAT>::matrix_norm_square<TYPEVEC> (const Vector<TYPEVEC> &) const;
+
+template TYPEVEC
+SparseMatrix<TYPEMAT>::matrix_scalar_product<TYPEVEC> (const Vector<TYPEVEC> &,
+                                                    const Vector<TYPEVEC> &) const;
+
+template TYPEVEC SparseMatrix<TYPEMAT>::residual<TYPEVEC> (Vector<TYPEVEC> &,
+                                                      const Vector<TYPEVEC> &,
+                                                      const Vector<TYPEVEC> &) const;
+
+template void SparseMatrix<TYPEMAT>::precondition_SSOR<TYPEVEC> (Vector<TYPEVEC> &,
+                                                              const Vector<TYPEVEC> &,
+                                                              const TYPEMAT) const;
+
+template void SparseMatrix<TYPEMAT>::precondition_SOR<TYPEVEC> (Vector<TYPEVEC> &,
+                                                             const Vector<TYPEVEC> &,
+                                                             const TYPEMAT) const;
+
+template void SparseMatrix<TYPEMAT>::precondition_TSOR<TYPEVEC> (Vector<TYPEVEC> &,
+                                                         const Vector<TYPEVEC> &,
+                                                         const TYPEMAT) const;
+
+template void SparseMatrix<TYPEMAT>::precondition_Jacobi<TYPEVEC> (Vector<TYPEVEC> &,
+                                                           const Vector<TYPEVEC> &,
+                                                           const TYPEMAT) const;
+
+template void SparseMatrix<TYPEMAT>::SOR<TYPEVEC> (Vector<TYPEVEC> &,
+                                                const TYPEMAT) const;
+template void SparseMatrix<TYPEMAT>::TSOR<TYPEVEC> (Vector<TYPEVEC> &,
+                                                 const TYPEMAT) const;
+template void SparseMatrix<TYPEMAT>::SSOR<TYPEVEC> (Vector<TYPEVEC> &,
+                                                 const TYPEMAT) const;
+template void SparseMatrix<TYPEMAT>::PSOR<TYPEVEC> (
+  Vector<TYPEVEC> &,
+  const std::vector<unsigned int>&,
+  const std::vector<unsigned int>&,
+  const TYPEMAT) const;
+template void SparseMatrix<TYPEMAT>::TPSOR<TYPEVEC> (
+  Vector<TYPEVEC> &,
+  const std::vector<unsigned int>&,
+  const std::vector<unsigned int>&,
+  const TYPEMAT) const;
+template void SparseMatrix<TYPEMAT>::SOR_step<TYPEVEC> (Vector<TYPEVEC> &, const Vector<TYPEVEC> &,
+                                                     const TYPEMAT) const;
+template void SparseMatrix<TYPEMAT>::TSOR_step<TYPEVEC> (Vector<TYPEVEC> &,
+                                                      const Vector<TYPEVEC> &,
+                                                      const TYPEMAT) const;
+template void SparseMatrix<TYPEMAT>::SSOR_step<TYPEVEC> (Vector<TYPEVEC> &,
+                                                      const Vector<TYPEVEC> &, 
+                                                      const TYPEMAT) 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.