From 51a4eb1b395a8c0bd04eb0f8d97f3b957071dd81 Mon Sep 17 00:00:00 2001 From: Sebastian Kinnewig Date: Mon, 29 Jan 2024 13:03:11 +0100 Subject: [PATCH] Simplify the Copy-Constructor in TpetraWrappers::Vector --- .../deal.II/lac/trilinos_tpetra_vector.templates.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/include/deal.II/lac/trilinos_tpetra_vector.templates.h b/include/deal.II/lac/trilinos_tpetra_vector.templates.h index cf52c7be02..f5ed4a0b9e 100644 --- a/include/deal.II/lac/trilinos_tpetra_vector.templates.h +++ b/include/deal.II/lac/trilinos_tpetra_vector.templates.h @@ -63,16 +63,13 @@ namespace LinearAlgebra : Subscriptor() , compressed(V.compressed) , has_ghost(V.has_ghost) - , vector(Utilities::Trilinos::internal::make_rcp( - V.vector->getMap())) + , vector( + Utilities::Trilinos::internal::make_rcp(*V.vector, + Teuchos::Copy)) { - Tpetra::deep_copy(*vector, *V.vector); if (!V.nonlocal_vector.is_null()) - { - nonlocal_vector = Utilities::Trilinos::internal::make_rcp( - V.nonlocal_vector->getMap()); - Tpetra::deep_copy(*nonlocal_vector, *V.nonlocal_vector); - } + nonlocal_vector = Utilities::Trilinos::internal::make_rcp( + *V.nonlocal_vector, Teuchos::Copy); } -- 2.39.5