From a3e69b0a5e7dccb9f1dc9f958a615c12b1ceda2a Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 23 Feb 2015 21:23:27 -0600 Subject: [PATCH] Remove deprecated function SparseLUDecomposition::decompose. --- doc/news/changes.h | 1 + include/deal.II/lac/sparse_decomposition.h | 30 ++----------------- .../lac/sparse_decomposition.templates.h | 16 ---------- include/deal.II/lac/sparse_ilu.templates.h | 6 +++- include/deal.II/lac/sparse_mic.templates.h | 12 +++++--- source/lac/sparse_decomposition.cc | 10 +------ 6 files changed, 17 insertions(+), 58 deletions(-) diff --git a/doc/news/changes.h b/doc/news/changes.h index d6145a7c0c..692cd913d0 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -163,6 +163,7 @@ inconvenience this causes. - SparseMIC::decompose and SparseILU::decompose. - SparseMIC::reinit and SparseLUDecomposition::reinit. - SparseILU::apply_decomposition. + - SparseLUDecomposition::decompose and SparseLUDecomposition::is_decomposed. - 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_decomposition.h b/include/deal.II/lac/sparse_decomposition.h index ae2b7fe030..c08f1c8f4d 100644 --- a/include/deal.II/lac/sparse_decomposition.h +++ b/include/deal.II/lac/sparse_decomposition.h @@ -236,24 +236,6 @@ public: void initialize (const SparseMatrix &matrix, const AdditionalData parameters); - /** - * This method is deprecated, and left for backward compability. It will be - * removed in later versions. - * - * @deprecated - */ - template - void decompose (const SparseMatrix &matrix, - const double strengthen_diagonal=0.) DEAL_II_DEPRECATED; - - /** - * This method is deprecated, and left for backward compability. It will be - * removed in later versions. - * - * @deprecated - */ - virtual bool is_decomposed () const DEAL_II_DEPRECATED; - /** * Return whether the object is empty. It calls the inherited * SparseMatrix::empty() function. @@ -324,11 +306,12 @@ protected: */ std::vector prebuilt_lower_bound; -private: /** * Fills the #prebuilt_lower_bound array. */ void prebuild_lower_bound (); + +private: /** * In general this pointer is zero except for the case that no @@ -358,15 +341,6 @@ get_strengthen_diagonal(const number /*rowsum*/, -template -inline bool -SparseLUDecomposition::is_decomposed () const -{ - return decomposed; -} - - - template inline bool SparseLUDecomposition::empty () const diff --git a/include/deal.II/lac/sparse_decomposition.templates.h b/include/deal.II/lac/sparse_decomposition.templates.h index cc02600549..bcf772404b 100644 --- a/include/deal.II/lac/sparse_decomposition.templates.h +++ b/include/deal.II/lac/sparse_decomposition.templates.h @@ -131,22 +131,6 @@ void SparseLUDecomposition::initialize ( } -template -template -void -SparseLUDecomposition:: -decompose (const SparseMatrix &matrix, - const double strengthen_diagonal) -{ - decomposed = false; - - this->strengthen_diagonal = strengthen_diagonal; - prebuild_lower_bound (); - copy_from (matrix); - decomposed = true; -} - - template void diff --git a/include/deal.II/lac/sparse_ilu.templates.h b/include/deal.II/lac/sparse_ilu.templates.h index 9c0c1faf33..4b6820acf4 100644 --- a/include/deal.II/lac/sparse_ilu.templates.h +++ b/include/deal.II/lac/sparse_ilu.templates.h @@ -48,7 +48,11 @@ void SparseILU::initialize (const SparseMatrix &matrix, Assert (data.strengthen_diagonal>=0, ExcInvalidStrengthening (data.strengthen_diagonal)); - SparseLUDecomposition::decompose (matrix, data.strengthen_diagonal); + this->decomposed = false; + this->strengthen_diagonal = data.strengthen_diagonal; + this->prebuild_lower_bound (); + this->copy_from (matrix); + this->decomposed = true; if (data.strengthen_diagonal>0) this->strengthen_diagonal_impl(); diff --git a/include/deal.II/lac/sparse_mic.templates.h b/include/deal.II/lac/sparse_mic.templates.h index 5113c2a65d..ae77a0e958 100644 --- a/include/deal.II/lac/sparse_mic.templates.h +++ b/include/deal.II/lac/sparse_mic.templates.h @@ -66,16 +66,20 @@ inline void SparseMIC::initialize (const SparseMatrix &matrix, const AdditionalData &data) { - SparseLUDecomposition::initialize(matrix, data); - - 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 (data.strengthen_diagonal>=0, ExcInvalidStrengthening (data.strengthen_diagonal)); + SparseLUDecomposition::initialize(matrix, data); + + this->decomposed = false; + this->strengthen_diagonal = data.strengthen_diagonal; + this->prebuild_lower_bound (); + this->copy_from (matrix); + this->decomposed = true; + if (data.strengthen_diagonal > 0) this->strengthen_diagonal_impl (); diff --git a/source/lac/sparse_decomposition.cc b/source/lac/sparse_decomposition.cc index ad68d92a16..256183f574 100644 --- a/source/lac/sparse_decomposition.cc +++ b/source/lac/sparse_decomposition.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. // @@ -24,10 +24,6 @@ template void SparseLUDecomposition::initialize (const SparseMat const AdditionalData data); template void SparseLUDecomposition::initialize (const SparseMatrix &, const AdditionalData data); -template void SparseLUDecomposition::decompose (const SparseMatrix &, - const double); -template void SparseLUDecomposition::decompose (const SparseMatrix &, - const double); template void SparseLUDecomposition::copy_from (const SparseMatrix &); template void SparseLUDecomposition::copy_from (const SparseMatrix &); @@ -38,10 +34,6 @@ template void SparseLUDecomposition::initialize (const SparseMatr const AdditionalData data); template void SparseLUDecomposition::initialize (const SparseMatrix &, const AdditionalData data); -template void SparseLUDecomposition::decompose (const SparseMatrix &, - const double); -template void SparseLUDecomposition::decompose (const SparseMatrix &, - const double); template void SparseLUDecomposition::copy_from (const SparseMatrix &); template void SparseLUDecomposition::copy_from (const SparseMatrix &); -- 2.39.5