Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify the Copy-Constructor in TpetraWrappers::Vector #16559

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 5 additions & 8 deletions include/deal.II/lac/trilinos_tpetra_vector.templates.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down