]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
pseudo-adding Tvmult introduced
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 31 Mar 2003 09:58:48 +0000 (09:58 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 31 Mar 2003 09:58:48 +0000 (09:58 +0000)
git-svn-id: https://svn.dealii.org/trunk@7340 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/precondition_block.h
deal.II/lac/include/lac/precondition_block.templates.h

index 6b93e66f32594bd2783e59886f30ad4ae69ea172..d6c7b51e817e4f7c3f3838b06701afbd4ac942ce 100644 (file)
@@ -542,6 +542,26 @@ class PreconditionBlockSOR : public virtual Subscriptor,
     template <typename number2>
     void Tvmult (Vector<number2>&, const Vector<number2>&) const;
 
+                                    /**
+                                     * Execute backward block SOR
+                                     * preconditioning.
+                                     *
+                                     * Warning: this function
+                                     * performs normal @p{vmult}
+                                     * without adding. The reason for
+                                     * its existence is that
+                                     * @ref{BlockMatrixArray}
+                                     * requires the adding version by
+                                     * default. On the other hand,
+                                     * adding requires an additional
+                                     * auxiliary vector, which is not
+                                     * desirable.
+                                     *
+                                     * @see{vmult}.
+                                     */
+    template <typename number2>
+    void Tvmult_add (Vector<number2>&, const Vector<number2>&) const;
+
   private:
                                     /**
                                      * Actual implementation of the
@@ -555,6 +575,18 @@ class PreconditionBlockSOR : public virtual Subscriptor,
                   const Vector<number2>&,
                   const bool adding) const;
 
+                                    /**
+                                     * Actual implementation of the
+                                     * preconditioning algorithm.
+                                     *
+                                     * The parameter @p{adding} does
+                                     * not have any function, yet.
+                                     */
+    template <typename number2>
+    void do_Tvmult (Vector<number2>&,
+                   const Vector<number2>&,
+                   const bool adding) const;
+
 };
 
 
index daa3e0ba55fa1fefe58676c5efd751aa1cad8407..4a5a2fbff5a55e14f52af45d1853bf302ff515ac 100644 (file)
@@ -497,8 +497,10 @@ void PreconditionBlockSOR<MATRIX,inverse_type>::do_vmult (
 
 template <class MATRIX, typename inverse_type>
 template <typename number2>
-void PreconditionBlockSOR<MATRIX,inverse_type>::Tvmult (Vector<number2>       &dst,
-                                                      const Vector<number2> &src) const
+void PreconditionBlockSOR<MATRIX,inverse_type>::do_Tvmult (
+  Vector<number2>       &dst,
+  const Vector<number2> &src,
+  const bool) const
 {
                                   // introduce the following typedef
                                   // since in the use of exceptions,
@@ -628,6 +630,26 @@ void PreconditionBlockSOR<MATRIX,inverse_type>
 }
 
 
+template <class MATRIX, typename inverse_type>
+template <typename number2>
+void PreconditionBlockSOR<MATRIX,inverse_type>
+::Tvmult (Vector<number2>       &dst,
+        const Vector<number2> &src) const
+{
+  do_Tvmult(dst, src, false);
+}
+
+
+template <class MATRIX, typename inverse_type>
+template <typename number2>
+void PreconditionBlockSOR<MATRIX,inverse_type>
+::Tvmult_add (Vector<number2>       &dst,
+            const Vector<number2> &src) const
+{
+  do_Tvmult(dst, src, 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.