From 0b1f02d3ebb1e423a27bf8e22b17d888c573fdcc Mon Sep 17 00:00:00 2001 From: bangerth Date: Fri, 1 Sep 2006 21:55:03 +0000 Subject: [PATCH] Work around one rather obscure case git-svn-id: https://svn.dealii.org/trunk@13800 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/dofs/dof_tools.cc | 35 +++++++++++++++++------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/deal.II/deal.II/source/dofs/dof_tools.cc b/deal.II/deal.II/source/dofs/dof_tools.cc index 74b9358d4c..0b5eeb6e07 100644 --- a/deal.II/deal.II/source/dofs/dof_tools.cc +++ b/deal.II/deal.II/source/dofs/dof_tools.cc @@ -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; } -- 2.39.5