]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Work around one rather obscure case
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 1 Sep 2006 21:55:03 +0000 (21:55 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 1 Sep 2006 21:55:03 +0000 (21:55 +0000)
git-svn-id: https://svn.dealii.org/trunk@13800 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 74b9358d4c7543e352db9326054735b5a8522ebd..0b5eeb6e07012e0132b3e283b318b777fec711b8 100644 (file)
@@ -2585,16 +2585,31 @@ namespace internal
                                                       // it appears as if
                                                       // neither element has
                                                       // any constraints on
-                                                      // its neighbor.
-                                                      //
-                                                      // the only case we know
-                                                      // for sure how to deal
-                                                      // with is if neither
-                                                      // element has any DoFs
-                                                      // on faces at all
-                     Assert (cell->get_fe().dofs_per_face == 0, ExcNotImplemented());
-                     Assert (cell->neighbor(face)->get_fe().dofs_per_face == 0,
-                             ExcNotImplemented());
+                                                      // its neighbor. this
+                                                      // may be because
+                                                      // neither element has
+                                                      // any DoFs on faces at
+                                                      // all. or that the two
+                                                      // elements are
+                                                      // actually the same,
+                                                      // although they happen
+                                                      // to run under
+                                                      // different fe_indices
+                                                      // (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())
+                       {
+                         Assert (cell->get_fe().dofs_per_face == 0,
+                                 ExcNotImplemented());
+                         Assert (cell->neighbor(face)->get_fe().dofs_per_face == 0,
+                                 ExcNotImplemented());
+                       }
                      
                      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.