From: Sebastian Kinnewig Date: Mon, 19 Feb 2024 13:14:06 +0000 (+0100) Subject: Make LA::TpetraWrappers::SparseMatrix::copy_from compatible with older Trilinos versions. X-Git-Tag: relicensing~24^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b472d7b3a72bc9c52fc0dc0f29559c5ab256c43;p=dealii.git Make LA::TpetraWrappers::SparseMatrix::copy_from compatible with older Trilinos versions. --- 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 48b836e320..a8c1497817 100644 --- a/include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h +++ b/include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h @@ -1022,9 +1022,14 @@ namespace LinearAlgebra // not need to perform a deep copy. // Perform a deep copy +# if DEAL_II_TRILINOS_VERSION_GTE(12, 18, 1) matrix = Utilities::Trilinos::internal::make_rcp(*source.matrix, Teuchos::Copy); +# else + matrix = source.matrix->clone( + Utilities::Trilinos::internal::make_rcp()); +# endif column_space_map = Teuchos::rcp_const_cast(matrix->getColMap()); compressed = source.compressed; }