* argument.
*/
SparseILU (const SparsityPattern &sparsity);
+
+ typedef SparseLUDecomposition<number>::AdditionalData AdditionalData;
/**
* Perform the incomplete LU
* decomposed. Fill-in is thus
* allowed.
*
- * If @p{strengthen_diagonal}
+ * If the
+ * @p{AdditionalData::strengthen_diagonal}
* parameter is greater than
* zero, this method invokes
* @p{get_strengthen_diagonal_impl
* management.
*/
template <typename somenumber>
+ void initialize (const SparseMatrix<somenumber> &matrix,
+ const AdditionalData parameters);
+
+ /**
+ * Same as @p{initialize}. This method
+ * is deprecated, and left for
+ * backward compability. It may
+ * be removed in later versions.
+ */
+ template <typename somenumber>
void decompose (const SparseMatrix<somenumber> &matrix,
const double strengthen_diagonal=0.);
* is deprecated, and left for
* backward compability. It may
* be removed in later versions.
- *
*/
template <typename somenumber>
void apply_decomposition (Vector<somenumber> &dst,
vmult (dst, src);
}
+
+
+template <typename number>
+template <typename somenumber>
+inline
+void SparseILU<number>::decompose (const SparseMatrix<somenumber> &matrix,
+ const double strengthen_diagonal)
+{
+ initialize(matrix, AdditionalData(strengthen_diagonal));
+}
+
+
#endif // __deal2__sparse_ilu_h
template <typename number>
template <typename somenumber>
-void SparseILU<number>::decompose (const SparseMatrix<somenumber> &matrix,
- const double strengthen_diagonal)
+void SparseILU<number>::initialize (const SparseMatrix<somenumber> &matrix,
+ const AdditionalData data)
{
- SparseLUDecomposition<number>::decompose (matrix, strengthen_diagonal);
+ SparseLUDecomposition<number>::decompose (matrix, data.strengthen_diagonal);
Assert (matrix.m()==matrix.n(), ExcMatrixNotSquare ());
Assert (this->m()==this->n(), ExcMatrixNotSquare ());
Assert (matrix.m()==this->m(), ExcSizeMismatch(matrix.m(), this->m()));
- Assert (strengthen_diagonal>=0, ExcInvalidStrengthening (strengthen_diagonal));
+ Assert (data.strengthen_diagonal>=0,
+ ExcInvalidStrengthening (data.strengthen_diagonal));
this->copy_from (matrix);
- if (strengthen_diagonal>0)
+ if (data.strengthen_diagonal>0)
this->strengthen_diagonal_impl();
const SparsityPattern &sparsity = this->get_sparsity_pattern();