]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Re-shuffle code to avoid triggering an assertion.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 26 Apr 2012 07:37:56 +0000 (07:37 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 26 Apr 2012 07:37:56 +0000 (07:37 +0000)
git-svn-id: https://svn.dealii.org/trunk@25447 0785d39b-7218-0410-832d-ea1e28bc413d

tests/hp/fe_nothing_02.cc

index f86181b7dbca395a41427842cd73936412a2ccdb..8b4cd82d632a6020eb5ccaa3c361c2fba675a8f7 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2009 by the deal.II authors
+//    Copyright (C) 2009, 2012 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -95,19 +95,20 @@ void test ()
 
   for(; cell !=endc; cell++)
     {
+      deallog << "This is a "
+             << (cell->active_fe_index() == 1 ? "FE_Nothing" : "FE_Q")
+             << " cell"
+             << std::endl;
 
-                                      // attempt to reinit hp_fe_values object
+      if (cell->get_fe().dofs_per_cell == 0)
+       continue;
 
+                                      // attempt to reinit hp_fe_values object
       hp_fe_values.reinit (cell);
 
       const unsigned int   dofs_per_cell = cell->get_fe().dofs_per_cell;
       const FEValues<dim>  &fe_values    = hp_fe_values.get_present_fe_values ();
 
-      deallog << "This is a "
-             << (cell->active_fe_index() == 1 ? "FE_Nothing" : "FE_Q")
-             << " cell"
-             << std::endl;
-
       for (unsigned int q_point=0; q_point<fe_values.n_quadrature_points; ++q_point)
        {
          for (unsigned int i=0; i<dofs_per_cell; ++i)

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.