From: Wolfgang Bangerth Date: Thu, 17 Nov 2016 03:58:15 +0000 (-0700) Subject: Repeat the previous patch for the hp::DoFHandler. X-Git-Tag: v8.5.0-rc1~367^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b50dd0b3f5bf3d8f14c52ad0f26dbdb37aed786;p=dealii.git Repeat the previous patch for the hp::DoFHandler. --- diff --git a/include/deal.II/hp/dof_handler.h b/include/deal.II/hp/dof_handler.h index c4ffd504bf..4b1b1fffd9 100644 --- a/include/deal.II/hp/dof_handler.h +++ b/include/deal.II/hp/dof_handler.h @@ -906,6 +906,25 @@ namespace hp /* ----------------------- Inline functions ---------------------------------- */ + + template + template + types::global_dof_index + DoFHandler::n_boundary_dofs (const std::map*> &boundary_ids) const + { + // extract the set of boundary ids and forget about the function object pointers + std::set boundary_ids_only; + for (typename std::map*>::const_iterator + p = boundary_ids.begin(); + p != boundary_ids.end(); ++p) + boundary_ids_only.insert (p->first); + + // then just hand everything over to the other function that does the work + return n_boundary_dofs(boundary_ids_only); + } + + + template template void DoFHandler::save(Archive &ar, unsigned int) const diff --git a/source/hp/dof_handler.cc b/source/hp/dof_handler.cc index 097e0ec4bb..c0bcf19470 100644 --- a/source/hp/dof_handler.cc +++ b/source/hp/dof_handler.cc @@ -1994,43 +1994,6 @@ namespace hp - template - template - types::global_dof_index - DoFHandler::n_boundary_dofs (const std::map*> &boundary_ids) const - { - Assert (finite_elements != 0, ExcNoFESelected()); - Assert (boundary_ids.find(numbers::internal_face_boundary_id) == boundary_ids.end(), - ExcInvalidBoundaryIndicator()); - - // same as above, but with - // additional checks for set of - // boundary indicators - std::set boundary_dofs; - std::vector dofs_on_face; - dofs_on_face.reserve (this->get_fe ().max_dofs_per_face()); - - typename HpDoFHandler::active_cell_iterator cell = this->begin_active (), - endc = this->end(); - for (; cell!=endc; ++cell) - for (unsigned int f=0; f::faces_per_cell; ++f) - if (cell->at_boundary(f) && - (boundary_ids.find(cell->face(f)->boundary_id()) != - boundary_ids.end())) - { - const unsigned int dofs_per_face = cell->get_fe().dofs_per_face; - dofs_on_face.resize (dofs_per_face); - - cell->face(f)->get_dof_indices (dofs_on_face, - cell->active_fe_index()); - for (unsigned int i=0; i types::global_dof_index DoFHandler::n_boundary_dofs (const std::set &boundary_ids) const diff --git a/source/hp/dof_handler.inst.in b/source/hp/dof_handler.inst.in index eac399e75d..97578352e9 100644 --- a/source/hp/dof_handler.inst.in +++ b/source/hp/dof_handler.inst.in @@ -13,38 +13,6 @@ // // --------------------------------------------------------------------- -for (scalar: REAL_SCALARS; deal_II_dimension : DIMENSIONS) -{ - namespace hp - \{ - template types::global_dof_index DoFHandler::n_boundary_dofs (const std::map*> &boundary_ids) const; - -#if deal_II_dimension < 3 - template types::global_dof_index DoFHandler::n_boundary_dofs (const std::map*> &boundary_ids) const; -#endif - -#if deal_II_dimension == 1 - template types::global_dof_index DoFHandler::n_boundary_dofs (const std::map*> &boundary_ids) const; -#endif - \} -} - -for (scalar: COMPLEX_SCALARS; deal_II_dimension : DIMENSIONS) -{ - namespace hp - \{ - template types::global_dof_index DoFHandler::n_boundary_dofs (const std::map*> &boundary_ids) const; - -#if deal_II_dimension < 3 - template types::global_dof_index DoFHandler::n_boundary_dofs (const std::map*> &boundary_ids) const; -#endif - -#if deal_II_dimension == 1 - template types::global_dof_index DoFHandler::n_boundary_dofs (const std::map*> &boundary_ids) const; -#endif - \} -} - for (deal_II_dimension : DIMENSIONS) {