From 78c01f41b36e01ac890c7844756c36380815fa52 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 31 Dec 2023 18:18:47 -0700 Subject: [PATCH] Avoid a global 'typedef' and qualify things locally. --- source/lac/trilinos_sparse_matrix.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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, -- 2.39.5