From 3e86d11332a79309d0bc2a263135a21b2744b601 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Sun, 6 Mar 2005 17:29:07 +0000 Subject: [PATCH] vmult_add added git-svn-id: https://svn.dealii.org/trunk@10014 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/full_matrix.h | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/deal.II/lac/include/lac/full_matrix.h b/deal.II/lac/include/lac/full_matrix.h index 8f02a11daf..e018c0f3ae 100644 --- a/deal.II/lac/include/lac/full_matrix.h +++ b/deal.II/lac/include/lac/full_matrix.h @@ -868,6 +868,17 @@ class FullMatrix : public Table<2,number> const Vector &v, const bool adding=false) const; + /** + * Adding Matrix-vector-multiplication. + * $w += A*v$ + * + * Source and destination must + * not be the same vector. + */ + template + void vmult_add (Vector &w, + const Vector &v) const; + /** * Transpose * matrix-vector-multiplication. @@ -881,6 +892,18 @@ class FullMatrix : public Table<2,number> const Vector &v, const bool adding=false) const; + /** + * Adding transpose + * matrix-vector-multiplication. + * See vmult() above. + * + * Source and destination must + * not be the same vector. + */ + template + void Tvmult_add (Vector &w, + const Vector &v) const; + /** * Apply the Jacobi * preconditioner, which @@ -1067,6 +1090,27 @@ FullMatrix::copy_from (const MATRIX& M) this->el(entry->row(), entry->column()) = entry->value(); } + +template +template +void +FullMatrix::vmult_add (Vector &w, + const Vector &v) const +{ + vmult(w, v, true); +} + + +template +template +void +FullMatrix::Tvmult_add (Vector &w, + const Vector &v) const +{ + Tvmult(w, v, true); +} + + //----------------------------------------------------------------------// -- 2.39.5