From: David Wells Date: Fri, 2 Aug 2024 13:25:51 +0000 (-0400) Subject: PETScWrappers: don't use deprecated functions. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15bd1a1040c820c0423aaf24407c4c341e3e7f2b;p=dealii.git PETScWrappers: don't use deprecated functions. --- 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(); }