From 5cdbee4f2d6a7f517d7ef0371c2cd74dc87060db Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sat, 2 Mar 2024 13:24:00 -0500 Subject: [PATCH] Tpetra: Fix unity builds --- .../trilinos_tpetra_sparse_matrix.templates.h | 8 +- .../lac/trilinos_tpetra_sparsity_pattern.cc | 76 ++++++++++--------- 2 files changed, 43 insertions(+), 41 deletions(-) diff --git a/include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h b/include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h index a421e8723e..f4ead0de68 100644 --- a/include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h +++ b/include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h @@ -140,7 +140,7 @@ namespace LinearAlgebra // reinit_matrix(): - namespace + namespace SparseMatrixImpl { using size_type = dealii::types::signed_global_dof_index; @@ -400,7 +400,7 @@ namespace LinearAlgebra Utilities::Trilinos::internal::make_rcp>( graph); } - } // namespace + } // namespace SparseMatrixImpl @@ -530,7 +530,7 @@ namespace LinearAlgebra SparseMatrix::reinit( const SparsityPatternType &sparsity_pattern) { - reinit_matrix( + SparseMatrixImpl::reinit_matrix( complete_index_set(sparsity_pattern.n_rows()), complete_index_set(sparsity_pattern.n_cols()), sparsity_pattern, @@ -675,7 +675,7 @@ namespace LinearAlgebra const MPI_Comm communicator, const bool exchange_data) { - reinit_matrix( + SparseMatrixImpl::reinit_matrix( row_parallel_partitioning, col_parallel_partitioning, sparsity_pattern, diff --git a/source/lac/trilinos_tpetra_sparsity_pattern.cc b/source/lac/trilinos_tpetra_sparsity_pattern.cc index a3d4cb41c9..a76913758c 100644 --- a/source/lac/trilinos_tpetra_sparsity_pattern.cc +++ b/source/lac/trilinos_tpetra_sparsity_pattern.cc @@ -258,7 +258,7 @@ namespace LinearAlgebra - namespace + namespace SparsityPatternImpl { template using size_type = typename SparsityPattern::size_type; @@ -465,7 +465,7 @@ namespace LinearAlgebra graph->globalAssemble(); } - } // namespace + } // namespace SparsityPatternImpl template @@ -478,7 +478,7 @@ namespace LinearAlgebra parallel_partitioning.size()); Teuchos::RCP map = parallel_partitioning.make_tpetra_map_rcp(communicator, false); - reinit_sp( + SparsityPatternImpl::reinit_sp( map, map, n_entries_per_row, column_space_map, graph, nonlocal_graph); } @@ -495,7 +495,7 @@ namespace LinearAlgebra parallel_partitioning.size()); Teuchos::RCP map = parallel_partitioning.make_tpetra_map_rcp(communicator, false); - reinit_sp( + SparsityPatternImpl::reinit_sp( map, map, n_entries_per_row, column_space_map, graph, nonlocal_graph); } @@ -515,12 +515,12 @@ namespace LinearAlgebra row_parallel_partitioning.make_tpetra_map_rcp(communicator, false); Teuchos::RCP col_map = col_parallel_partitioning.make_tpetra_map_rcp(communicator, false); - reinit_sp(row_map, - col_map, - n_entries_per_row, - column_space_map, - graph, - nonlocal_graph); + SparsityPatternImpl::reinit_sp(row_map, + col_map, + n_entries_per_row, + column_space_map, + graph, + nonlocal_graph); } @@ -539,12 +539,12 @@ namespace LinearAlgebra row_parallel_partitioning.make_tpetra_map_rcp(communicator, false); Teuchos::RCP col_map = col_parallel_partitioning.make_tpetra_map_rcp(communicator, false); - reinit_sp(row_map, - col_map, - n_entries_per_row, - column_space_map, - graph, - nonlocal_graph); + SparsityPatternImpl::reinit_sp(row_map, + col_map, + n_entries_per_row, + column_space_map, + graph, + nonlocal_graph); } @@ -564,12 +564,12 @@ namespace LinearAlgebra row_parallel_partitioning.make_tpetra_map_rcp(communicator, false); Teuchos::RCP col_map = col_parallel_partitioning.make_tpetra_map_rcp(communicator, false); - reinit_sp(row_map, - col_map, - n_entries_per_row, - column_space_map, - graph, - nonlocal_graph); + SparsityPatternImpl::reinit_sp(row_map, + col_map, + n_entries_per_row, + column_space_map, + graph, + nonlocal_graph); IndexSet nonlocal_partitioner = writable_rows; AssertDimension(nonlocal_partitioner.size(), @@ -615,13 +615,14 @@ namespace LinearAlgebra row_parallel_partitioning.make_tpetra_map_rcp(communicator, false); Teuchos::RCP col_map = col_parallel_partitioning.make_tpetra_map_rcp(communicator, false); - reinit_sp(row_map, - col_map, - nontrilinos_sparsity_pattern, - exchange_data, - column_space_map, - graph, - nonlocal_graph); + SparsityPatternImpl::reinit_sp( + row_map, + col_map, + nontrilinos_sparsity_pattern, + exchange_data, + column_space_map, + graph, + nonlocal_graph); } @@ -643,13 +644,14 @@ namespace LinearAlgebra parallel_partitioning.size()); Teuchos::RCP map = parallel_partitioning.make_tpetra_map_rcp(communicator, false); - reinit_sp(map, - map, - nontrilinos_sparsity_pattern, - exchange_data, - column_space_map, - graph, - nonlocal_graph); + SparsityPatternImpl::reinit_sp( + map, + map, + nontrilinos_sparsity_pattern, + exchange_data, + column_space_map, + graph, + nonlocal_graph); } @@ -701,7 +703,7 @@ namespace LinearAlgebra 0, Utilities::Trilinos::tpetra_comm_self()); - reinit_sp( + SparsityPatternImpl::reinit_sp( rows, columns, sp, false, column_space_map, graph, nonlocal_graph); } -- 2.39.5