]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Come up with a better assertion.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 29 Jul 2006 20:06:10 +0000 (20:06 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 29 Jul 2006 20:06:10 +0000 (20:06 +0000)
git-svn-id: https://svn.dealii.org/trunk@13499 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/dofs/dof_accessor.templates.h

index 8b16e784acc8866a1968a2cd900c0c4079d6e62e..19f0d1424048be51e3f0b8cc041d393e32f3262c 100644 (file)
@@ -290,22 +290,21 @@ DoFObjectAccessor<1,DH>::get_dof_indices (std::vector<unsigned int> &dof_indices
          typename BaseClass::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
-                                  // sense on non-active objects if
+                                  // sense if either a) there are
+                                  // degrees of freedom defined on
+                                  // the present object, or b) the
+                                  // object is non-active objects but
                                   // all degrees of freedom are
                                   // located on vertices, since
                                   // otherwise there are degrees of
                                   // freedom on sub-objects which are
                                   // not allocated for this
                                   // non-active thing
-// TODO: This assertion leads to problems with the do_make_hp_hanging_node_constraints
-// method!. Check how this assertion can be stated that it does not create a conflict
-// with the above mentioned method.
-/*
-  Assert (!this->has_children() ||
+  Assert (this->fe_index_is_active (fe_index)
+         ||
          (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
           2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
-         typename BaseClass::ExcNotActive());
-*/
+         ExcInternalError());
          
   const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
                     dofs_per_line   = this->dof_handler->get_fe()[fe_index].dofs_per_line;
@@ -371,23 +370,21 @@ DoFObjectAccessor<2,DH>::get_dof_indices (std::vector<unsigned int> &dof_indices
          typename BaseClass::ExcVectorDoesNotMatch());
 
                                   // this function really only makes
-                                  // sense on non-active objects if
+                                  // sense if either a) there are
+                                  // degrees of freedom defined on
+                                  // the present object, or b) the
+                                  // object is non-active objects but
                                   // all degrees of freedom are
                                   // located on vertices, since
                                   // otherwise there are degrees of
                                   // freedom on sub-objects which are
                                   // not allocated for this
                                   // non-active thing
-
-// TODO: This assertion leads to problems with the do_make_hp_hanging_node_constraints
-// method!. Check how this assertion can be stated that it does not create a conflict
-// with the above mentioned method.
-/*
-  Assert (!this->has_children() ||
+  Assert (this->fe_index_is_active (fe_index)
+         ||
          (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
           4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
-         typename BaseClass::ExcNotActive());
-*/
+         ExcInternalError());
          
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
@@ -476,22 +473,22 @@ DoFObjectAccessor<3,DH>::get_dof_indices (std::vector<unsigned int> &dof_indices
           ExcMessage ("DoFHandler not initialized"));
 
                                   // this function really only makes
-                                  // sense on non-active objects if
+                                  // sense if either a) there are
+                                  // degrees of freedom defined on
+                                  // the present object, or b) the
+                                  // object is non-active objects but
                                   // all degrees of freedom are
                                   // located on vertices, since
                                   // otherwise there are degrees of
                                   // freedom on sub-objects which are
                                   // not allocated for this
                                   // non-active thing
-// TODO: This assertion leads to problems with the do_make_hp_hanging_node_constraints
-// method!. Check how this assertion can be stated that it does not create a conflict
-// with the above mentioned method.
-/*
-  Assert (!this->has_children() ||
+  Assert (this->fe_index_is_active (fe_index)
+         ||
          (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
           8*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
-         typename BaseClass::ExcNotActive());
-*/
+         ExcInternalError());
+
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
   

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.