From: Wolfgang Bangerth Date: Wed, 22 Apr 2015 12:12:20 +0000 (-0500) Subject: Avoid using the deprecated row_iterator types of sparsity patterns. Replace them... X-Git-Tag: v8.3.0-rc1~211^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ae04f710abcb2c9bc79f7d5d4c735d9939a9140;p=dealii.git Avoid using the deprecated row_iterator types of sparsity patterns. Replace them with uses of regular iterators. --- diff --git a/source/lac/sparsity_tools.cc b/source/lac/sparsity_tools.cc index 92116587d8..b5bfaeb71c 100644 --- a/source/lac/sparsity_tools.cc +++ b/source/lac/sparsity_tools.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2008 - 2014 by the deal.II authors +// Copyright (C) 2008 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -248,9 +248,9 @@ namespace SparsityTools // find all neighbors of the dofs numbered in the last round for (DynamicSparsityPattern::size_type i=0; icolumn()); // sort dof numbers std::sort (next_round_dofs.begin(), next_round_dofs.end()); @@ -305,10 +305,7 @@ namespace SparsityTools for (std::vector::iterator s=next_round_dofs.begin(); s!=next_round_dofs.end(); ++s) { - DynamicSparsityPattern::size_type coordination = 0; - for (DynamicSparsityPattern::row_iterator j=sparsity.row_begin(*s); - j new_entry (coordination, *s); @@ -445,13 +442,13 @@ namespace SparsityTools next_group.push_back(min_neighbors.first); touched_nodes[min_neighbors.first] = groups.size()-1; - for (DynamicSparsityPattern::row_iterator it - = connectivity.row_begin(min_neighbors.first); - it != connectivity.row_end(min_neighbors.first); ++it) - if (touched_nodes[*it] == numbers::invalid_dof_index) + for (DynamicSparsityPattern::iterator it + = connectivity.begin(min_neighbors.first); + it != connectivity.end(min_neighbors.first); ++it) + if (touched_nodes[it->column()] == numbers::invalid_dof_index) { - next_group.push_back(*it); - touched_nodes[*it] = groups.size()-1; + next_group.push_back(it->column()); + touched_nodes[it->column()] = groups.size()-1; } // Add all neighbors of the current list not yet touched to the @@ -461,13 +458,13 @@ namespace SparsityTools // the set of possible next pivots. for (unsigned int i=0; icolumn()] == numbers::invalid_dof_index) + current_neighbors.insert(it->column()); + n_remaining_neighbors[it->column()]--; } current_neighbors.erase(next_group[i]); } @@ -487,10 +484,10 @@ namespace SparsityTools groups.size()); for (types::global_dof_index i=0; icolumn()]); // Recursively call the reordering std::vector renumbering_next(groups.size());