]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove unused variables in LA::d::Vector::import 7029/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sun, 5 Aug 2018 09:01:10 +0000 (11:01 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sun, 5 Aug 2018 09:01:10 +0000 (11:01 +0200)
include/deal.II/lac/la_parallel_vector.templates.h

index 28984635529bccd350d8b4a00cd51e3e6e79827c..6619314f9c7d741d9c7aaa75ed77a35343a00d23 100644 (file)
@@ -702,7 +702,6 @@ namespace LinearAlgebra
       VectorOperation::values                         operation,
       std::shared_ptr<const CommunicationPatternBase> 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<const Utilities::MPI::Partitioner> 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<Utilities::MPI::Partitioner>(
-            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<Number> tmp_vector(comm_pattern);
       std::copy(begin(), end(), tmp_vector.begin());
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.