From: hartmann Date: Tue, 18 Feb 2003 11:40:49 +0000 (+0000) Subject: Add initialize function. First step towards unification of preconditioners. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6578c484fea017c60c014a659ea7727af18c5ecc;p=dealii-svn.git Add initialize function. First step towards unification of preconditioners. git-svn-id: https://svn.dealii.org/trunk@7145 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/sparse_mic.h b/deal.II/lac/include/lac/sparse_mic.h index c52f5b7943..97c03e4f1f 100644 --- a/deal.II/lac/include/lac/sparse_mic.h +++ b/deal.II/lac/include/lac/sparse_mic.h @@ -49,7 +49,8 @@ class SparseMIC : public SparseLUDecomposition * argument. */ SparseMIC (const SparsityPattern &sparsity); - + + typedef SparseLUDecomposition::AdditionalData AdditionalData; /** * Reinitialize the object but @@ -87,6 +88,13 @@ class SparseMIC : public SparseLUDecomposition */ void reinit (const SparsityPattern &sparsity); + /** + * Same as @p{decompose}. + */ + template + void initialize (const SparseMatrix &matrix, + const AdditionalData parameters); + /** * Perform the incomplete LU * factorization of the given @@ -146,7 +154,7 @@ class SparseMIC : public SparseLUDecomposition /** * Exception */ - DeclException0 (ExcInternal); + DeclException0 (ExcStrengthenDiagonalTooSmall); /** * Exception */ @@ -198,4 +206,15 @@ class SparseMIC : public SparseLUDecomposition +template +template +inline +void SparseMIC::initialize (const SparseMatrix &matrix, + const AdditionalData data) +{ + decompose(matrix, data.strengthen_diagonal); +} + + + #endif // __deal2__