]> https://gitweb.dealii.org/ - dealii.git/commitdiff
PreconditionIdentiy now provides the interface for use in a smoother for
authorBaerbel Jannsen <baerbel.janssen@gmail.com>
Thu, 11 Mar 2010 19:27:29 +0000 (19:27 +0000)
committerBaerbel Jannsen <baerbel.janssen@gmail.com>
Thu, 11 Mar 2010 19:27:29 +0000 (19:27 +0000)
MG

git-svn-id: https://svn.dealii.org/trunk@20800 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/precondition.h

index 57582ecf81b43962efc7df1a24f5c94fc77389eb..e61b60a28c54cad8627ebdd93158b3ab4c4501c9 100644 (file)
@@ -55,6 +55,33 @@ template <typename number> class SparseMatrix;
 class PreconditionIdentity : public Subscriptor
 {
   public:
+
+                                    /**
+                                     * This function is only 
+                                      * present to 
+                                      * provide the interface of
+                                      * a precondtioner to be 
+                                      * handed to a smoother.
+                                      * This does nothing.
+                                     */
+  struct AdditionalData
+  {
+                                       /**
+                                       * Constructor.
+                                       */
+    AdditionalData (){}
+  };
+
+                                    /**
+                                     * The matrix
+                                     * argument is ignored and here
+                                     * just for compatibility with
+                                     * more complex preconditioners.
+                                     */
+  template <class MATRIX>
+  void initialize (const MATRIX         &matrix,
+                  const AdditionalData &additional_data = AdditionalData());
+
                                     /**
                                      * Apply preconditioner.
                                      */
@@ -86,6 +113,16 @@ class PreconditionIdentity : public Subscriptor
                                      */
     template<class VECTOR>
     void Tvmult_add (VECTOR&, const VECTOR&) const;
+
+                                    /**
+                                     * This function is only 
+                                      * present to 
+                                      * provide the interface of
+                                      * a precondtioner to be 
+                                      * handed to a smoother.
+                                      * This does nothing.
+                                     */
+    void clear (){}
 };
 
 
@@ -1028,6 +1065,13 @@ class PreconditionChebyshev : public Subscriptor
 
 #ifndef DOXYGEN
 
+template <class MATRIX>
+inline void
+PreconditionIdentity::initialize (
+  const MATRIX&,
+  const PreconditionIdentity::AdditionalData&)
+{}
+
 
 template<class VECTOR>
 inline void

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.