From: bangerth Date: Sun, 3 Sep 2006 04:59:38 +0000 (+0000) Subject: Check whether a finite element is attached before returning it. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6369899b4d3fe0b265f79fd38a4a7597243f84a;p=dealii-svn.git Check whether a finite element is attached before returning it. git-svn-id: https://svn.dealii.org/trunk@13815 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 d4b3315b62..c49c8e165f 100644 --- a/deal.II/deal.II/include/dofs/hp_dof_handler.h +++ b/deal.II/deal.II/include/dofs/hp_dof_handler.h @@ -1412,6 +1412,9 @@ namespace hp unsigned int DoFHandler::n_dofs () const { + Assert (finite_elements != 0, + ExcMessage ("No finite element collection is associated with " + "this DoFHandler")); return used_dofs; } @@ -1422,6 +1425,9 @@ namespace hp const hp::FECollection & DoFHandler::get_fe () const { + Assert (finite_elements != 0, + ExcMessage ("No finite element collection is associated with " + "this DoFHandler")); return *finite_elements; }