From: bangerth Date: Wed, 27 Jun 2007 18:08:36 +0000 (+0000) Subject: Fix the cause for a bunch of regressions. Ouch, bad testing... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6e2853fef7ef62cf6a890edc88dbefa2fc4bdc7;p=dealii-svn.git Fix the cause for a bunch of regressions. Ouch, bad testing... git-svn-id: https://svn.dealii.org/trunk@14819 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/dofs/dof_handler.h b/deal.II/deal.II/include/dofs/dof_handler.h index d8480ceb1c..6cf0ba08e9 100644 --- a/deal.II/deal.II/include/dofs/dof_handler.h +++ b/deal.II/deal.II/include/dofs/dof_handler.h @@ -1429,10 +1429,32 @@ unsigned int DoFHandler::n_active_fe_indices (const unsigned int obj_level, const unsigned int obj_index) const { - Assert (raw_cell_iterator (tria, - obj_level, - obj_index, - this)->used() == true, + // check that the object we look at is in + // fact active. the problem is that we have + // templatized on the dimensionality of the + // object, so it may be a cell, a face, or + // a line. we have a bit of trouble doing + // this all in the generic case, so only + // check if it is either a cell or a + // line. the only case this leaves out is + // faces in 3d -- let's hope that this + // never is a problem + Assert ((dim==structdim + ? + raw_cell_iterator (tria, + obj_level, + obj_index, + this)->used() + : + (structdim==1 + ? + raw_line_iterator (tria, + obj_level, + obj_index, + this)->used() + : + true)) + == true, ExcMessage ("This cell is not active and therefore can't be " "queried for the number of active FE indices")); return 1; @@ -1448,10 +1470,32 @@ DoFHandler::nth_active_fe_index (const unsigned int obj_level, const unsigned int obj_index, const unsigned int n) const { - Assert (raw_cell_iterator (tria, - obj_level, - obj_index, - this)->used() == true, + // check that the object we look at is in + // fact active. the problem is that we have + // templatized on the dimensionality of the + // object, so it may be a cell, a face, or + // a line. we have a bit of trouble doing + // this all in the generic case, so only + // check if it is either a cell or a + // line. the only case this leaves out is + // faces in 3d -- let's hope that this + // never is a problem + Assert ((dim==structdim + ? + raw_cell_iterator (tria, + obj_level, + obj_index, + this)->used() + : + (structdim==1 + ? + raw_line_iterator (tria, + obj_level, + obj_index, + this)->used() + : + true)) + == true, ExcMessage ("This cell is not active and therefore can't be " "queried for its active FE indices")); Assert (n == 0, ExcIndexRange (n, 0, 1));