From c4f45c650c320bc6b59cea6f45837d3ce1be2c9e Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 22 Apr 2015 07:12:31 -0500 Subject: [PATCH] Avoid using the deprecated row_iterator types of sparsity patterns. Replace them with uses of regular iterators. --- tests/bits/compressed_set_sparsity_pattern_04.cc | 10 +++++----- tests/bits/compressed_set_sparsity_pattern_05.cc | 8 ++++---- tests/bits/dof_tools_01b_x.cc | 8 ++++---- tests/bits/dof_tools_01d_x.cc | 10 +++++----- tests/bits/dof_tools_02b_x.cc | 6 +++--- tests/bits/dof_tools_02d_x.cc | 8 ++++---- tests/bits/dof_tools_15b_x.cc | 8 ++++---- tests/bits/dof_tools_15d_x.cc | 10 +++++----- tests/bits/dof_tools_16b_x.cc | 8 ++++---- tests/bits/dof_tools_16d_x.cc | 10 +++++----- tests/bits/dof_tools_17b_x.cc | 8 ++++---- tests/bits/dof_tools_17d_x.cc | 10 +++++----- tests/bits/dof_tools_18b_x.cc | 8 ++++---- tests/bits/dof_tools_18d_x.cc | 10 +++++----- tests/deal.II/block_list.h | 4 ++-- tests/deal.II/block_list_01.cc | 4 ++-- 16 files changed, 65 insertions(+), 65 deletions(-) diff --git a/tests/bits/compressed_set_sparsity_pattern_04.cc b/tests/bits/compressed_set_sparsity_pattern_04.cc index 6711423c9c..5d83b1017f 100644 --- a/tests/bits/compressed_set_sparsity_pattern_04.cc +++ b/tests/bits/compressed_set_sparsity_pattern_04.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. // @@ -15,7 +15,7 @@ -// check CompressedSetSparsityPattern::row_begin iterators. since we create +// check CompressedSetSparsityPattern::begin iterators. since we create // quite some output here, choose smaller number of rows and entries than in // the other tests @@ -37,9 +37,9 @@ void test () for (unsigned int i=0; icolumn() << std::endl; } } diff --git a/tests/bits/compressed_set_sparsity_pattern_05.cc b/tests/bits/compressed_set_sparsity_pattern_05.cc index 057fff6401..c4b53583bd 100644 --- a/tests/bits/compressed_set_sparsity_pattern_05.cc +++ b/tests/bits/compressed_set_sparsity_pattern_05.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. // @@ -38,9 +38,9 @@ void test () for (unsigned int i=0; icolumn() << std::endl; } } diff --git a/tests/bits/dof_tools_01b_x.cc b/tests/bits/dof_tools_01b_x.cc index 101080784d..d02da5ce88 100644 --- a/tests/bits/dof_tools_01b_x.cc +++ b/tests/bits/dof_tools_01b_x.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -42,9 +42,9 @@ check_this (const DoFHandler &dof_handler) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); - for (CompressedSetSparsityPattern::row_iterator - c = sp.row_begin(line); c!=sp.row_end(line); ++c) - deallog << *c << " "; + for (CompressedSetSparsityPattern::iterator + c = sp.begin(line); c!=sp.end(line); ++c) + deallog << c->column() << " "; deallog << std::endl; } diff --git a/tests/bits/dof_tools_01d_x.cc b/tests/bits/dof_tools_01d_x.cc index 73b46b464d..ec0afaf483 100644 --- a/tests/bits/dof_tools_01d_x.cc +++ b/tests/bits/dof_tools_01d_x.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -66,10 +66,10 @@ check_this (const DoFHandler &dof_handler) block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; colcolumn() << " "; deallog << std::endl; } diff --git a/tests/bits/dof_tools_02b_x.cc b/tests/bits/dof_tools_02b_x.cc index 085da19901..5c00de6b5b 100644 --- a/tests/bits/dof_tools_02b_x.cc +++ b/tests/bits/dof_tools_02b_x.cc @@ -52,9 +52,9 @@ check_this (const DoFHandler &dof_handler) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); - for (CompressedSetSparsityPattern::row_iterator - c = sp.row_begin(line); c!=sp.row_end(line); ++c) - deallog << *c << " "; + for (CompressedSetSparsityPattern::iterator + c = sp.begin(line); c!=sp.end(line); ++c) + deallog << c->column() << " "; deallog << std::endl; } diff --git a/tests/bits/dof_tools_02d_x.cc b/tests/bits/dof_tools_02d_x.cc index ec1172e163..a5846d91a3 100644 --- a/tests/bits/dof_tools_02d_x.cc +++ b/tests/bits/dof_tools_02d_x.cc @@ -75,10 +75,10 @@ check_this (const DoFHandler &dof_handler) block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; colcolumn() << " "; deallog << std::endl; } diff --git a/tests/bits/dof_tools_15b_x.cc b/tests/bits/dof_tools_15b_x.cc index 609243fe77..e50a21bce0 100644 --- a/tests/bits/dof_tools_15b_x.cc +++ b/tests/bits/dof_tools_15b_x.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -51,9 +51,9 @@ check_this (const DoFHandler &dof_handler) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); - for (CompressedSetSparsityPattern::row_iterator - c = sp.row_begin(line); c!=sp.row_end(line); ++c) - deallog << *c << " "; + for (CompressedSetSparsityPattern::iterator + c = sp.begin(line); c!=sp.end(line); ++c) + deallog << c->column() << " "; deallog << std::endl; } diff --git a/tests/bits/dof_tools_15d_x.cc b/tests/bits/dof_tools_15d_x.cc index c63b1bfeea..3385500d61 100644 --- a/tests/bits/dof_tools_15d_x.cc +++ b/tests/bits/dof_tools_15d_x.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -72,10 +72,10 @@ check_this (const DoFHandler &dof_handler) block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; colcolumn() << " "; deallog << std::endl; } diff --git a/tests/bits/dof_tools_16b_x.cc b/tests/bits/dof_tools_16b_x.cc index 6219cd2678..de98f33846 100644 --- a/tests/bits/dof_tools_16b_x.cc +++ b/tests/bits/dof_tools_16b_x.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -57,9 +57,9 @@ check_this (const DoFHandler &dof_handler) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); - for (CompressedSetSparsityPattern::row_iterator - c = sp.row_begin(line); c!=sp.row_end(line); ++c) - deallog << *c << " "; + for (CompressedSetSparsityPattern::iterator + c = sp.begin(line); c!=sp.end(line); ++c) + deallog << c->column() << " "; deallog << std::endl; } diff --git a/tests/bits/dof_tools_16d_x.cc b/tests/bits/dof_tools_16d_x.cc index 7d082da01e..d141d22408 100644 --- a/tests/bits/dof_tools_16d_x.cc +++ b/tests/bits/dof_tools_16d_x.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -79,10 +79,10 @@ check_this (const DoFHandler &dof_handler) block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; colcolumn() << " "; deallog << std::endl; } diff --git a/tests/bits/dof_tools_17b_x.cc b/tests/bits/dof_tools_17b_x.cc index 68bd97bd27..79543a0cca 100644 --- a/tests/bits/dof_tools_17b_x.cc +++ b/tests/bits/dof_tools_17b_x.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -42,9 +42,9 @@ check_this (const DoFHandler &dof_handler) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); - for (CompressedSetSparsityPattern::row_iterator - c = sp.row_begin(line); c!=sp.row_end(line); ++c) - deallog << *c << " "; + for (CompressedSetSparsityPattern::iterator + c = sp.begin(line); c!=sp.end(line); ++c) + deallog << c->column() << " "; deallog << std::endl; } diff --git a/tests/bits/dof_tools_17d_x.cc b/tests/bits/dof_tools_17d_x.cc index 7c8a6d4f31..6d28c91a35 100644 --- a/tests/bits/dof_tools_17d_x.cc +++ b/tests/bits/dof_tools_17d_x.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -66,10 +66,10 @@ check_this (const DoFHandler &dof_handler) block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; colcolumn() << " "; deallog << std::endl; } diff --git a/tests/bits/dof_tools_18b_x.cc b/tests/bits/dof_tools_18b_x.cc index d455f9c8d9..b529cdd616 100644 --- a/tests/bits/dof_tools_18b_x.cc +++ b/tests/bits/dof_tools_18b_x.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -69,9 +69,9 @@ my_check_this (const DoFHandler &dof_handler) for (unsigned int l=0; l<20; ++l) { const unsigned int line = l*(sp.n_rows()/20); - for (CompressedSetSparsityPattern::row_iterator - c = sp.row_begin(line); c!=sp.row_end(line); ++c) - deallog << *c << " "; + for (CompressedSetSparsityPattern::iterator + c = sp.begin(line); c!=sp.end(line); ++c) + deallog << c->column() << " "; deallog << std::endl; } diff --git a/tests/bits/dof_tools_18d_x.cc b/tests/bits/dof_tools_18d_x.cc index e487d2f82d..9897ae4fb3 100644 --- a/tests/bits/dof_tools_18d_x.cc +++ b/tests/bits/dof_tools_18d_x.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2014 by the deal.II authors +// Copyright (C) 2003 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -93,10 +93,10 @@ my_check_this (const DoFHandler &dof_handler) block_row = sp.get_row_indices().global_to_local(line); for (unsigned int col=0; colcolumn() << " "; deallog << std::endl; } diff --git a/tests/deal.II/block_list.h b/tests/deal.II/block_list.h index 95bd3a3835..f3c5556205 100644 --- a/tests/deal.II/block_list.h +++ b/tests/deal.II/block_list.h @@ -36,8 +36,8 @@ print_patches (const SparsityPattern &bl) { deallog << "Block " << std::setw(3) << i; std::vector entries; - for (SparsityPattern::row_iterator b = bl.row_begin(i); b != bl.row_end(i); ++b) - entries.push_back(*b); + for (SparsityPattern::iterator b = bl.begin(i); b != bl.end(i); ++b) + entries.push_back(b->column()); std::sort(entries.begin(), entries.end()); diff --git a/tests/deal.II/block_list_01.cc b/tests/deal.II/block_list_01.cc index 5a0b932b68..6dbe87ef52 100644 --- a/tests/deal.II/block_list_01.cc +++ b/tests/deal.II/block_list_01.cc @@ -36,8 +36,8 @@ test_block_list(const Triangulation &tr, const FiniteElement &fe) { deallog << "Block " << std::setw(3) << i; std::vector entries; - for (SparsityPattern::row_iterator b = bl.row_begin(i); b != bl.row_end(i); ++b) - entries.push_back(*b); + for (SparsityPattern::iterator b = bl.begin(i); b != bl.end(i); ++b) + entries.push_back(b->column()); std::sort(entries.begin(), entries.end()); -- 2.39.5