Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make LA::TpetraWrappers::SparseMatrix::copy_from compatible with older Trilinos versions. #16668

Merged
merged 1 commit into from Feb 19, 2024

Conversation

kinnewig
Copy link
Contributor

This restores the compatibility with older Trilinos versions and should fix #16667.

@masterleinad
Copy link
Member

masterleinad commented Feb 19, 2024

You'll have to fix the indentation:

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 16466d24c..a8c149781 100644
--- a/include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h
+++ b/include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h
@@ -1026,8 +1026,9 @@ namespace LinearAlgebra
       matrix =
         Utilities::Trilinos::internal::make_rcp<MatrixType>(*source.matrix,
                                                             Teuchos::Copy);
-#  else 
-      matrix = source.matrix->clone(Utilities::Trilinos::internal::make_rcp<NodeType>());
+#  else
+      matrix = source.matrix->clone(
+        Utilities::Trilinos::internal::make_rcp<NodeType>());
 #  endif
       column_space_map = Teuchos::rcp_const_cast<MapType>(matrix->getColMap());
       compressed       = source.compressed;

@kinnewig
Copy link
Contributor Author

You'll have to fix the indentation:

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 16466d24c..a8c149781 100644
--- a/include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h
+++ b/include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h
@@ -1026,8 +1026,9 @@ namespace LinearAlgebra
       matrix =
         Utilities::Trilinos::internal::make_rcp<MatrixType>(*source.matrix,
                                                             Teuchos::Copy);
-#  else 
-      matrix = source.matrix->clone(Utilities::Trilinos::internal::make_rcp<NodeType>());
+#  else
+      matrix = source.matrix->clone(
+        Utilities::Trilinos::internal::make_rcp<NodeType>());
 #  endif
       column_space_map = Teuchos::rcp_const_cast<MapType>(matrix->getColMap());
       compressed       = source.compressed;

Done!

@masterleinad
Copy link
Member

/rebuild

@bangerth bangerth merged commit a9ee8fe into dealii:master Feb 19, 2024
16 checks passed
@kinnewig kinnewig deleted the tpetra_wrappers_fix branch February 20, 2024 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression tester regressed 2f6889
3 participants