From: Sebastian Kinnewig Date: Mon, 29 Jan 2024 12:03:11 +0000 (+0100) Subject: Simplify the Copy-Constructor in TpetraWrappers::Vector X-Git-Tag: relicensing~101^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16559%2Fhead;p=dealii.git Simplify the Copy-Constructor in TpetraWrappers::Vector --- 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); }