From dda4db46f4610287d3fe2eb8e68db3addc225860 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 24 Feb 2015 07:27:40 -0600 Subject: [PATCH] Remove the SparseLUDecomposition::decomposed variable. It is only ever written to, never read. --- include/deal.II/lac/sparse_decomposition.h | 7 ------- include/deal.II/lac/sparse_decomposition.templates.h | 4 ---- include/deal.II/lac/sparse_ilu.templates.h | 2 -- include/deal.II/lac/sparse_mic.templates.h | 2 -- 4 files changed, 15 deletions(-) diff --git a/include/deal.II/lac/sparse_decomposition.h b/include/deal.II/lac/sparse_decomposition.h index c08f1c8f4d..9ae6d10299 100644 --- a/include/deal.II/lac/sparse_decomposition.h +++ b/include/deal.II/lac/sparse_decomposition.h @@ -287,13 +287,6 @@ protected: */ virtual number get_strengthen_diagonal(const number rowsum, const size_type row) const; - /** - * State flag. If not in decomposed state, it is illegal to apply the - * decomposition. This flag is cleared when the underlaying SparseMatrix - * SparsityPattern is changed, and set by decompose(). - */ - bool decomposed; - /** * The default strengthening value, returned by get_strengthen_diagonal(). */ diff --git a/include/deal.II/lac/sparse_decomposition.templates.h b/include/deal.II/lac/sparse_decomposition.templates.h index bcf772404b..7baefcc11f 100644 --- a/include/deal.II/lac/sparse_decomposition.templates.h +++ b/include/deal.II/lac/sparse_decomposition.templates.h @@ -31,7 +31,6 @@ template SparseLUDecomposition::SparseLUDecomposition() : SparseMatrix(), - decomposed(false), own_sparsity(0) {} @@ -47,8 +46,6 @@ SparseLUDecomposition::~SparseLUDecomposition() template void SparseLUDecomposition::clear() { - decomposed = false; - std::vector tmp; tmp.swap (prebuilt_lower_bound); @@ -122,7 +119,6 @@ void SparseLUDecomposition::initialize ( // now use this sparsity pattern Assert (sparsity_pattern_to_use->n_rows()==sparsity_pattern_to_use->n_cols(), typename SparsityPattern::ExcDiagonalNotOptimized()); - decomposed = false; { std::vector tmp; tmp.swap (prebuilt_lower_bound); diff --git a/include/deal.II/lac/sparse_ilu.templates.h b/include/deal.II/lac/sparse_ilu.templates.h index 4b6820acf4..bb6e47871b 100644 --- a/include/deal.II/lac/sparse_ilu.templates.h +++ b/include/deal.II/lac/sparse_ilu.templates.h @@ -48,11 +48,9 @@ void SparseILU::initialize (const SparseMatrix &matrix, Assert (data.strengthen_diagonal>=0, ExcInvalidStrengthening (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 ae77a0e958..b097ab64e5 100644 --- a/include/deal.II/lac/sparse_mic.templates.h +++ b/include/deal.II/lac/sparse_mic.templates.h @@ -74,11 +74,9 @@ void SparseMIC::initialize (const SparseMatrix &matrix, 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 (); -- 2.39.5