From: bangerth Date: Wed, 26 Jul 2006 23:44:06 +0000 (+0000) Subject: Add safety checks X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=319a716dfdb843ba07ab24514dd087a85ce2dd4e;p=dealii-svn.git Add safety checks git-svn-id: https://svn.dealii.org/trunk@13437 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/dofs/hp_dof_handler.h b/deal.II/deal.II/include/dofs/hp_dof_handler.h index fe1c7afc12..143a78a6c7 100644 --- a/deal.II/deal.II/include/dofs/hp_dof_handler.h +++ b/deal.II/deal.II/include/dofs/hp_dof_handler.h @@ -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