From d4ceb10f28b7bfd795946f612d7636c317410689 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sun, 5 Aug 2018 11:01:10 +0200 Subject: [PATCH] Remove unused variables in LA::d::Vector::import --- include/deal.II/lac/la_parallel_vector.templates.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/include/deal.II/lac/la_parallel_vector.templates.h b/include/deal.II/lac/la_parallel_vector.templates.h index 2898463552..6619314f9c 100644 --- a/include/deal.II/lac/la_parallel_vector.templates.h +++ b/include/deal.II/lac/la_parallel_vector.templates.h @@ -702,7 +702,6 @@ namespace LinearAlgebra VectorOperation::values operation, std::shared_ptr communication_pattern) { - IndexSet locally_owned_elem = locally_owned_elements(); // If no communication pattern is given, create one. Otherwise, use the // given one. std::shared_ptr comm_pattern; @@ -710,11 +709,11 @@ namespace LinearAlgebra { // Split the IndexSet of V in locally owned elements and ghost indices // then create the communication pattern - IndexSet ghost_indices(V.get_stored_elements()); + IndexSet locally_owned_elem = locally_owned_elements(); + IndexSet ghost_indices = V.get_stored_elements(); ghost_indices.subtract_set(locally_owned_elem); - IndexSet local_indices(locally_owned_elem); comm_pattern = std::make_shared( - local_indices, ghost_indices, get_mpi_communicator()); + locally_owned_elem, ghost_indices, get_mpi_communicator()); } else { @@ -725,9 +724,6 @@ namespace LinearAlgebra ExcMessage("The communication pattern is not of type " "Utilities::MPI::Partitioner.")); } - IndexSet ghost_indices(V.get_stored_elements()); - ghost_indices.subtract_set(locally_owned_elem); - IndexSet local_indices(locally_owned_elem); Vector tmp_vector(comm_pattern); std::copy(begin(), end(), tmp_vector.begin()); -- 2.39.5