From 53f9381daf4088664110c7c81f68f0d1596cbcd1 Mon Sep 17 00:00:00 2001 From: bangerth Date: Fri, 28 Jul 2006 15:59:09 +0000 Subject: [PATCH] Simplify code a bit in one place git-svn-id: https://svn.dealii.org/trunk@13470 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/dofs/hp_dof_handler.cc | 47 ++++++++----------- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/deal.II/deal.II/source/dofs/hp_dof_handler.cc b/deal.II/deal.II/source/dofs/hp_dof_handler.cc index 1efe7e9974..51005fb7e5 100644 --- a/deal.II/deal.II/source/dofs/hp_dof_handler.cc +++ b/deal.II/deal.II/source/dofs/hp_dof_handler.cc @@ -30,7 +30,6 @@ #include - namespace internal { namespace hp @@ -99,32 +98,12 @@ namespace internal // newly created entries // make any sense at all for (unsigned int i=0; isize(); ++i) - switch (structdim) - { - case 0: - Assert ((*identities)[i].first < fe1.dofs_per_vertex, - ExcInternalError()); - Assert ((*identities)[i].second < fe2.dofs_per_vertex, - ExcInternalError()); - break; - - case 1: - Assert ((*identities)[i].first < fe1.dofs_per_line, - ExcInternalError()); - Assert ((*identities)[i].second < fe2.dofs_per_line, - ExcInternalError()); - break; - - case 2: - Assert ((*identities)[i].first < fe1.dofs_per_quad, - ExcInternalError()); - Assert ((*identities)[i].second < fe2.dofs_per_quad, - ExcInternalError()); - break; - - default: - Assert (false, ExcNotImplemented()); - } + { + Assert ((*identities)[i].first < fe1.template n_dofs_per_object(), + ExcInternalError()); + Assert ((*identities)[i].second < fe2.template n_dofs_per_object(), + ExcInternalError()); + } } } } @@ -2469,7 +2448,19 @@ namespace hp deal_II_numbers::invalid_unsigned_int); compute_vertex_dof_identities (new_dof_indices); compute_line_dof_identities (new_dof_indices); -// compute_quad_dof_identities (new_dof_indices); + compute_quad_dof_identities (new_dof_indices); + +// if (new_dof_indices.size() - +// std::count (new_dof_indices.begin(), +// new_dof_indices.end(), deal_II_numbers::invalid_unsigned_int) +// != 0) +// std::cout << "ELIMINATING " +// << (new_dof_indices.size() - +// std::count (new_dof_indices.begin(), +// new_dof_indices.end(), deal_II_numbers::invalid_unsigned_int)) +// << " DOFS" +// << std::endl; + // finally restore the user flags const_cast &>(*tria).load_user_flags(user_flags); -- 2.39.5