From 15bd1a1040c820c0423aaf24407c4c341e3e7f2b Mon Sep 17 00:00:00 2001 From: David Wells Date: Fri, 2 Aug 2024 09:25:51 -0400 Subject: [PATCH] PETScWrappers: don't use deprecated functions. --- source/lac/petsc_communication_pattern.cc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/source/lac/petsc_communication_pattern.cc b/source/lac/petsc_communication_pattern.cc index 8f3df038ec..3398e8b3a4 100644 --- a/source/lac/petsc_communication_pattern.cc +++ b/source/lac/petsc_communication_pattern.cc @@ -88,12 +88,10 @@ namespace PETScWrappers const IndexSet &ghost_indices, const MPI_Comm communicator) { - std::vector in_deal; - locally_owned_indices.fill_index_vector(in_deal); + const auto in_deal = locally_owned_indices.get_index_vector(); std::vector in_petsc(in_deal.begin(), in_deal.end()); - std::vector out_deal; - ghost_indices.fill_index_vector(out_deal); + const auto out_deal = ghost_indices.get_index_vector(); std::vector out_petsc(out_deal.begin(), out_deal.end()); std::vector dummy; @@ -400,9 +398,6 @@ namespace PETScWrappers const IndexSet &larger_ghost_indices, const MPI_Comm communicator) { - std::vector local_indices; - locally_owned_indices.fill_index_vector(local_indices); - ghost_indices_data = ghost_indices; ghost_indices_data.subtract_set(locally_owned_indices); ghost_indices_data.compress(); @@ -419,7 +414,9 @@ namespace PETScWrappers } ghost.reinit(locally_owned_indices, ghost_indices_data, communicator); - larger_ghost.reinit(local_indices, expanded_ghost_indices, communicator); + larger_ghost.reinit(locally_owned_indices.get_index_vector(), + expanded_ghost_indices, + communicator); n_ghost_indices_data = ghost_indices_data.n_elements(); n_ghost_indices_larger = larger_ghost_indices.n_elements(); } -- 2.39.5