]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make an assertion text more informative. 16120/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 10 Oct 2023 22:35:04 +0000 (16:35 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 12 Oct 2023 14:17:20 +0000 (08:17 -0600)
source/grid/tria_description.cc

index 3c04bfde22e3a09740007deea46fa85acd8a4d15..cc8258aeaa606bc2ffe47e1a04c8ea1c419338b2 100644 (file)
@@ -171,7 +171,7 @@ namespace TriangulationDescription
               std::map<unsigned int, unsigned int>
                 map_old_to_new_local_vertex_index;
 
-              // 1) renumerate vertices in other and insert into maps
+              // 1) re-enumerate vertices in other and insert into maps
               unsigned int counter = coarse_cell_vertices.size();
               for (const auto &p : other.coarse_cell_vertices)
                 if (map_point_to_local_vertex_index.find(p.second) ==
@@ -185,7 +185,7 @@ namespace TriangulationDescription
                   map_old_to_new_local_vertex_index[p.first] =
                     map_point_to_local_vertex_index[p.second];
 
-              // 2) renumerate vertices of cells
+              // 2) re-enumerate vertices of cells
               auto other_coarse_cells_copy = other.coarse_cells;
 
               for (auto &cell : other_coarse_cells_copy)
@@ -283,7 +283,14 @@ namespace TriangulationDescription
                       Assert(a.second.distance(b.second) <=
                                1e-7 *
                                  std::max(a.second.norm(), b.second.norm()),
-                             ExcInternalError());
+                             ExcMessage(
+                               "In the process of merging the vertices of "
+                               "the coarse meshes used on different processes, "
+                               "there were two processes that used the same "
+                               "vertex index for points that are not the same. "
+                               "This suggests that you are using different "
+                               "coarse meshes on different processes. This "
+                               "should not happen."));
                       return true;
                     }
                   return false;

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.