]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make LA::TpetraWrappers::SparseMatrix::copy_from compatible with older Trilinos versions. 16668/head
authorSebastian Kinnewig <kinnewig@ifam.uni-hannover.de>
Mon, 19 Feb 2024 13:14:06 +0000 (14:14 +0100)
committerSebastian Kinnewig <kinnewig@ifam.uni-hannover.de>
Mon, 19 Feb 2024 13:31:25 +0000 (14:31 +0100)
include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h

index 48b836e320dd2b132562bc1006a8f5ca7f9388d5..a8c14978179dc610afc7809031441e84dd40b254 100644 (file)
@@ -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<MatrixType>(*source.matrix,
                                                             Teuchos::Copy);
+#  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;
     }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.