]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use structured binding
authorMarco Feder <marco.feder@sissa.it>
Wed, 5 Jul 2023 17:09:20 +0000 (19:09 +0200)
committerMarco Feder <marco.feder@sissa.it>
Fri, 14 Jul 2023 07:58:27 +0000 (09:58 +0200)
source/grid/grid_tools.cc

index ece105741a457e6c2313a0644511bc1d5894821c..43185a32f0a76cbb977f63f938e145427afdaac4 100644 (file)
@@ -5968,10 +5968,8 @@ namespace GridTools
           ArborXWrappers::DistributedTree distributed_tree(comm,
                                                            global_bboxes[idx]);
 
-          auto indices_ranks_offset = distributed_tree.query(bb_intersect);
-          auto indices_ranks        = indices_ranks_offset.first;
-          auto offsets              = indices_ranks_offset.second;
-
+          const auto &[indices_ranks, offsets] =
+            distributed_tree.query(bb_intersect);
           fill_ranks_and_indices(offsets, indices_ranks);
         }
       else if constexpr (spacedim == 3)
@@ -5983,10 +5981,8 @@ namespace GridTools
             {
               ArborXWrappers::PointIntersectPredicate bb_intersect(entities);
 
-              auto indices_ranks_offset = distributed_tree.query(bb_intersect);
-              auto indices_ranks        = indices_ranks_offset.first;
-              auto offsets              = indices_ranks_offset.second;
-
+              const auto &[indices_ranks, offsets] =
+                distributed_tree.query(bb_intersect);
               fill_ranks_and_indices(offsets, indices_ranks);
             }
           else if constexpr (std::is_same<T, BoundingBox<3>>::value)
@@ -5994,10 +5990,8 @@ namespace GridTools
               ArborXWrappers::BoundingBoxIntersectPredicate bb_intersect(
                 entities);
 
-              auto indices_ranks_offset = distributed_tree.query(bb_intersect);
-              auto indices_ranks        = indices_ranks_offset.first;
-              auto offsets              = indices_ranks_offset.second;
-
+              const auto &[indices_ranks, offsets] =
+                distributed_tree.query(bb_intersect);
               fill_ranks_and_indices(offsets, indices_ranks);
             }
         }

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.