From b1bbdade400346b2f4a32cc81bf99afb1c81ec5f Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Fri, 26 Jun 2020 09:22:14 +0200 Subject: [PATCH] Remove DoFHandlerType from numerics/vector_tools --- .../deal.II/numerics/vector_tools_boundary.h | 80 +++++-------- .../vector_tools_boundary.templates.h | 109 +++++++----------- .../numerics/vector_tools_constraints.h | 42 +++---- .../vector_tools_constraints.templates.h | 52 ++++----- ...tor_tools_integrate_difference.templates.h | 16 +-- .../numerics/vector_tools_interpolate.h | 52 +++------ .../vector_tools_interpolate.templates.h | 87 ++++++-------- .../numerics/vector_tools_project.templates.h | 15 +-- source/numerics/vector_tools_boundary.inst.in | 18 ++- .../numerics/vector_tools_constraints.inst.in | 3 +- .../numerics/vector_tools_interpolate.inst.in | 3 +- 11 files changed, 186 insertions(+), 291 deletions(-) diff --git a/include/deal.II/numerics/vector_tools_boundary.h b/include/deal.II/numerics/vector_tools_boundary.h index adf98a3109..271632d42e 100644 --- a/include/deal.II/numerics/vector_tools_boundary.h +++ b/include/deal.II/numerics/vector_tools_boundary.h @@ -19,6 +19,8 @@ #include +#include + #include #include @@ -94,14 +96,11 @@ namespace VectorTools * * See the general documentation of this namespace for more information. */ - template class DoFHandlerType, - typename number> + template void interpolate_boundary_values( - const Mapping & mapping, - const DoFHandlerType &dof, + const Mapping & mapping, + const DoFHandler &dof, const std::map *> & function_map, std::map &boundary_values, @@ -130,14 +129,11 @@ namespace VectorTools * @see * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators" */ - template class DoFHandlerType, - typename number> + template void interpolate_boundary_values( const Mapping & mapping, - const DoFHandlerType & dof, + const DoFHandler & dof, const types::boundary_id boundary_component, const Function & boundary_function, std::map &boundary_values, @@ -152,13 +148,10 @@ namespace VectorTools * @see * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators" */ - template class DoFHandlerType, - typename number> + template void interpolate_boundary_values( - const DoFHandlerType & dof, + const DoFHandler & dof, const types::boundary_id boundary_component, const Function & boundary_function, std::map &boundary_values, @@ -171,13 +164,10 @@ namespace VectorTools * apply as for the previous function, in particular about the use of the * component mask and the requires size of the function object. */ - template class DoFHandlerType, - typename number> + template void interpolate_boundary_values( - const DoFHandlerType &dof, + const DoFHandler &dof, const std::map *> & function_map, std::map &boundary_values, @@ -245,14 +235,11 @@ namespace VectorTools * * @ingroup constraints */ - template class DoFHandlerType, - typename number> + template void interpolate_boundary_values( - const Mapping & mapping, - const DoFHandlerType &dof, + const Mapping & mapping, + const DoFHandler &dof, const std::map *> & function_map, AffineConstraints &constraints, @@ -269,18 +256,15 @@ namespace VectorTools * @see * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators" */ - template class DoFHandlerType, - typename number> + template void interpolate_boundary_values( - const Mapping & mapping, - const DoFHandlerType &dof, - const types::boundary_id boundary_component, - const Function & boundary_function, - AffineConstraints & constraints, - const ComponentMask & component_mask = ComponentMask()); + const Mapping & mapping, + const DoFHandler & dof, + const types::boundary_id boundary_component, + const Function &boundary_function, + AffineConstraints & constraints, + const ComponentMask & component_mask = ComponentMask()); /** * Call the other interpolate_boundary_values() function, see above, with @@ -293,17 +277,14 @@ namespace VectorTools * @see * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators" */ - template class DoFHandlerType, - typename number> + template void interpolate_boundary_values( - const DoFHandlerType &dof, - const types::boundary_id boundary_component, - const Function & boundary_function, - AffineConstraints & constraints, - const ComponentMask & component_mask = ComponentMask()); + const DoFHandler & dof, + const types::boundary_id boundary_component, + const Function &boundary_function, + AffineConstraints & constraints, + const ComponentMask & component_mask = ComponentMask()); /** @@ -314,13 +295,10 @@ namespace VectorTools * * @ingroup constraints */ - template class DoFHandlerType, - typename number> + template void interpolate_boundary_values( - const DoFHandlerType &dof, + const DoFHandler &dof, const std::map *> & function_map, AffineConstraints &constraints, diff --git a/include/deal.II/numerics/vector_tools_boundary.templates.h b/include/deal.II/numerics/vector_tools_boundary.templates.h index 7c471864d9..4566f8ebb6 100644 --- a/include/deal.II/numerics/vector_tools_boundary.templates.h +++ b/include/deal.II/numerics/vector_tools_boundary.templates.h @@ -52,12 +52,11 @@ namespace VectorTools template class DoFHandlerType, template class M_or_MC> static inline void do_interpolate_boundary_values( - const M_or_MC & mapping, - const DoFHandlerType &dof, + const M_or_MC & mapping, + const DoFHandler &dof, const std::map *> & function_map, std::map &boundary_values, @@ -219,10 +218,7 @@ namespace VectorTools q_collection, update_quadrature_points); - typename DoFHandlerType::active_cell_iterator - cell = dof.begin_active(), - endc = dof.end(); - for (; cell != endc; ++cell) + for (auto const &cell : dof.active_cell_iterators()) if (!cell->is_artificial()) for (const unsigned int face_no : GeometryInfo::face_indices()) @@ -256,8 +252,8 @@ namespace VectorTools "use for non-primitive finite elements.")); } - const typename DoFHandlerType::face_iterator - face = cell->face(face_no); + const typename DoFHandler::face_iterator face = + cell->face(face_no); const types::boundary_id boundary_component = face->boundary_id(); @@ -380,14 +376,11 @@ namespace VectorTools - template class DoFHandlerType, - typename number> + template void interpolate_boundary_values( - const Mapping & mapping, - const DoFHandlerType &dof, + const Mapping & mapping, + const DoFHandler &dof, const std::map *> & function_map, std::map &boundary_values, @@ -399,14 +392,11 @@ namespace VectorTools - template class DoFHandlerType, - typename number> + template void interpolate_boundary_values( const Mapping & mapping, - const DoFHandlerType & dof, + const DoFHandler & dof, const types::boundary_id boundary_component, const Function & boundary_function, std::map &boundary_values, @@ -436,13 +426,10 @@ namespace VectorTools - template class DoFHandlerType, - typename number> + template void interpolate_boundary_values( - const DoFHandlerType & dof, + const DoFHandler & dof, const types::boundary_id boundary_component, const Function & boundary_function, std::map &boundary_values, @@ -458,13 +445,10 @@ namespace VectorTools - template class DoFHandlerType, - typename number> + template void interpolate_boundary_values( - const DoFHandlerType &dof, + const DoFHandler &dof, const std::map *> & function_map, std::map &boundary_values, @@ -484,14 +468,11 @@ namespace VectorTools - template class DoFHandlerType, - typename number> + template void interpolate_boundary_values( - const Mapping & mapping, - const DoFHandlerType &dof, + const Mapping & mapping, + const DoFHandler &dof, const std::map *> & function_map, AffineConstraints &constraints, @@ -516,18 +497,15 @@ namespace VectorTools - template class DoFHandlerType, - typename number> + template void interpolate_boundary_values( - const Mapping & mapping, - const DoFHandlerType &dof, - const types::boundary_id boundary_component, - const Function & boundary_function, - AffineConstraints & constraints, - const ComponentMask & component_mask) + const Mapping & mapping, + const DoFHandler & dof, + const types::boundary_id boundary_component, + const Function &boundary_function, + AffineConstraints & constraints, + const ComponentMask & component_mask) { std::map *> function_map; @@ -538,17 +516,14 @@ namespace VectorTools - template class DoFHandlerType, - typename number> + template void interpolate_boundary_values( - const DoFHandlerType &dof, - const types::boundary_id boundary_component, - const Function & boundary_function, - AffineConstraints & constraints, - const ComponentMask & component_mask) + const DoFHandler & dof, + const types::boundary_id boundary_component, + const Function &boundary_function, + AffineConstraints & constraints, + const ComponentMask & component_mask) { interpolate_boundary_values(StaticMappingQ1::mapping, dof, @@ -560,13 +535,10 @@ namespace VectorTools - template class DoFHandlerType, - typename number> + template void interpolate_boundary_values( - const DoFHandlerType &dof, + const DoFHandler &dof, const std::map *> & function_map, AffineConstraints &constraints, @@ -641,14 +613,13 @@ namespace VectorTools template class DoFHandlerType, template class M_or_MC, template class Q_or_QC, typename number> void do_project_boundary_values( - const M_or_MC & mapping, - const DoFHandlerType &dof, + const M_or_MC & mapping, + const DoFHandler &dof, const std::map *> & boundary_functions, const Q_or_QC & q, @@ -2853,10 +2824,10 @@ namespace VectorTools } } - template + template void compute_project_boundary_values_curl_conforming_l2( - const DoFHandlerType & dof_handler, + const DoFHandler & dof_handler, const unsigned int first_vector_component, const Function & boundary_function, const types::boundary_id boundary_component, @@ -2914,10 +2885,10 @@ namespace VectorTools update_JxW_values); // Storage for dof values found and whether they have been processed: - std::vector dofs_processed; - std::vector dof_values; - std::vector face_dof_indices; - typename DoFHandlerType::active_cell_iterator cell = + std::vector dofs_processed; + std::vector dof_values; + std::vector face_dof_indices; + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); switch (dim) diff --git a/include/deal.II/numerics/vector_tools_constraints.h b/include/deal.II/numerics/vector_tools_constraints.h index d2a6dcf669..e1daae474e 100644 --- a/include/deal.II/numerics/vector_tools_constraints.h +++ b/include/deal.II/numerics/vector_tools_constraints.h @@ -19,6 +19,8 @@ #include +#include + #include #include @@ -268,12 +270,12 @@ namespace VectorTools * @see * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators" */ - template class DoFHandlerType> + template void compute_nonzero_normal_flux_constraints( - const DoFHandlerType &dof_handler, - const unsigned int first_vector_component, - const std::set & boundary_ids, + const DoFHandler & dof_handler, + const unsigned int first_vector_component, + const std::set &boundary_ids, const std::map *> & function_map, AffineConstraints & constraints, @@ -292,14 +294,14 @@ namespace VectorTools * @see * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators" */ - template class DoFHandlerType> + template void compute_no_normal_flux_constraints( - const DoFHandlerType &dof_handler, - const unsigned int first_vector_component, - const std::set & boundary_ids, - AffineConstraints & constraints, - const Mapping & mapping = + const DoFHandler & dof_handler, + const unsigned int first_vector_component, + const std::set &boundary_ids, + AffineConstraints & constraints, + const Mapping & mapping = StaticMappingQ1::mapping); /** @@ -318,12 +320,12 @@ namespace VectorTools * @see * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators" */ - template class DoFHandlerType> + template void compute_nonzero_tangential_flux_constraints( - const DoFHandlerType &dof_handler, - const unsigned int first_vector_component, - const std::set & boundary_ids, + const DoFHandler & dof_handler, + const unsigned int first_vector_component, + const std::set &boundary_ids, const std::map *> & function_map, AffineConstraints & constraints, @@ -338,14 +340,14 @@ namespace VectorTools * @see * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators" */ - template class DoFHandlerType> + template void compute_normal_flux_constraints( - const DoFHandlerType &dof_handler, - const unsigned int first_vector_component, - const std::set & boundary_ids, - AffineConstraints & constraints, - const Mapping & mapping = + const DoFHandler & dof_handler, + const unsigned int first_vector_component, + const std::set &boundary_ids, + AffineConstraints & constraints, + const Mapping & mapping = StaticMappingQ1::mapping); //@} diff --git a/include/deal.II/numerics/vector_tools_constraints.templates.h b/include/deal.II/numerics/vector_tools_constraints.templates.h index 8fcc6c45f9..58d9526b8d 100644 --- a/include/deal.II/numerics/vector_tools_constraints.templates.h +++ b/include/deal.II/numerics/vector_tools_constraints.templates.h @@ -464,12 +464,12 @@ namespace VectorTools } // namespace internal - template class DoFHandlerType> + template void compute_nonzero_normal_flux_constraints( - const DoFHandlerType &dof_handler, - const unsigned int first_vector_component, - const std::set & boundary_ids, + const DoFHandler & dof_handler, + const unsigned int first_vector_component, + const std::set &boundary_ids, const std::map *> & function_map, AffineConstraints & constraints, @@ -527,14 +527,14 @@ namespace VectorTools using DoFToNormalsMap = std::multimap< internal::VectorDoFTuple, std::pair, - typename DoFHandlerType::active_cell_iterator>>; + typename DoFHandler::active_cell_iterator>>; std::map, Vector> dof_vector_to_b_values; DoFToNormalsMap dof_to_normals_map; // now loop over all cells and all faces - typename DoFHandlerType::active_cell_iterator + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); std::set::iterator b_id; @@ -545,7 +545,7 @@ namespace VectorTools boundary_ids.end()) { const FiniteElement &fe = cell->get_fe(); - typename DoFHandlerType::face_iterator face = + typename DoFHandler::face_iterator face = cell->face(face_no); // get the indices of the dofs on this cell... @@ -709,7 +709,7 @@ namespace VectorTools // vectors. the values of the map are pairs of normal vectors and // number of cells that have contributed using CellToNormalsMap = - std::map::active_cell_iterator, + std::map::active_cell_iterator, std::pair, unsigned int>>; CellToNormalsMap cell_to_normals_map; @@ -886,7 +886,7 @@ namespace VectorTools // natural) because std::set requires that the stored elements // are comparable with operator< using CellContributions = std::map< - typename DoFHandlerType::active_cell_iterator, + typename DoFHandler::active_cell_iterator, std::list>>; CellContributions cell_contributions; @@ -1050,12 +1050,12 @@ namespace VectorTools }; } // namespace internal - template class DoFHandlerType> + template void compute_nonzero_tangential_flux_constraints( - const DoFHandlerType &dof_handler, - const unsigned int first_vector_component, - const std::set & boundary_ids, + const DoFHandler & dof_handler, + const unsigned int first_vector_component, + const std::set &boundary_ids, const std::map *> & function_map, AffineConstraints & constraints, @@ -1119,7 +1119,7 @@ namespace VectorTools boundary_ids.end()) { const FiniteElement &fe = cell->get_fe(); - typename DoFHandlerType::face_iterator face = + typename DoFHandler::face_iterator face = cell->face(face_no); // get the indices of the dofs on this cell... @@ -1258,14 +1258,14 @@ namespace VectorTools } - template class DoFHandlerType> + template void compute_no_normal_flux_constraints( - const DoFHandlerType &dof_handler, - const unsigned int first_vector_component, - const std::set & boundary_ids, - AffineConstraints & constraints, - const Mapping & mapping) + const DoFHandler & dof_handler, + const unsigned int first_vector_component, + const std::set &boundary_ids, + AffineConstraints & constraints, + const Mapping & mapping) { Functions::ZeroFunction zero_function(dim); std::map *> function_map; @@ -1279,14 +1279,14 @@ namespace VectorTools mapping); } - template class DoFHandlerType> + template void compute_normal_flux_constraints( - const DoFHandlerType &dof_handler, - const unsigned int first_vector_component, - const std::set & boundary_ids, - AffineConstraints & constraints, - const Mapping & mapping) + const DoFHandler & dof_handler, + const unsigned int first_vector_component, + const std::set &boundary_ids, + AffineConstraints & constraints, + const Mapping & mapping) { Functions::ZeroFunction zero_function(dim); std::map *> function_map; diff --git a/include/deal.II/numerics/vector_tools_integrate_difference.templates.h b/include/deal.II/numerics/vector_tools_integrate_difference.templates.h index 379e292f5a..4e77bd2fce 100644 --- a/include/deal.II/numerics/vector_tools_integrate_difference.templates.h +++ b/include/deal.II/numerics/vector_tools_integrate_difference.templates.h @@ -796,15 +796,11 @@ namespace VectorTools - template + template static void do_integrate_difference( const dealii::hp::MappingCollection & mapping, - const DoFHandlerType & dof, + const DoFHandler & dof, const InVector & fe_function, const Function &exact_solution, OutVector & difference, @@ -917,16 +913,12 @@ namespace VectorTools difference(cell->active_cell_index()) = 0; } - template + template DEAL_II_DEPRECATED static typename std::enable_if< !std::is_same::value>::type do_integrate_difference( const dealii::hp::MappingCollection &mapping, - const DoFHandlerType & dof, + const DoFHandler & dof, const InVector & fe_function, const Function & exact_solution, OutVector & difference, diff --git a/include/deal.II/numerics/vector_tools_interpolate.h b/include/deal.II/numerics/vector_tools_interpolate.h index bf5a707c1b..880f51a8cd 100644 --- a/include/deal.II/numerics/vector_tools_interpolate.h +++ b/include/deal.II/numerics/vector_tools_interpolate.h @@ -55,9 +55,6 @@ namespace VectorTools * with the hanging nodes from space @p dof afterwards, to make the result * continuous again. * - * The template argument DoFHandlerType may either be of type - * DoFHandler or hp::DoFHandler. - * * See the general documentation of this namespace for further information. * * @todo The @p mapping argument should be replaced by a @@ -156,14 +153,11 @@ namespace VectorTools * between cells), then each subsequent call will rewrite the intercell @p * dofs of the previous one. */ - template class DoFHandlerType> + template void interpolate_based_on_material_id( - const Mapping & mapping, - const DoFHandlerType &dof_handler, + const Mapping & mapping, + const DoFHandler &dof_handler, const std::map *> & function_map, @@ -194,15 +188,12 @@ namespace VectorTools * parallel::distributed::Triangulation::no_automatic_repartitioning * flag). */ - template class DoFHandlerType> + template void - interpolate_to_different_mesh(const DoFHandlerType &dof1, - const VectorType & u1, - const DoFHandlerType &dof2, - VectorType & u2); + interpolate_to_different_mesh(const DoFHandler &dof1, + const VectorType & u1, + const DoFHandler &dof2, + VectorType & u2); /** * Compute the interpolation of a @p dof1-function @p u1 to a @p dof2-function @@ -217,15 +208,12 @@ namespace VectorTools * Without it - due to cellwise interpolation - the resulting output vector * does not necessarily respect continuity requirements at hanging nodes. */ - template class DoFHandlerType> + template void interpolate_to_different_mesh( - const DoFHandlerType & dof1, + const DoFHandler & dof1, const VectorType & u1, - const DoFHandlerType & dof2, + const DoFHandler & dof2, const AffineConstraints &constraints, VectorType & u2); @@ -236,13 +224,10 @@ namespace VectorTools * @p intergridmap has to be initialized via InterGridMap::make_mapping * pointing from a source DoFHandler to a destination DoFHandler. */ - template class DoFHandlerType> + template void interpolate_to_different_mesh( - const InterGridMap> & intergridmap, + const InterGridMap> & intergridmap, const VectorType & u1, const AffineConstraints &constraints, VectorType & u2); @@ -277,14 +262,11 @@ namespace VectorTools * This function is only implemented for FiniteElements where the specified * components are primitive. */ - template class DoFHandlerType, - typename VectorType> + template void - get_position_vector(const DoFHandlerType &dh, - VectorType & vector, - const ComponentMask &mask = ComponentMask()); + get_position_vector(const DoFHandler &dh, + VectorType & vector, + const ComponentMask & mask = ComponentMask()); //@} } // namespace VectorTools diff --git a/include/deal.II/numerics/vector_tools_interpolate.templates.h b/include/deal.II/numerics/vector_tools_interpolate.templates.h index b004b518ba..511400948c 100644 --- a/include/deal.II/numerics/vector_tools_interpolate.templates.h +++ b/include/deal.II/numerics/vector_tools_interpolate.templates.h @@ -213,17 +213,13 @@ namespace VectorTools // Function* // // A given cell is skipped if function(cell) == nullptr - template class DoFHandlerType, - typename T> + template void - interpolate(const Mapping & mapping, - const DoFHandlerType &dof_handler, - T & function, - VectorType & vec, - const ComponentMask & component_mask) + interpolate(const Mapping & mapping, + const DoFHandler &dof_handler, + T & function, + VectorType & vec, + const ComponentMask & component_mask) { Assert(component_mask.represents_n_components( dof_handler.get_fe_collection().n_components()), @@ -606,14 +602,11 @@ namespace VectorTools } - template class DoFHandlerType, - typename VectorType> + template void - get_position_vector(const DoFHandlerType &dh, - VectorType & vector, - const ComponentMask & mask) + get_position_vector(const DoFHandler &dh, + VectorType & vector, + const ComponentMask & mask) { AssertDimension(vector.size(), dh.n_dofs()); const FiniteElement &fe = dh.get_fe(); @@ -699,8 +692,8 @@ namespace VectorTools // interpolate from that vector space to this one, by // carefully selecting the right components. - FESystem feq(FE_Q(degree), spacedim); - DoFHandlerType dhq(dh.get_triangulation()); + FESystem feq(FE_Q(degree), spacedim); + DoFHandler dhq(dh.get_triangulation()); dhq.distribute_dofs(feq); Vector eulerq(dhq.n_dofs()); const ComponentMask maskq(spacedim, true); @@ -782,14 +775,11 @@ namespace VectorTools } } - template class DoFHandlerType> + template void interpolate_based_on_material_id( - const Mapping & mapping, - const DoFHandlerType &dof_handler, + const Mapping & mapping, + const DoFHandler &dof_handler, const std::map *> & functions, @@ -799,7 +789,7 @@ namespace VectorTools // Create a small lambda capture wrapping the function map and call the // internal implementation const auto function_map = [&functions]( - const typename DoFHandlerType::active_cell_iterator &cell) + const typename DoFHandler::active_cell_iterator &cell) -> const Function * { const auto function = functions.find(cell->material_id()); @@ -833,21 +823,18 @@ namespace VectorTools } } // namespace internal - template class DoFHandlerType> + template void - interpolate_to_different_mesh(const DoFHandlerType &dof1, - const VectorType & u1, - const DoFHandlerType &dof2, - VectorType & u2) + interpolate_to_different_mesh(const DoFHandler &dof1, + const VectorType & u1, + const DoFHandler &dof2, + VectorType & u2) { Assert(GridTools::have_same_coarse_mesh(dof1, dof2), ExcMessage("The two DoF handlers must represent triangulations that " "have the same coarse meshes")); - InterGridMap> intergridmap; + InterGridMap> intergridmap; intergridmap.make_mapping(dof1, dof2); AffineConstraints dummy; @@ -858,15 +845,12 @@ namespace VectorTools - template class DoFHandlerType> + template void interpolate_to_different_mesh( - const DoFHandlerType & dof1, + const DoFHandler & dof1, const VectorType & u1, - const DoFHandlerType & dof2, + const DoFHandler & dof2, const AffineConstraints &constraints, VectorType & u2) { @@ -874,26 +858,22 @@ namespace VectorTools ExcMessage("The two DoF handlers must represent triangulations that " "have the same coarse meshes")); - InterGridMap> intergridmap; + InterGridMap> intergridmap; intergridmap.make_mapping(dof1, dof2); interpolate_to_different_mesh(intergridmap, u1, constraints, u2); } - template class DoFHandlerType> + template void interpolate_to_different_mesh( - const InterGridMap> & intergridmap, + const InterGridMap> & intergridmap, const VectorType & u1, const AffineConstraints &constraints, VectorType & u2) { - const DoFHandlerType &dof1 = intergridmap.get_source_grid(); - const DoFHandlerType &dof2 = - intergridmap.get_destination_grid(); + const DoFHandler &dof1 = intergridmap.get_source_grid(); + const DoFHandler &dof2 = intergridmap.get_destination_grid(); (void)dof2; Assert(dof1.get_fe_collection() == dof2.get_fe_collection(), @@ -915,13 +895,12 @@ namespace VectorTools // Therefore, loop over all cells // (active and inactive) of the source // grid .. - typename DoFHandlerType::cell_iterator cell1 = dof1.begin(); - const typename DoFHandlerType::cell_iterator endc1 = - dof1.end(); + typename DoFHandler::cell_iterator cell1 = dof1.begin(); + const typename DoFHandler::cell_iterator endc1 = dof1.end(); for (; cell1 != endc1; ++cell1) { - const typename DoFHandlerType::cell_iterator cell2 = + const typename DoFHandler::cell_iterator cell2 = intergridmap[cell1]; // .. and skip if source and destination diff --git a/include/deal.II/numerics/vector_tools_project.templates.h b/include/deal.II/numerics/vector_tools_project.templates.h index 998e4653fb..f4c730afd1 100644 --- a/include/deal.II/numerics/vector_tools_project.templates.h +++ b/include/deal.II/numerics/vector_tools_project.templates.h @@ -48,13 +48,10 @@ namespace VectorTools * mapping here because the function we evaluate for the DoFs is zero in * the mapped locations as well as in the original, unmapped locations */ - template class DoFHandlerType, - typename number> + template void interpolate_zero_boundary_values( - const DoFHandlerType & dof_handler, + const DoFHandler & dof_handler, std::map &boundary_values) { // loop over all boundary faces @@ -78,7 +75,7 @@ namespace VectorTools // that is actually wholly on // the boundary, not only by // one line or one vertex - typename DoFHandlerType::active_cell_iterator + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); std::vector face_dof_indices; @@ -105,14 +102,13 @@ namespace VectorTools */ template class DoFHandlerType, template class M_or_MC, template class Q_or_QC, typename number> void project_compute_b_v( const M_or_MC & mapping, - const DoFHandlerType & dof, + const DoFHandler & dof, const Function & function, const bool enforce_zero_boundary, const Q_or_QC & q_boundary, @@ -481,13 +477,12 @@ namespace VectorTools template class DoFHandlerType, template class M_or_MC, template class Q_or_QC> void do_project( const M_or_MC & mapping, - const DoFHandlerType & dof, + const DoFHandler & dof, const AffineConstraints & constraints, const Q_or_QC & quadrature, const Function &function, diff --git a/source/numerics/vector_tools_boundary.inst.in b/source/numerics/vector_tools_boundary.inst.in index e531980e5b..fc78ca58b5 100644 --- a/source/numerics/vector_tools_boundary.inst.in +++ b/source/numerics/vector_tools_boundary.inst.in @@ -15,7 +15,6 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; - DH : DOFHANDLER_TEMPLATES; number : REAL_AND_COMPLEX_SCALARS) { #if deal_II_dimension <= deal_II_space_dimension @@ -24,7 +23,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; template void interpolate_boundary_values( const Mapping &, - const DH &, + const DoFHandler &, const std::map *> &, std::map &, @@ -33,7 +32,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; template void interpolate_boundary_values( const Mapping &, - const DH &, + const DoFHandler &, const types::boundary_id, const Function &, std::map &, @@ -41,7 +40,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; template void interpolate_boundary_values( - const DH &, + const DoFHandler &, const types::boundary_id, const Function &, std::map &, @@ -49,7 +48,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; template void interpolate_boundary_values( - const DH &, + const DoFHandler &, const std::map *> &, std::map &, @@ -81,7 +80,6 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; - DH : DOFHANDLER_TEMPLATES; number : REAL_AND_COMPLEX_SCALARS) { #if deal_II_dimension <= deal_II_space_dimension @@ -91,7 +89,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; template void interpolate_boundary_values( const Mapping &, - const DH &, + const DoFHandler &, const std::map *> &, AffineConstraints &, @@ -100,7 +98,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; template void interpolate_boundary_values( const Mapping &, - const DH &, + const DoFHandler &, const types::boundary_id, const Function &, AffineConstraints &, @@ -108,7 +106,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; template void interpolate_boundary_values( - const DH &, + const DoFHandler &, const types::boundary_id, const Function &, AffineConstraints &, @@ -116,7 +114,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; template void interpolate_boundary_values( - const DH &, + const DoFHandler &, const std::map *> &, AffineConstraints &, diff --git a/source/numerics/vector_tools_constraints.inst.in b/source/numerics/vector_tools_constraints.inst.in index 82fd998cff..8382367142 100644 --- a/source/numerics/vector_tools_constraints.inst.in +++ b/source/numerics/vector_tools_constraints.inst.in @@ -17,8 +17,7 @@ // TODO[SP]: replace by // where applicable and move to codimension cases above also when applicable -for (DoFHandler : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS; - deal_II_space_dimension : SPACE_DIMENSIONS) +for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) { namespace VectorTools \{ diff --git a/source/numerics/vector_tools_interpolate.inst.in b/source/numerics/vector_tools_interpolate.inst.in index a5cdeaa6ad..a99aeb9018 100644 --- a/source/numerics/vector_tools_interpolate.inst.in +++ b/source/numerics/vector_tools_interpolate.inst.in @@ -81,8 +81,7 @@ for (VEC : VECTOR_TYPES; deal_II_dimension : DIMENSIONS; } -for (DoFHandler : DOFHANDLER_TEMPLATES; VEC : VECTOR_TYPES; - deal_II_dimension : DIMENSIONS; +for (VEC : VECTOR_TYPES; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) { #if deal_II_dimension <= deal_II_space_dimension -- 2.39.5