From 44777dd93686b03835cd933a618bb40560099f99 Mon Sep 17 00:00:00 2001 From: bangerth Date: Sat, 24 Feb 2007 14:58:32 +0000 Subject: [PATCH] Fix another corner case git-svn-id: https://svn.dealii.org/trunk@14501 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/dofs/dof_tools.cc | 63 ++++++++++++++++++++---- 1 file changed, 53 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 7c27d5261d..e28c408c6d 100644 --- a/deal.II/deal.II/source/dofs/dof_tools.cc +++ b/deal.II/deal.II/source/dofs/dof_tools.cc @@ -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; iget_fe().dofs_per_face; ++i) + Assert (master_dofs[i] == slave_dofs[i], + ExcInternalError()); } break; -- 2.39.5