From 853b48fb5e9f0ff47bee284356bab5495f2ae767 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 3 Feb 2015 11:27:31 -0600 Subject: [PATCH] Remove deprecated function SparseMIC::decompose. --- doc/news/changes.h | 1 + include/deal.II/lac/sparse_mic.h | 8 --- include/deal.II/lac/sparse_mic.templates.h | 60 +++++++++------------- source/lac/sparse_mic.cc | 10 +--- 4 files changed, 27 insertions(+), 52 deletions(-) diff --git a/doc/news/changes.h b/doc/news/changes.h index 6a3a881977..6f4719b35a 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -148,6 +148,7 @@ inconvenience this causes. - The deprecated constructor of SparseILU. - SparseILU::apply_decomposition. - The deprecated constructor of SparseMIC. + - SparseMIC::decompose. - The compress() functions without argument in the various vector classes. You should use the versions with a VectorOperation argument instead. diff --git a/include/deal.II/lac/sparse_mic.h b/include/deal.II/lac/sparse_mic.h index 80c276b94c..aefa5923c7 100644 --- a/include/deal.II/lac/sparse_mic.h +++ b/include/deal.II/lac/sparse_mic.h @@ -102,14 +102,6 @@ public: void initialize (const SparseMatrix &matrix, const AdditionalData ¶meters = AdditionalData()); - /** - * @deprecated This method is deprecated, and left for backward compability. - * It will be removed in later versions. Use initialize() instead. - */ - template - void decompose (const SparseMatrix &matrix, - const double strengthen_diagonal=0.) DEAL_II_DEPRECATED; - /** * Apply the incomplete decomposition, i.e. do one forward-backward step * $dst=(LU)^{-1}src$. diff --git a/include/deal.II/lac/sparse_mic.templates.h b/include/deal.II/lac/sparse_mic.templates.h index c5168be157..3ed279ba20 100644 --- a/include/deal.II/lac/sparse_mic.templates.h +++ b/include/deal.II/lac/sparse_mic.templates.h @@ -68,47 +68,15 @@ void SparseMIC::initialize (const SparseMatrix &matrix, { SparseLUDecomposition::initialize(matrix, data); - decompose(matrix, data.strengthen_diagonal); -} - - - -template -void SparseMIC::reinit (const SparsityPattern &sparsity) -{ - { - std::vector tmp; - tmp.swap (diag); - } - { - std::vector tmp; - tmp.swap (inv_diag); - } - { - std::vector tmp; - tmp.swap (inner_sums); - } - - SparseMatrix::reinit(sparsity); - this->decomposed = false; -} - - - -template -template -void SparseMIC::decompose (const SparseMatrix &matrix, - const double strengthen_diagonal) -{ - SparseLUDecomposition::decompose(matrix, strengthen_diagonal); + SparseLUDecomposition::decompose(matrix, data.strengthen_diagonal); Assert (matrix.m()==matrix.n(), ExcNotQuadratic ()); Assert (this->m()==this->n(), ExcNotQuadratic ()); Assert (matrix.m()==this->m(), ExcDimensionMismatch(matrix.m(), this->m())); - Assert (strengthen_diagonal>=0, ExcInvalidStrengthening (strengthen_diagonal)); + Assert (data.strengthen_diagonal>=0, ExcInvalidStrengthening (data.strengthen_diagonal)); - if (strengthen_diagonal > 0) + if (data.strengthen_diagonal > 0) this->strengthen_diagonal_impl (); // MIC implementation: (S. Margenov lectures) @@ -150,6 +118,28 @@ void SparseMIC::decompose (const SparseMatrix &matrix, +template +void SparseMIC::reinit (const SparsityPattern &sparsity) +{ + { + std::vector tmp; + tmp.swap (diag); + } + { + std::vector tmp; + tmp.swap (inv_diag); + } + { + std::vector tmp; + tmp.swap (inner_sums); + } + + SparseMatrix::reinit(sparsity); + this->decomposed = false; +} + + + template inline number SparseMIC::get_rowsum (const size_type row) const diff --git a/source/lac/sparse_mic.cc b/source/lac/sparse_mic.cc index 89c1c92d96..eb3e2e6d13 100644 --- a/source/lac/sparse_mic.cc +++ b/source/lac/sparse_mic.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2002 - 2014 by the deal.II authors +// Copyright (C) 2002 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -23,28 +23,20 @@ DEAL_II_NAMESPACE_OPEN template class SparseMIC; template void SparseMIC::initialize (const SparseMatrix &, const AdditionalData &data); -template void SparseMIC::decompose (const SparseMatrix &, - const double); template void SparseMIC::vmult (Vector &, const Vector &) const; template void SparseMIC::initialize (const SparseMatrix &, const AdditionalData &data); -template void SparseMIC::decompose (const SparseMatrix &, - const double); template void SparseMIC::vmult (Vector &, const Vector &) const; template class SparseMIC; template void SparseMIC::initialize (const SparseMatrix &, const AdditionalData &data); -template void SparseMIC::decompose (const SparseMatrix &, - const double); template void SparseMIC::vmult (Vector &, const Vector &) const; template void SparseMIC::initialize (const SparseMatrix &, const AdditionalData &data); -template void SparseMIC::decompose (const SparseMatrix &, - const double); template void SparseMIC::vmult (Vector &, const Vector &) const; -- 2.39.5