]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Apply suggestions from code review
authorBruno Blais <blais.bruno@gmail.com>
Mon, 21 Nov 2022 16:12:19 +0000 (11:12 -0500)
committerGitHub <noreply@github.com>
Mon, 21 Nov 2022 16:12:19 +0000 (11:12 -0500)
Co-authored-by: Rene Gassmoeller <rene.gassmoeller@mailbox.org>
include/deal.II/grid/grid_tools_cache_update_flags.h
source/particles/particle_handler.cc
tests/particles/exchange_ghosts_periodic_01.cc

index 9e5750c56a18a6fdba158adb90622eeb530ca96b..7e0807befba1b3a90ea6c2cde4ba6b36a0c1acec 100644 (file)
@@ -85,8 +85,7 @@ namespace GridTools
     update_vertex_to_neighbor_subdomain = 0x100,
 
     /**
-     * Update the coinciding vertex groups as well as the
-     * vertex_to_coinciding_vertex_group
+     * Update the information about which subdomains are connected to each vertex.
      */
     update_vertex_with_ghost_neighbors = 0x200,
 
index 320dda647fc74bbcb6f094367801ea2ac505669b..0123fb7bd9b43869f14e63fa7c6e1ea69bae2f4b 100644 (file)
@@ -1567,14 +1567,13 @@ namespace Particles
             std::set<unsigned int> cell_to_neighbor_subdomain;
             for (const unsigned int v : cell->vertex_indices())
               {
-                if (vertices_with_ghost_neighbors.find(cell->vertex_index(v)) !=
+                const auto vertex_ghost_neighbors = vertices_with_ghost_neighbors.find(cell->vertex_index(v));
+                if (vertex_ghost_neighbors !=
                     vertices_with_ghost_neighbors.end())
                   {
                     cell_to_neighbor_subdomain.insert(
-                      vertices_with_ghost_neighbors.at(cell->vertex_index(v))
-                        .begin(),
-                      vertices_with_ghost_neighbors.at(cell->vertex_index(v))
-                        .end());
+                      vertex_ghost_neighbors->second.begin(),
+                      vertex_ghost_neighbors->second.end());
                   }
               }
 
index be4bc3302cc0d8ae094e0fdc71a4fe992c579d0f..7f9721daae77ed01ace9c92910774170f0e1689b 100644 (file)
@@ -68,7 +68,7 @@ test()
     Point<dim>      reference_position;
 
     if (Utilities::MPI::this_mpi_process(tr.get_communicator()) == 0)
-      position(0) = 0.001;
+      position[0] = 0.001;
     else
       position[0] = 0.999;
 

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.