From: guido Date: Mon, 21 Jun 1999 15:40:30 +0000 (+0000) Subject: operator() and check for division by 0 in SparseILU X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b19a803347970391e5bde57cc867dd6e69f33aff;p=dealii-svn.git operator() and check for division by 0 in SparseILU git-svn-id: https://svn.dealii.org/trunk@1426 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/sparse_ilu.h b/deal.II/lac/include/lac/sparse_ilu.h index 8b0dfd6bb5..4666a03683 100644 --- a/deal.II/lac/include/lac/sparse_ilu.h +++ b/deal.II/lac/include/lac/sparse_ilu.h @@ -170,6 +170,13 @@ class SparseILU : protected SparseMatrix void apply_decomposition (Vector &dst, const Vector &src) const; + /** + * Same as #apply_decomposition#, format for LAC. + */ + template + void operator() (Vector &dst, + const Vector &src) const; + /** * Exception */ @@ -190,7 +197,14 @@ class SparseILU : protected SparseMatrix << " is not greater or equal than zero!"); }; - +template +template +void +SparseILU::operator() (Vector &dst, + const Vector &src) const +{ + apply_decomposition(dst, src); +} diff --git a/deal.II/lac/include/lac/sparse_ilu.templates.h b/deal.II/lac/include/lac/sparse_ilu.templates.h index 3b1de729f5..198697afb1 100644 --- a/deal.II/lac/include/lac/sparse_ilu.templates.h +++ b/deal.II/lac/include/lac/sparse_ilu.templates.h @@ -139,6 +139,8 @@ void SparseILU::decompose (const SparseMatrix &matrix, // and since it makes the backward // step when applying the decomposition // significantly faster + Assert((global_entry(rowstart_indices[row-1]) !=0), ExcDivideByZero()); + global_entry (rowstart_indices[row-1]) = 1./global_entry (rowstart_indices[row-1]);