]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Check whether a finite element is attached before returning it.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 3 Sep 2006 04:59:38 +0000 (04:59 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 3 Sep 2006 04:59:38 +0000 (04:59 +0000)
git-svn-id: https://svn.dealii.org/trunk@13815 0785d39b-7218-0410-832d-ea1e28bc413d

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

index d4b3315b6202cb6aae045c13a165405263402882..c49c8e165f165f9bf63d420606cea416626bad97 100644 (file)
@@ -1412,6 +1412,9 @@ namespace hp
   unsigned int
   DoFHandler<dim>::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<dim> &
   DoFHandler<dim>::get_fe () const
   {
+    Assert (finite_elements != 0,
+           ExcMessage ("No finite element collection is associated with "
+                       "this DoFHandler"));
     return *finite_elements;
   }
 

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.