]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use ArrayViews directly instead of pointers.
authorDavid Wells <drwells@email.unc.edu>
Mon, 15 Feb 2021 18:34:46 +0000 (13:34 -0500)
committerDavid Wells <drwells@email.unc.edu>
Mon, 15 Feb 2021 18:34:46 +0000 (13:34 -0500)
include/deal.II/base/mpi_noncontiguous_partitioner.templates.h

index 0b0426e526c8edde47272c1f3f4072ed325f6c74..96aed47bb0475d369f15de1c4ba7085b7f5a15ba 100644 (file)
@@ -321,15 +321,13 @@ namespace Utilities
           AssertThrowMPI(ierr);
         }
 
-      auto src_iterator = src.begin();
-
       // post send
       for (types::global_dof_index i = 0, k = 0; i < send_ranks.size(); i++)
         {
           // collect data to be send
           for (types::global_dof_index j = send_ptr[i]; j < send_ptr[i + 1];
                j++)
-            buffers[j] = src_iterator[send_indices[k++]];
+            buffers[j] = src[send_indices[k++]];
 
           // send data
           const auto ierr =
@@ -360,8 +358,6 @@ namespace Utilities
       (void)requests;
       Assert(false, ExcNeedsMPI());
 #else
-      auto dst_iterator = dst.begin();
-
       // receive all data packages and copy data from buffers
       for (types::global_dof_index proc = 0; proc < recv_ranks.size(); proc++)
         {
@@ -376,7 +372,7 @@ namespace Utilities
           for (types::global_dof_index j = recv_ptr[i], c = 0;
                j < recv_ptr[i + 1];
                j++)
-            dst_iterator[recv_indices[j]] = buffers[recv_ptr[i] + c++];
+            dst[recv_indices[j]] = buffers[recv_ptr[i] + c++];
         }
 
       // wait that all data packages have been sent

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.