From 486981cacac6d0828dd6a838ba12be0b90cfcc25 Mon Sep 17 00:00:00 2001 From: David Wells Date: Tue, 20 Sep 2022 12:57:03 -0400 Subject: [PATCH] Remove some references to SparsityPatternBase. --- include/deal.II/lac/block_sparsity_pattern.h | 4 +- source/lac/block_sparsity_pattern.cc | 84 ++++++++++---------- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/include/deal.II/lac/block_sparsity_pattern.h b/include/deal.II/lac/block_sparsity_pattern.h index a801c04e0a..cfff498c88 100644 --- a/include/deal.II/lac/block_sparsity_pattern.h +++ b/include/deal.II/lac/block_sparsity_pattern.h @@ -303,7 +303,7 @@ public: * understands and which can be used to plot the sparsity pattern in a * graphical way. This is the same functionality implemented for usual * sparsity patterns, see - * SparsityPatternBase::print_gnuplot(). + * SparsityPattern::print_gnuplot(). */ void print_gnuplot(std::ostream &out) const; @@ -311,7 +311,7 @@ public: /** * Print the sparsity of the matrix in svg format. This is the same * functionality implemented for usual sparsity patterns, see - * SparsityPatternBase::print_svg(). + * SparsityPattern::print_svg(). */ void print_svg(std::ostream &out) const; diff --git a/source/lac/block_sparsity_pattern.cc b/source/lac/block_sparsity_pattern.cc index 68b44a0116..73ef42c281 100644 --- a/source/lac/block_sparsity_pattern.cc +++ b/source/lac/block_sparsity_pattern.cc @@ -21,16 +21,16 @@ DEAL_II_NAMESPACE_OPEN -template -BlockSparsityPatternBase::BlockSparsityPatternBase() +template +BlockSparsityPatternBase::BlockSparsityPatternBase() : rows(0) , columns(0) {} -template -BlockSparsityPatternBase::BlockSparsityPatternBase( +template +BlockSparsityPatternBase::BlockSparsityPatternBase( const size_type n_block_rows, const size_type n_block_columns) : rows(0) @@ -41,8 +41,8 @@ BlockSparsityPatternBase::BlockSparsityPatternBase( -template -BlockSparsityPatternBase::BlockSparsityPatternBase( +template +BlockSparsityPatternBase::BlockSparsityPatternBase( const BlockSparsityPatternBase &s) : Subscriptor() , rows(0) @@ -58,8 +58,8 @@ BlockSparsityPatternBase::BlockSparsityPatternBase( -template -BlockSparsityPatternBase::~BlockSparsityPatternBase() +template +BlockSparsityPatternBase::~BlockSparsityPatternBase() { // clear all memory try @@ -72,9 +72,9 @@ BlockSparsityPatternBase::~BlockSparsityPatternBase() -template +template void -BlockSparsityPatternBase::reinit( +BlockSparsityPatternBase::reinit( const size_type n_block_rows, const size_type n_block_columns) { @@ -84,7 +84,7 @@ BlockSparsityPatternBase::reinit( for (size_type i = 0; i < rows; ++i) for (size_type j = 0; j < columns; ++j) { - SparsityPatternBase *sp = sub_objects[i][j]; + SparsityPatternType *sp = sub_objects[i][j]; sub_objects[i][j] = nullptr; delete sp; } @@ -99,16 +99,16 @@ BlockSparsityPatternBase::reinit( for (size_type i = 0; i < rows; ++i) for (size_type j = 0; j < columns; ++j) { - SparsityPatternBase *p = new SparsityPatternBase; + SparsityPatternType *p = new SparsityPatternType; sub_objects[i][j] = p; } } -template -BlockSparsityPatternBase & -BlockSparsityPatternBase::operator=( - const BlockSparsityPatternBase &bsp) +template +BlockSparsityPatternBase & +BlockSparsityPatternBase::operator=( + const BlockSparsityPatternBase &bsp) { Assert(rows == bsp.rows, ExcDimensionMismatch(rows, bsp.rows)); Assert(columns == bsp.columns, ExcDimensionMismatch(columns, bsp.columns)); @@ -124,9 +124,9 @@ BlockSparsityPatternBase::operator=( -template +template void -BlockSparsityPatternBase::collect_sizes() +BlockSparsityPatternBase::collect_sizes() { std::vector row_sizes(rows); std::vector col_sizes(columns); @@ -163,9 +163,9 @@ BlockSparsityPatternBase::collect_sizes() -template +template void -BlockSparsityPatternBase::compress() +BlockSparsityPatternBase::compress() { for (size_type i = 0; i < rows; ++i) for (size_type j = 0; j < columns; ++j) @@ -174,9 +174,9 @@ BlockSparsityPatternBase::compress() -template +template bool -BlockSparsityPatternBase::empty() const +BlockSparsityPatternBase::empty() const { for (size_type i = 0; i < rows; ++i) for (size_type j = 0; j < columns; ++j) @@ -187,9 +187,9 @@ BlockSparsityPatternBase::empty() const -template -typename BlockSparsityPatternBase::size_type -BlockSparsityPatternBase::max_entries_per_row() const +template +typename BlockSparsityPatternBase::size_type +BlockSparsityPatternBase::max_entries_per_row() const { size_type max_entries = 0; for (size_type block_row = 0; block_row < rows; ++block_row) @@ -206,9 +206,9 @@ BlockSparsityPatternBase::max_entries_per_row() const -template -typename BlockSparsityPatternBase::size_type -BlockSparsityPatternBase::n_rows() const +template +typename BlockSparsityPatternBase::size_type +BlockSparsityPatternBase::n_rows() const { // only count in first column, since // all rows should be equivalent @@ -220,9 +220,9 @@ BlockSparsityPatternBase::n_rows() const -template -typename BlockSparsityPatternBase::size_type -BlockSparsityPatternBase::n_cols() const +template +typename BlockSparsityPatternBase::size_type +BlockSparsityPatternBase::n_cols() const { // only count in first row, since // all rows should be equivalent @@ -234,9 +234,9 @@ BlockSparsityPatternBase::n_cols() const -template -typename BlockSparsityPatternBase::size_type -BlockSparsityPatternBase::n_nonzero_elements() const +template +typename BlockSparsityPatternBase::size_type +BlockSparsityPatternBase::n_nonzero_elements() const { size_type count = 0; for (size_type i = 0; i < rows; ++i) @@ -247,9 +247,9 @@ BlockSparsityPatternBase::n_nonzero_elements() const -template +template void -BlockSparsityPatternBase::print(std::ostream &out) const +BlockSparsityPatternBase::print(std::ostream &out) const { size_type k = 0; for (size_type ib = 0; ib < n_block_rows(); ++ib) @@ -260,7 +260,7 @@ BlockSparsityPatternBase::print(std::ostream &out) const size_type l = 0; for (size_type jb = 0; jb < n_block_cols(); ++jb) { - const SparsityPatternBase &b = block(ib, jb); + const SparsityPatternType &b = block(ib, jb); for (size_type j = 0; j < b.n_cols(); ++j) if (b.exists(i, j)) out << ',' << l + j; @@ -304,9 +304,9 @@ BlockSparsityPatternBase::print(std::ostream &out) const -template +template void -BlockSparsityPatternBase::print_gnuplot( +BlockSparsityPatternBase::print_gnuplot( std::ostream &out) const { size_type k = 0; @@ -317,7 +317,7 @@ BlockSparsityPatternBase::print_gnuplot( size_type l = 0; for (size_type jb = 0; jb < n_block_cols(); ++jb) { - const SparsityPatternBase &b = block(ib, jb); + const SparsityPatternType &b = block(ib, jb); for (size_type j = 0; j < b.n_cols(); ++j) if (b.exists(i, j)) out << l + j << " " << -static_cast(i + k) @@ -331,9 +331,9 @@ BlockSparsityPatternBase::print_gnuplot( -template +template void -BlockSparsityPatternBase::print_svg( +BlockSparsityPatternBase::print_svg( std::ostream &out) const { const unsigned int m = this->n_rows(); -- 2.39.5