]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add initialize function. First step towards unification of preconditioners.
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 18 Feb 2003 11:40:49 +0000 (11:40 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 18 Feb 2003 11:40:49 +0000 (11:40 +0000)
git-svn-id: https://svn.dealii.org/trunk@7145 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/sparse_mic.h

index c52f5b7943c57b27ff0099e6b2875628eaa73395..97c03e4f1fc67b5e1232cad6f600d0808646d809 100644 (file)
@@ -49,7 +49,8 @@ class SparseMIC : public SparseLUDecomposition<number>
                                       * argument.
                                       */
     SparseMIC (const SparsityPattern &sparsity);
-
+    
+    typedef SparseLUDecomposition<number>::AdditionalData AdditionalData;
 
                                     /**
                                      * Reinitialize the object but
@@ -87,6 +88,13 @@ class SparseMIC : public SparseLUDecomposition<number>
                                      */
     void reinit (const SparsityPattern &sparsity);
 
+                                    /**
+                                     * Same as @p{decompose}.
+                                     */
+    template <typename somenumber>
+    void initialize (const SparseMatrix<somenumber> &matrix,
+                    const AdditionalData parameters);
+
                                     /**
                                      * Perform the incomplete LU
                                      * factorization of the given
@@ -146,7 +154,7 @@ class SparseMIC : public SparseLUDecomposition<number>
                                      /**
                                       * Exception
                                       */
-    DeclException0 (ExcInternal);
+    DeclException0 (ExcStrengthenDiagonalTooSmall);
                                      /**
                                       * Exception
                                       */
@@ -198,4 +206,15 @@ class SparseMIC : public SparseLUDecomposition<number>
 
 
 
+template <typename number>
+template <typename somenumber>
+inline
+void SparseMIC<number>::initialize (const SparseMatrix<somenumber> &matrix,
+                                   const AdditionalData data)
+{
+  decompose(matrix, data.strengthen_diagonal);
+}
+
+
+
 #endif  // __deal2__

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.