From 67fa6afba5fcb2478cb35530fd8964b9b3639c9a Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 23 Jun 2020 15:14:19 -0600 Subject: [PATCH] Add an assertion. --- source/grid/grid_in.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/grid/grid_in.cc b/source/grid/grid_in.cc index f47c7efe10..121f18783f 100644 --- a/source/grid/grid_in.cc +++ b/source/grid/grid_in.cc @@ -1971,8 +1971,10 @@ GridIn::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 { -- 2.39.5