From: Daniel Arndt Date: Sun, 5 Aug 2018 09:01:10 +0000 (+0200) Subject: Remove unused variables in LA::d::Vector::import X-Git-Tag: v9.1.0-rc1~847^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4ceb10f28b7bfd795946f612d7636c317410689;p=dealii.git Remove unused variables in LA::d::Vector::import --- 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());