]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add safety checks
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 26 Jul 2006 23:44:06 +0000 (23:44 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 26 Jul 2006 23:44:06 +0000 (23:44 +0000)
git-svn-id: https://svn.dealii.org/trunk@13437 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/dofs/hp_dof_handler.h

index fe1c7afc12cdb97f6f1dde1303391cd17611bb51..143a78a6c7fbf75eb24f9820c17630f6b550d3ee 100644 (file)
@@ -1332,7 +1332,10 @@ namespace hp
                          (*finite_elements)[fe_index].dofs_per_vertex));
     Assert (vertex_index < vertex_dofs_offsets.size(),
            ExcIndexRange (vertex_index, 0, vertex_dofs_offsets.size()));
-    
+    Assert (vertex_dofs_offsets[vertex_index] !=
+           deal_II_numbers::invalid_unsigned_int,
+           ExcMessage ("This vertex is unused and has no DoFs associated with it"));
+
                                     // hop along the list of index
                                     // sets until we find the one
                                     // with the correct fe_index, and
@@ -1382,6 +1385,9 @@ namespace hp
                          (*finite_elements)[fe_index].dofs_per_vertex));
     Assert (fe_index < finite_elements->size(),
            ExcInternalError());
+    Assert (vertex_dofs_offsets[vertex_index] !=
+           deal_II_numbers::invalid_unsigned_int,
+           ExcMessage ("This vertex is unused and has no DoFs associated with it"));
 
                                     // hop along the list of index
                                     // sets until we find the one

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.