]> https://gitweb.dealii.org/ - dealii.git/commitdiff
vmult_add added
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Sun, 6 Mar 2005 17:29:07 +0000 (17:29 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Sun, 6 Mar 2005 17:29:07 +0000 (17:29 +0000)
git-svn-id: https://svn.dealii.org/trunk@10014 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/full_matrix.h

index 8f02a11daf9f50d82a2137209e51daf5071c4130..e018c0f3aef7a3ad804df216a5402df0f2175af1 100644 (file)
@@ -868,6 +868,17 @@ class FullMatrix : public Table<2,number>
                const Vector<number2> &v,
                const bool             adding=false) const;
     
+                                    /**
+                                     * Adding Matrix-vector-multiplication.
+                                     *  $w += A*v$
+                                      *
+                                      * Source and destination must
+                                      * not be the same vector.
+                                     */
+    template<typename number2>
+    void vmult_add (Vector<number2>       &w,
+                   const Vector<number2> &v) const;
+    
                                     /**
                                      * Transpose
                                      * matrix-vector-multiplication.
@@ -881,6 +892,18 @@ class FullMatrix : public Table<2,number>
                 const Vector<number2> &v,
                 const bool             adding=false) const;
 
+                                    /**
+                                     * Adding transpose
+                                     * matrix-vector-multiplication.
+                                     * See vmult() above.
+                                      *
+                                      * Source and destination must
+                                      * not be the same vector.
+                                     */
+    template<typename number2>
+    void Tvmult_add (Vector<number2>       &w,
+                    const Vector<number2> &v) const;
+
                                     /**
                                      * Apply the Jacobi
                                      * preconditioner, which
@@ -1067,6 +1090,27 @@ FullMatrix<number>::copy_from (const MATRIX& M)
     this->el(entry->row(), entry->column()) = entry->value();
 }
 
+
+template <typename number>
+template<typename number2>
+void
+FullMatrix<number>::vmult_add (Vector<number2>       &w,
+                              const Vector<number2> &v) const
+{
+  vmult(w, v, true);
+}
+
+
+template <typename number>
+template<typename number2>
+void
+FullMatrix<number>::Tvmult_add (Vector<number2>       &w,
+                               const Vector<number2> &v) const
+{
+  Tvmult(w, v, true);
+}
+
+
 //----------------------------------------------------------------------//
 
 

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.