From d3a5381af386fd1366962c628bbce892ff045cb3 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 23 May 2023 10:37:18 -0600 Subject: [PATCH] Simplify a function declaration. --- include/deal.II/grid/grid_tools.h | 18 +++++++------- source/grid/grid_tools_dof_handlers.cc | 33 +++++++++++++------------- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index 45a1ee3c97..2fb63134e0 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -1460,20 +1460,20 @@ namespace GridTools * for this case. * * @dealiiConceptRequires{ - * concepts::is_triangulation_or_dof_handler>} + * concepts::is_triangulation_or_dof_handler} */ - template class MeshType, int spacedim> - DEAL_II_CXX20_REQUIRES( - (concepts::is_triangulation_or_dof_handler>)) + template + DEAL_II_CXX20_REQUIRES((concepts::is_triangulation_or_dof_handler)) #ifndef _MSC_VER - std::vector::active_cell_iterator> + std::vector #else std::vector< - typename dealii::internal:: - ActiveCellIterator>::type> + typename dealii::internal::ActiveCellIterator::type> #endif - find_cells_adjacent_to_vertex(const MeshType &container, - const unsigned int vertex_index); + find_cells_adjacent_to_vertex(const MeshType & container, + const unsigned int vertex_index); /** * Find an active non-artificial cell that surrounds a given point @p p. The return type diff --git a/source/grid/grid_tools_dof_handlers.cc b/source/grid/grid_tools_dof_handlers.cc index 8ada7e4b1b..ed10afe884 100644 --- a/source/grid/grid_tools_dof_handlers.cc +++ b/source/grid/grid_tools_dof_handlers.cc @@ -189,19 +189,22 @@ namespace GridTools - template class MeshType, int spacedim> - DEAL_II_CXX20_REQUIRES( - (concepts::is_triangulation_or_dof_handler>)) + template + DEAL_II_CXX20_REQUIRES((concepts::is_triangulation_or_dof_handler)) #ifndef _MSC_VER - std::vector::active_cell_iterator> + std::vector #else std::vector< - typename dealii::internal:: - ActiveCellIterator>::type> + typename dealii::internal::ActiveCellIterator::type> #endif - find_cells_adjacent_to_vertex(const MeshType &mesh, - const unsigned int vertex) + find_cells_adjacent_to_vertex(const MeshType & mesh, + const unsigned int vertex) { + const int dim = MeshType::dimension; + const int spacedim = MeshType::space_dimension; + // make sure that the given vertex is // an active vertex of the underlying // triangulation @@ -213,13 +216,12 @@ namespace GridTools // to ensure that cells are inserted only // once std::set>::type> + ActiveCellIterator::type> adjacent_cells; - typename dealii::internal:: - ActiveCellIterator>::type - cell = mesh.begin_active(), - endc = mesh.end(); + typename dealii::internal::ActiveCellIterator::type + cell = mesh.begin_active(), + endc = mesh.end(); // go through all active cells and look if the vertex is part of that cell // @@ -322,9 +324,8 @@ namespace GridTools Assert(adjacent_cells.size() > 0, ExcInternalError()); // return the result as a vector, rather than the set we built above - return std::vector< - typename dealii::internal:: - ActiveCellIterator>::type>( + return std::vector::type>( adjacent_cells.begin(), adjacent_cells.end()); } -- 2.39.5