]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Template parameters fixed
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 2 Jul 2001 09:40:46 +0000 (09:40 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 2 Jul 2001 09:40:46 +0000 (09:40 +0000)
git-svn-id: https://svn.dealii.org/trunk@4780 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/shifted_matrix.h

index 96c40372b56b4345b4cd107d58a6fe36b64121ac..411e3fc10f1f0205589e22250276d06d4df5d0a8 100644 (file)
@@ -65,7 +65,7 @@ class ShiftedMatrix
                                     /**
                                      * Auxiliary vector.
                                      */
-    VECTOR aux;
+    //    VECTOR aux;
                                     /**
                                      * Shift parameter.
                                      */
@@ -83,7 +83,7 @@ class ShiftedMatrix
  *
  * @author Guido Kanschat, 2001
  */
-template<class MATRIX, class MASSMATRIX>
+template<class MATRIX, class MASSMATRIX, class VECTOR>
 class ShiftedMatrixGeneralized
 {
   public:
@@ -108,13 +108,11 @@ class ShiftedMatrixGeneralized
                                     /**
                                      * Matrix-vector-product.
                                      */
-    template <class VECTOR>
     void vmult (VECTOR& dst, const VECTOR& src) const;
 
                                     /**
                                      * Residual.
                                      */
-    template <class VECTOR>
     double residual (VECTOR& dst, const VECTOR& src, const VECTOR& rhs) const;
     
   private:
@@ -127,6 +125,11 @@ class ShiftedMatrixGeneralized
                                      */
     SmartPointer<const MASSMATRIX> M;
 
+                                    /**
+                                     * Auxiliary vector.
+                                     */
+    VECTOR aux;
+
                                     /**
                                      * Shift parameter.
                                      */
@@ -190,10 +193,9 @@ ShiftedMatrix<MATRIX>::residual (VECTOR& dst,
 
 
 //----------------------------------------------------------------------//
-
-template <class MATRIX, class MASSMATRIX>
+template <class MATRIX, class MASSMATRIX, class VECTOR>
 inline
-ShiftedMatrixGeneralized<MATRIX, MASSMATRIX>
+ShiftedMatrixGeneralized<MATRIX, MASSMATRIX, VECTOR>
 ::ShiftedMatrixGeneralized (const MATRIX& A,
                            const MASSMATRIX& M,
                            const double sigma)
@@ -202,28 +204,24 @@ ShiftedMatrixGeneralized<MATRIX, MASSMATRIX>
 {}
 
 
-
-template <class MATRIX, class MASSMATRIX>
+template <class MATRIX, class MASSMATRIX, class VECTOR>
 inline void
-ShiftedMatrixGeneralized<MATRIX, MASSMATRIX>::shift (const double s)
+ShiftedMatrixGeneralized<MATRIX, MASSMATRIX, VECTOR>::shift (const double s)
 {
   sigma = s;
 }
 
-
-template <class MATRIX, class MASSMATRIX>
+template <class MATRIX, class MASSMATRIX, class VECTOR>
 inline double
-ShiftedMatrixGeneralized<MATRIX, MASSMATRIX>::shift () const
+ShiftedMatrixGeneralized<MATRIX, MASSMATRIX, VECTOR>::shift () const
 {
   return sigma;
 }
 
 
-
-template <class MATRIX, class MASSMATRIX>
-template <class VECTOR>
+template <class MATRIX, class MASSMATRIX, class VECTOR>
 inline void
-ShiftedMatrixGeneralized<MATRIX, MASSMATRIX>::vmult (VECTOR& dst,
+ShiftedMatrixGeneralized<MATRIX, MASSMATRIX, VECTOR>::vmult (VECTOR& dst,
                                                     const VECTOR& src) const
 {
   A.vmult(dst, src);
@@ -236,10 +234,9 @@ ShiftedMatrixGeneralized<MATRIX, MASSMATRIX>::vmult (VECTOR& dst,
 }
 
 
-template <class MATRIX, class MASSMATRIX>
-template <class VECTOR>
+template <class MATRIX, class MASSMATRIX, class VECTOR>
 inline double
-ShiftedMatrixGeneralized<MATRIX, MASSMATRIX>::residual (VECTOR& dst,
+ShiftedMatrixGeneralized<MATRIX, MASSMATRIX, VECTOR>::residual (VECTOR& dst,
                                                        const VECTOR& src,
                                                        const VECTOR& rhs) 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.