]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add an assertion. 10585/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 23 Jun 2020 21:14:19 +0000 (15:14 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 23 Jun 2020 21:14:19 +0000 (15:14 -0600)
source/grid/grid_in.cc

index f47c7efe106b68f333fb5b0229e6a1860dc332ed..121f18783f6ae8999517e08e1120c8d6a641cb2d 100644 (file)
@@ -1971,8 +1971,10 @@ GridIn<dim, spacedim>::read_msh(std::istream &in)
                 unsigned int node_index = 0;
                 if (gmsh_file_format < 20)
                   {
-                    for (unsigned int i = 0; i < nod_num; ++i)
-                      in >> node_index;
+                    // For points (cell_type==15), we can only ever
+                    // list one node index.
+                    AssertThrow(nod_num == 1, ExcInternalError());
+                    in >> node_index;
                   }
                 else
                   {

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.