]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify the Copy-Constructor in TpetraWrappers::Vector 16559/head
authorSebastian Kinnewig <kinnewig@ifam.uni-hannover.de>
Mon, 29 Jan 2024 12:03:11 +0000 (13:03 +0100)
committerSebastian Kinnewig <kinnewig@ifam.uni-hannover.de>
Mon, 29 Jan 2024 12:26:34 +0000 (13:26 +0100)
include/deal.II/lac/trilinos_tpetra_vector.templates.h

index cf52c7be025f258b0509edf862eea31f364c433d..f5ed4a0b9e99e25acef418fc6190483f4e69875e 100644 (file)
@@ -63,16 +63,13 @@ namespace LinearAlgebra
       : Subscriptor()
       , compressed(V.compressed)
       , has_ghost(V.has_ghost)
-      , vector(Utilities::Trilinos::internal::make_rcp<VectorType>(
-          V.vector->getMap()))
+      , vector(
+          Utilities::Trilinos::internal::make_rcp<VectorType>(*V.vector,
+                                                              Teuchos::Copy))
     {
-      Tpetra::deep_copy(*vector, *V.vector);
       if (!V.nonlocal_vector.is_null())
-        {
-          nonlocal_vector = Utilities::Trilinos::internal::make_rcp<VectorType>(
-            V.nonlocal_vector->getMap());
-          Tpetra::deep_copy(*nonlocal_vector, *V.nonlocal_vector);
-        }
+        nonlocal_vector = Utilities::Trilinos::internal::make_rcp<VectorType>(
+          *V.nonlocal_vector, Teuchos::Copy);
     }
 
 

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.