]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix another corner case
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 24 Feb 2007 14:58:32 +0000 (14:58 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 24 Feb 2007 14:58:32 +0000 (14:58 +0000)
git-svn-id: https://svn.dealii.org/trunk@14501 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/dofs/dof_tools.cc

index 7c27d5261d927ff73c545b5d1abeac4d79ce3e91..e28c408c6dc7c588dd51a0b976ae874939db5c35 100644 (file)
@@ -964,7 +964,9 @@ namespace internal
                ExcInternalError());
        Assert (fe2.dofs_per_line <= fe1.dofs_per_line,
                ExcInternalError());
-       Assert (fe2.dofs_per_quad <= fe1.dofs_per_quad,
+       Assert ((dim < 3)
+               ||
+               (fe2.dofs_per_quad <= fe1.dofs_per_quad),
                ExcInternalError());
 
                                         // the idea here is to designate as
@@ -2486,17 +2488,58 @@ namespace internal
                                                       // (this is what
                                                       // happens in
                                                       // hp/hp_hanging_nodes_01
-                                                      // for example); check
-                                                      // the latter somewhat
-                                                      // crudely by comparing
-                                                      // fe names
-                     if (cell->get_fe().get_name() !=
-                         cell->neighbor(face)->get_fe().get_name())
+                                                      // for example).
+                                                      //
+                                                      // another possibility
+                                                      // is what happens in
+                                                      // crash_13. there, we
+                                                      // have
+                                                      // FESystem(FE_Q(1),FE_DGQ(0))
+                                                      // vs. FESystem(FE_Q(1),FE_DGQ(1)).
+                                                      // neither of them
+                                                      // dominates the
+                                                      // other. the point is
+                                                      // that it doesn't
+                                                      // matter, since
+                                                      // hopefully for this
+                                                      // case, both sides'
+                                                      // dofs should have
+                                                      // been unified.
+                                                      //
+                                                      // make sure this is
+                                                      // actually true. this
+                                                      // actually only
+                                                      // matters, of course,
+                                                      // if either of the two
+                                                      // finite elements
+                                                      // actually do have
+                                                      // dofs on the face
+                     if ((cell->get_fe().dofs_per_face != 0)
+                         ||
+                         (cell->neighbor(face)->get_fe().dofs_per_face != 0))
                        {
-                         Assert (cell->get_fe().dofs_per_face == 0,
-                                 ExcNotImplemented());
-                         Assert (cell->neighbor(face)->get_fe().dofs_per_face == 0,
+                         Assert (cell->get_fe().dofs_per_face
+                                 ==
+                                 cell->neighbor(face)->get_fe().dofs_per_face,
                                  ExcNotImplemented());
+
+                                                          // (ab)use the master
+                                                          // and slave dofs
+                                                          // arrays for a
+                                                          // moment here
+                         master_dofs.resize (cell->get_fe().dofs_per_face);
+                         cell->face(face)
+                           ->get_dof_indices (master_dofs,
+                                              cell->active_fe_index ());
+
+                         slave_dofs.resize (cell->neighbor(face)->get_fe().dofs_per_face);
+                         cell->face(face)
+                           ->get_dof_indices (slave_dofs,
+                                              cell->neighbor(face)->active_fe_index ());
+
+                         for (unsigned int i=0; i<cell->get_fe().dofs_per_face; ++i)
+                           Assert (master_dofs[i] == slave_dofs[i],
+                                   ExcInternalError());
                        }
                      
                      break;

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.