From: Wolfgang Bangerth Date: Mon, 1 Jan 2024 01:18:47 +0000 (-0700) Subject: Avoid a global 'typedef' and qualify things locally. X-Git-Tag: relicensing~208^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78c01f41b36e01ac890c7844756c36380815fa52;p=dealii.git Avoid a global 'typedef' and qualify things locally. --- diff --git a/source/lac/trilinos_sparse_matrix.cc b/source/lac/trilinos_sparse_matrix.cc index 231e9e3f83..b652a05dbb 100644 --- a/source/lac/trilinos_sparse_matrix.cc +++ b/source/lac/trilinos_sparse_matrix.cc @@ -444,8 +444,6 @@ namespace TrilinosWrappers namespace { - using size_type = SparseMatrix::size_type; - template void reinit_matrix(const IndexSet &row_parallel_partitioning, @@ -495,12 +493,14 @@ namespace TrilinosWrappers return; } - const size_type first_row = TrilinosWrappers::min_my_gid(row_space_map), - last_row = - TrilinosWrappers::max_my_gid(row_space_map) + 1; + const SparseMatrix::size_type first_row = TrilinosWrappers::min_my_gid( + row_space_map), + last_row = TrilinosWrappers::max_my_gid( + row_space_map) + + 1; std::vector n_entries_per_row(last_row - first_row); - for (size_type row = first_row; row < last_row; ++row) + for (SparseMatrix::size_type row = first_row; row < last_row; ++row) n_entries_per_row[row - first_row] = sparsity_pattern.row_length(row); // The deal.II notation of a Sparsity pattern corresponds to the Epetra @@ -537,7 +537,7 @@ namespace TrilinosWrappers // now insert the indices std::vector row_indices; - for (size_type row = first_row; row < last_row; ++row) + for (SparseMatrix::size_type row = first_row; row < last_row; ++row) { const int row_length = sparsity_pattern.row_length(row); if (row_length == 0) @@ -547,7 +547,9 @@ namespace TrilinosWrappers { typename SparsityPatternType::iterator p = sparsity_pattern.begin(row); - for (size_type col = 0; p != sparsity_pattern.end(row); ++p, ++col) + for (SparseMatrix::size_type col = 0; + p != sparsity_pattern.end(row); + ++p, ++col) row_indices[col] = p->column(); } graph->Epetra_CrsGraph::InsertGlobalIndices(row,