From 455e1d7e6c398b5cc418715f473c9128c4a6d3e5 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 22 Jan 2015 07:20:56 -0600 Subject: [PATCH] Remove deprecated functions in ChunkSparsityPattern. --- doc/news/changes.h | 2 + include/deal.II/lac/chunk_sparsity_pattern.h | 122 ------------------- source/lac/chunk_sparsity_pattern.cc | 117 ------------------ tests/bits/chunk_sparse_matrix_00.cc | 4 +- 4 files changed, 4 insertions(+), 241 deletions(-) diff --git a/doc/news/changes.h b/doc/news/changes.h index 3a30356d57..d8e1bff1ec 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -150,6 +150,8 @@ inconvenience this causes. - Vector::scale. - TrilinosWrappers::*Vector*::compress with an Epetra_CombineMode argument + - ChunkSparsityPattern functions that take an + optimize_diagonal argument.
This release also removes the deprecated class MGDoFHandler. The functionality of this class had previously been incorporated into diff --git a/include/deal.II/lac/chunk_sparsity_pattern.h b/include/deal.II/lac/chunk_sparsity_pattern.h index 94852481ab..654f8a2893 100644 --- a/include/deal.II/lac/chunk_sparsity_pattern.h +++ b/include/deal.II/lac/chunk_sparsity_pattern.h @@ -296,16 +296,6 @@ public: const size_type max_chunks_per_row, const size_type chunk_size); - /** - * @deprecated This constructor is deprecated. Use the version without the - * last argument - */ - ChunkSparsityPattern (const size_type m, - const size_type n, - const size_type max_chunks_per_row, - const size_type chunk_size, - const bool optimize_diagonal) DEAL_II_DEPRECATED; - /** * Initialize a rectangular matrix. * @@ -318,16 +308,6 @@ public: const std::vector &row_lengths, const size_type chunk_size); - /** - * @deprecated This constructor is deprecated. Use the version without the - * last argument - */ - ChunkSparsityPattern (const size_type m, - const size_type n, - const std::vector &row_lengths, - const size_type chunk_size, - const bool optimize_diagonal) DEAL_II_DEPRECATED; - /** * Initialize a quadratic matrix of dimension n with at most * max_per_row nonzero entries per row. @@ -351,15 +331,6 @@ public: const std::vector &row_lengths, const size_type chunk_size); - /** - * @deprecated This constructor is deprecated. Use the version without the - * last argument - */ - ChunkSparsityPattern (const size_type m, - const std::vector &row_lengths, - const size_type chunk_size, - const bool optimize_diagonal) DEAL_II_DEPRECATED; - /** * Destructor. */ @@ -385,16 +356,6 @@ public: const size_type max_per_row, const size_type chunk_size); - /** - * @deprecated This function is deprecated. Use the function without the - * last argument - */ - void reinit (const size_type m, - const size_type n, - const size_type max_per_row, - const size_type chunk_size, - const bool optimize_diagonal) DEAL_II_DEPRECATED; - /** * Reallocate memory for a matrix of size m x n. The number of * entries for each row is taken from the array row_lengths which @@ -414,16 +375,6 @@ public: const std::vector &row_lengths, const size_type chunk_size); - /** - * @deprecated This function is deprecated. Use the function without the - * last argument - */ - void reinit (const size_type m, - const size_type n, - const std::vector &row_lengths, - const size_type chunk_size, - const bool optimize_diagonal) DEAL_II_DEPRECATED; - /** * Same as above, but with a VectorSlice argument instead. */ @@ -432,16 +383,6 @@ public: const VectorSlice > &row_lengths, const size_type chunk_size); - /** - * @deprecated This function is deprecated. Use the function without the - * last argument - */ - void reinit (const size_type m, - const size_type n, - const VectorSlice > &row_lengths, - const size_type chunk_size, - const bool optimize_diagonal) DEAL_II_DEPRECATED; - /** * This function compresses the sparsity structure that this object * represents. It does so by eliminating unused entries and sorting the @@ -539,18 +480,6 @@ public: const ForwardIterator end, const size_type chunk_size); - /** - * @deprecated This function is deprecated. Use the function without the - * last argument - */ - template - void copy_from (const size_type n_rows, - const size_type n_cols, - const ForwardIterator begin, - const ForwardIterator end, - const size_type chunk_size, - const bool optimize_diagonal) DEAL_II_DEPRECATED; - /** * Copy data from an object of type CompressedSparsityPattern, * CompressedSetSparsityPattern or CompressedSimpleSparsityPattern. Previous @@ -561,15 +490,6 @@ public: void copy_from (const SparsityType &csp, const size_type chunk_size); - /** - * @deprecated This function is deprecated. Use the function without the - * last argument - */ - template - void copy_from (const SparsityType &csp, - const size_type chunk_size, - const bool optimize_diagonal) DEAL_II_DEPRECATED; - /** * Take a full matrix and use its nonzero entries to generate a sparse * matrix entry pattern for this object. @@ -581,15 +501,6 @@ public: void copy_from (const FullMatrix &matrix, const size_type chunk_size); - /** - * @deprecated This function is deprecated. Use the function without the - * last argument - */ - template - void copy_from (const FullMatrix &matrix, - const size_type chunk_size, - const bool optimize_diagonal) DEAL_II_DEPRECATED; - /** * Set the sparsity pattern of the chunk sparsity pattern to be given by * chunk_size*chunksize blocks of the sparsity pattern for chunks @@ -696,15 +607,6 @@ public: */ bool is_compressed () const; - /** - * Determine whether the matrix uses the special convention for quadratic - * matrices that the diagonal entries are stored first in each row. - * - * @deprecated The function always returns true if the matrix is square and - * false if it is not. - */ - bool optimize_diagonal () const DEAL_II_DEPRECATED; - /** * Return whether this object stores only those entries that have been added * explicitly, or if the sparsity pattern contains elements that have been @@ -1252,30 +1154,6 @@ ChunkSparsityPattern::is_compressed () const -inline -bool -ChunkSparsityPattern::optimize_diagonal () const -{ - return sparsity_pattern.store_diagonal_first_in_row; -} - - - -template -inline -void -ChunkSparsityPattern::copy_from (const size_type n_rows, - const size_type n_cols, - const ForwardIterator begin, - const ForwardIterator end, - const size_type chunk_size, - const bool) -{ - copy_from (n_rows, n_cols, begin, end, chunk_size); -} - - - template void ChunkSparsityPattern::copy_from (const size_type n_rows, diff --git a/source/lac/chunk_sparsity_pattern.cc b/source/lac/chunk_sparsity_pattern.cc index 1dc22517a7..b4b63b5af5 100644 --- a/source/lac/chunk_sparsity_pattern.cc +++ b/source/lac/chunk_sparsity_pattern.cc @@ -45,18 +45,6 @@ ChunkSparsityPattern::ChunkSparsityPattern (const ChunkSparsityPattern &s) -ChunkSparsityPattern::ChunkSparsityPattern (const size_type m, - const size_type n, - const size_type max_per_row, - const size_type chunk_size, - const bool) -{ - Assert (chunk_size > 0, ExcInvalidNumber (chunk_size)); - - reinit (m,n,max_per_row, chunk_size); -} - - ChunkSparsityPattern::ChunkSparsityPattern (const size_type m, const size_type n, const size_type max_per_row, @@ -69,20 +57,6 @@ ChunkSparsityPattern::ChunkSparsityPattern (const size_type m, -ChunkSparsityPattern::ChunkSparsityPattern ( - const size_type m, - const size_type n, - const std::vector &row_lengths, - const size_type chunk_size, - const bool) -{ - Assert (chunk_size > 0, ExcInvalidNumber (chunk_size)); - - reinit (m, n, row_lengths, chunk_size); -} - - - ChunkSparsityPattern::ChunkSparsityPattern ( const size_type m, const size_type n, @@ -105,19 +79,6 @@ ChunkSparsityPattern::ChunkSparsityPattern (const size_type n, -ChunkSparsityPattern::ChunkSparsityPattern ( - const size_type m, - const std::vector &row_lengths, - const size_type chunk_size, - const bool) -{ - Assert (chunk_size > 0, ExcInvalidNumber (chunk_size)); - - reinit (m, m, row_lengths, chunk_size); -} - - - ChunkSparsityPattern::ChunkSparsityPattern ( const size_type m, const std::vector &row_lengths, @@ -149,17 +110,6 @@ ChunkSparsityPattern::operator = (const ChunkSparsityPattern &s) -void -ChunkSparsityPattern::reinit (const size_type m, - const size_type n, - const size_type max_per_row, - const size_type chunk_size, - const bool) -{ - reinit (m, n, max_per_row, chunk_size); -} - - void ChunkSparsityPattern::reinit (const size_type m, const size_type n, @@ -175,18 +125,6 @@ ChunkSparsityPattern::reinit (const size_type m, -void -ChunkSparsityPattern::reinit ( - const size_type m, - const size_type n, - const VectorSlice > &row_lengths, - const size_type chunk_size, - const bool) -{ - reinit (m, n, row_lengths, chunk_size); -} - - void ChunkSparsityPattern::reinit ( const size_type m, @@ -241,17 +179,6 @@ ChunkSparsityPattern::compress () -template -void -ChunkSparsityPattern::copy_from (const SparsityType &csp, - const size_type chunk_size, - const bool) -{ - copy_from (csp, chunk_size); -} - - - namespace internal { namespace @@ -322,15 +249,6 @@ ChunkSparsityPattern::copy_from (const SparsityType &csp, -template -void ChunkSparsityPattern::copy_from (const FullMatrix &matrix, - const size_type chunk_size, - const bool) -{ - copy_from (matrix, chunk_size); -} - - template void ChunkSparsityPattern::copy_from (const FullMatrix &matrix, const size_type chunk_size) @@ -369,17 +287,6 @@ void ChunkSparsityPattern::copy_from (const FullMatrix &matrix, } -void -ChunkSparsityPattern::reinit ( - const size_type m, - const size_type n, - const std::vector &row_lengths, - const size_type chunk_size, - const bool) -{ - reinit (m, n, row_lengths, chunk_size); -} - void ChunkSparsityPattern::reinit ( @@ -738,22 +645,6 @@ ChunkSparsityPattern::memory_consumption () const // explicit instantiations template -void ChunkSparsityPattern::copy_from (const SparsityPattern &, - const size_type, - const bool); -template -void ChunkSparsityPattern::copy_from (const CompressedSparsityPattern &, - const size_type , - const bool); -template -void ChunkSparsityPattern::copy_from (const CompressedSetSparsityPattern &, - const size_type , - const bool); -template -void ChunkSparsityPattern::copy_from (const CompressedSimpleSparsityPattern &, - const size_type , - const bool); -template void ChunkSparsityPattern::copy_from (const CompressedSparsityPattern &, const size_type); template @@ -791,14 +682,6 @@ void ChunkSparsityPattern::create_from const unsigned int, const bool); template -void ChunkSparsityPattern::copy_from (const FullMatrix &, - const size_type , - const bool); -template -void ChunkSparsityPattern::copy_from (const FullMatrix &, - const size_type , - const bool); -template void ChunkSparsityPattern::copy_from (const FullMatrix &, const size_type); template diff --git a/tests/bits/chunk_sparse_matrix_00.cc b/tests/bits/chunk_sparse_matrix_00.cc index acb07edb6b..e2ad8b7ef4 100644 --- a/tests/bits/chunk_sparse_matrix_00.cc +++ b/tests/bits/chunk_sparse_matrix_00.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2014 by the deal.II authors +// Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -28,7 +28,7 @@ void test (const unsigned int chunk_size) { deallog << "Chunk size = " << chunk_size << std::endl; - ChunkSparsityPattern sp (5,5,3,chunk_size,false); + ChunkSparsityPattern sp (5,5,3,chunk_size); for (unsigned int i=0; i<5; ++i) for (unsigned int j=0; j<5; ++j) if ((i+2*j+1) % 3 == 0) -- 2.39.5