]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Be pedantically correct when looping over cells.
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 28 Mar 2020 00:01:33 +0000 (18:01 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sat, 28 Mar 2020 00:03:03 +0000 (18:03 -0600)
examples/step-67/step-67.cc

index 5599a6cb16218035eb1b72c278e83fe755e6135f..53c3a9cea0f74497439ca7466a31b2e45ec721c4 100644 (file)
@@ -2229,8 +2229,9 @@ namespace Euler_DG
 
     double min_vertex_distance = std::numeric_limits<double>::max();
     for (const auto cell : triangulation.active_cell_iterators())
-      min_vertex_distance =
-        std::min(min_vertex_distance, cell->minimum_vertex_distance());
+      if (cell->is_locally_owned())
+        min_vertex_distance =
+          std::min(min_vertex_distance, cell->minimum_vertex_distance());
     min_vertex_distance =
       Utilities::MPI::min(min_vertex_distance, MPI_COMM_WORLD);
 

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.