From 8f2ae05c2f8462cf43db93ab3542f8cf3d70f378 Mon Sep 17 00:00:00 2001 From: kronbichler Date: Tue, 12 Feb 2013 09:48:24 +0000 Subject: [PATCH] Mark old constructors of iterators as deprecated. Remove private nth_entry_in_row function as it is not used any more. git-svn-id: https://svn.dealii.org/trunk@28319 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/lac/sparse_matrix.h | 35 +++++-------------- .../include/deal.II/lac/sparsity_pattern.h | 10 ++++-- 2 files changed, 17 insertions(+), 28 deletions(-) diff --git a/deal.II/include/deal.II/lac/sparse_matrix.h b/deal.II/include/deal.II/lac/sparse_matrix.h index 83e29e38b2..41b672c7b1 100644 --- a/deal.II/include/deal.II/lac/sparse_matrix.h +++ b/deal.II/include/deal.II/lac/sparse_matrix.h @@ -93,10 +93,13 @@ namespace SparseMatrixIterators /** * Constructor. + * + * @deprecated This constructor is deprecated. Use the other constructor + * with a global index instead. */ Accessor (MatrixType *matrix, const unsigned int row, - const unsigned int index); + const unsigned int index) DEAL_II_DEPRECATED; /** * Constructor. @@ -338,10 +341,13 @@ namespace SparseMatrixIterators /** * Constructor. Create an iterator into the matrix @p matrix for the given * row and the index within it. + * + * @deprecated This constructor is deprecated. Use the other constructor + * with a global index instead. */ Iterator (MatrixType *matrix, const unsigned int row, - const unsigned int index); + const unsigned int index) DEAL_II_DEPRECATED; /** * Constructor. Create an iterator into the matrix @p matrix for the given @@ -1580,16 +1586,6 @@ private: */ std::size_t max_len; - /** - * Return the value of the indexth entry in row. Here, - * index refers to the internal representation of the matrix, not - * the column. This is an internal function because it exposes the actual - * format in which data is stored -- be sure to understand what you are - * doing here. - */ - number nth_entry_in_row (const unsigned int row, - const unsigned int index) const; - // make all other sparse matrices friends template friend class SparseMatrix; template friend class SparseLUDecomposition; @@ -1912,25 +1908,12 @@ inline number SparseMatrix::raw_entry (const unsigned int row, const unsigned int index) const -{ - // this is the (deprecated) public version of the - // nth_entry_in_row() function. this function will soon - // go away. - return nth_entry_in_row (row, index); -} - - - -template -inline -number -SparseMatrix::nth_entry_in_row (const unsigned int row, - const unsigned int index) const { Assert(rowrows, ExcIndexRange(row,0,cols->rows)); Assert(indexrow_length(row), ExcIndexRange(index,0,cols->row_length(row))); + // this function will soon go away. return val[cols->rowstart[row]+index]; } diff --git a/deal.II/include/deal.II/lac/sparsity_pattern.h b/deal.II/include/deal.II/lac/sparsity_pattern.h index 5bd0e75728..738776bc98 100644 --- a/deal.II/include/deal.II/lac/sparsity_pattern.h +++ b/deal.II/include/deal.II/lac/sparsity_pattern.h @@ -107,10 +107,13 @@ namespace SparsityPatternIterators public: /** * Constructor. + * + * @deprecated This constructor is deprecated. Use the other constructor + * with a global index instead. */ Accessor (const SparsityPattern *matrix, const unsigned int row, - const unsigned int index); + const unsigned int index) DEAL_II_DEPRECATED; /** * Constructor. @@ -229,10 +232,13 @@ namespace SparsityPatternIterators /** * Constructor. Create an iterator into the sparsity pattern @p sp for the * given row and the index within it. + * + * @deprecated This constructor is deprecated. Use the other constructor + * with a global index instead. */ Iterator (const SparsityPattern *sp, const unsigned int row, - const unsigned int index); + const unsigned int index) DEAL_II_DEPRECATED; /** * Constructor. Create an iterator into the sparsity pattern @p sp for the -- 2.39.5