From f0899d33646518f7e8eb9ef7ce1c9a9bf2f24b39 Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 14 Oct 2017 22:06:04 -0400 Subject: [PATCH] Deprecate DoFTools::extract_locally_owned_dofs. All that this function does is return a copy of dof_handler.locally_owned_dofs(): we should just use that function directly. --- include/deal.II/dofs/dof_tools.h | 14 +++++++++----- source/dofs/dof_tools_constraints.cc | 8 ++++---- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/include/deal.II/dofs/dof_tools.h b/include/deal.II/dofs/dof_tools.h index 82c9130e35..426ba43b42 100644 --- a/include/deal.II/dofs/dof_tools.h +++ b/include/deal.II/dofs/dof_tools.h @@ -1554,11 +1554,14 @@ namespace DoFTools * processor. For regular DoFHandler objects, this set is the complete set * with all DoF indices. In either case, it equals what * DoFHandler::locally_owned_dofs() returns. + * + * @deprecated Use DoFHandler::locally_owned_dofs() directly instead of this + * function. */ template void extract_locally_owned_dofs (const DoFHandlerType &dof_handler, - IndexSet &dof_set); + IndexSet &dof_set) DEAL_II_DEPRECATED; /** @@ -1742,10 +1745,11 @@ namespace DoFTools * processor. Note that this includes the ones that this subdomain "owns" * (i.e. the ones for which get_subdomain_association() returns a value * equal to the subdomain given here and that are selected by the - * extract_locally_owned_dofs() function) but also all of those that sit on - * the boundary between the given subdomain and other subdomain. In essence, - * degrees of freedom that sit on boundaries between subdomain will be in - * the index sets returned by this function for more than one subdomain. + * DoFHandler::locally_owned_dofs() function) but also all of those that sit + * on the boundary between the given subdomain and other subdomain. In + * essence, degrees of freedom that sit on boundaries between subdomain will + * be in the index sets returned by this function for more than one + * subdomain. * * Note that this function is of questionable use for DoFHandler objects * built on parallel::distributed::Triangulation since in that case diff --git a/source/dofs/dof_tools_constraints.cc b/source/dofs/dof_tools_constraints.cc index 93d2cd5d7c..00718d0672 100644 --- a/source/dofs/dof_tools_constraints.cc +++ b/source/dofs/dof_tools_constraints.cc @@ -2699,14 +2699,14 @@ namespace DoFTools // Nothing bad happened: the user used serial Triangulation } - IndexSet locally_owned_dofs, locally_relevant_dofs; - DoFTools::extract_locally_owned_dofs - (coarse_to_fine_grid_map.get_destination_grid (), locally_owned_dofs); + + IndexSet locally_relevant_dofs; DoFTools::extract_locally_relevant_dofs (coarse_to_fine_grid_map.get_destination_grid (), locally_relevant_dofs); copy_data.global_parameter_representation[i].reinit - (locally_owned_dofs, locally_relevant_dofs, communicator); + (coarse_to_fine_grid_map.get_destination_grid().locally_owned_dofs(), + locally_relevant_dofs, communicator); #else const types::global_dof_index n_fine_dofs = weight_mapping.size(); copy_data.global_parameter_representation[i].reinit (n_fine_dofs); -- 2.39.5