From 4c3465a9fbeb4a1cc342c9085ef8a7c35ed4ff34 Mon Sep 17 00:00:00 2001 From: Marc Fehling Date: Tue, 24 May 2022 22:07:28 -0600 Subject: [PATCH] Removed hp::DoFHandler. --- .../incompatibilities/20220524FehlingMunch | 8 + .../deal.II/distributed/solution_transfer.h | 20 -- include/deal.II/dofs/dof_accessor.h | 2 - include/deal.II/dofs/dof_renumbering.h | 2 - include/deal.II/dofs/dof_tools.h | 87 --------- include/deal.II/fe/fe.h | 39 ---- include/deal.II/fe/fe_enriched.h | 3 +- include/deal.II/fe/fe_tools.templates.h | 2 - .../fe/fe_tools_extrapolate.templates.h | 4 +- .../fe/fe_tools_interpolate.templates.h | 2 - include/deal.II/fe/mapping_fe_field.h | 72 +------- include/deal.II/grid/grid_tools.h | 2 - include/deal.II/hp/dof_handler.h | 129 ------------- include/deal.II/matrix_free/matrix_free.h | 167 ----------------- .../matrix_free/matrix_free.templates.h | 17 -- .../mg_transfer_global_coarsening.templates.h | 2 - include/deal.II/numerics/data_out.h | 11 -- include/deal.II/numerics/data_out_dof_data.h | 46 ----- .../numerics/data_out_dof_data.templates.h | 1 - include/deal.II/numerics/data_out_faces.h | 11 -- include/deal.II/numerics/data_out_rotation.h | 11 -- include/deal.II/numerics/data_out_stack.h | 33 +--- include/deal.II/numerics/data_postprocessor.h | 48 ----- include/deal.II/numerics/fe_field_function.h | 16 -- include/deal.II/numerics/solution_transfer.h | 13 -- source/distributed/solution_transfer.cc | 2 - source/dofs/dof_accessor.cc | 2 - source/dofs/dof_accessor_get.cc | 2 - source/dofs/dof_accessor_set.cc | 2 - source/dofs/dof_renumbering.cc | 1 - source/dofs/dof_tools.cc | 1 - source/fe/mapping_fe_field.cc | 173 +++++++++--------- source/grid/grid_tools_dof_handlers.cc | 1 - source/numerics/data_out.cc | 1 - source/numerics/data_out_stack.cc | 37 ++-- source/numerics/fe_field_function.cc | 2 - source/numerics/smoothness_estimator.cc | 3 +- tests/bits/periodicity_06.cc | 4 +- tests/bits/periodicity_07.cc | 4 +- .../data_out_faces_postprocessor_scalar_02.cc | 2 +- .../data_out_faces_postprocessor_vector_02.cc | 2 +- .../data_out_postprocessor_scalar_02.cc | 2 +- .../data_out_postprocessor_vector_02.cc | 2 +- ...ta_out_rotation_postprocessor_scalar_02.cc | 2 +- tests/dofs/count_dofs_on_patch.cc | 2 +- tests/dofs/extract_dofs_by_component_02_mg.cc | 6 +- tests/dofs/get_dofs_on_patch.cc | 2 +- .../matrix_vector_hp_no_template.cc | 18 +- tests/mpi/periodicity_02.cc | 10 +- tests/mpi/periodicity_03.cc | 10 +- tests/mpi/periodicity_04.cc | 4 +- tests/mpi/periodicity_06.cc | 4 +- tests/mpi/periodicity_07.cc | 4 +- 53 files changed, 167 insertions(+), 886 deletions(-) create mode 100644 doc/news/changes/incompatibilities/20220524FehlingMunch delete mode 100644 include/deal.II/hp/dof_handler.h diff --git a/doc/news/changes/incompatibilities/20220524FehlingMunch b/doc/news/changes/incompatibilities/20220524FehlingMunch new file mode 100644 index 0000000000..794728b69a --- /dev/null +++ b/doc/news/changes/incompatibilities/20220524FehlingMunch @@ -0,0 +1,8 @@ +Removed: The previously deprecated class hp::DoFHandler has been +removed, and with it all functions and classes that required the +template parameter DoFHandlerType. +
+From now on, use the standard DoFHandler. All hp-functionality has been +integrated to this one. +
+(Marc Fehling, Peter Munch, 2022/05/24) diff --git a/include/deal.II/distributed/solution_transfer.h b/include/deal.II/distributed/solution_transfer.h index a2c0e21059..63c822b3b7 100644 --- a/include/deal.II/distributed/solution_transfer.h +++ b/include/deal.II/distributed/solution_transfer.h @@ -366,26 +366,6 @@ namespace parallel } // namespace distributed } // namespace parallel -namespace Legacy -{ - namespace parallel - { - namespace distributed - { - /** - * @deprecated Use dealii::parallel::distributed::SolutionTransfer - * without the DoFHandlerType template instead. - */ - template > - using SolutionTransfer DEAL_II_DEPRECATED = - dealii::parallel::distributed:: - SolutionTransfer; - } // namespace distributed - } // namespace parallel -} // namespace Legacy - DEAL_II_NAMESPACE_CLOSE diff --git a/include/deal.II/dofs/dof_accessor.h b/include/deal.II/dofs/dof_accessor.h index 74f4f3f163..db40f0c235 100644 --- a/include/deal.II/dofs/dof_accessor.h +++ b/include/deal.II/dofs/dof_accessor.h @@ -24,8 +24,6 @@ #include -#include - DEAL_II_DISABLE_EXTRA_DIAGNOSTICS #include DEAL_II_ENABLE_EXTRA_DIAGNOSTICS diff --git a/include/deal.II/dofs/dof_renumbering.h b/include/deal.II/dofs/dof_renumbering.h index 39136671bc..cf376200bb 100644 --- a/include/deal.II/dofs/dof_renumbering.h +++ b/include/deal.II/dofs/dof_renumbering.h @@ -24,8 +24,6 @@ #include -#include - #include DEAL_II_NAMESPACE_OPEN diff --git a/include/deal.II/dofs/dof_tools.h b/include/deal.II/dofs/dof_tools.h index 5a28833641..47cab54aeb 100644 --- a/include/deal.II/dofs/dof_tools.h +++ b/include/deal.II/dofs/dof_tools.h @@ -27,8 +27,6 @@ #include -#include - #include #include @@ -1061,7 +1059,6 @@ namespace DoFTools const number periodicity_factor = 1.); - /** * Insert the (algebraic) constraints due to periodic boundary conditions * into an AffineConstraints object @p constraints. @@ -1092,24 +1089,6 @@ namespace DoFTools std::vector(), const number periodicity_factor = 1.); - /** - * The same as above. - * - * @deprecated Use the function that takes dim and spacedim as template - * argument. - */ - template - DEAL_II_DEPRECATED void - make_periodicity_constraints( - const std::vector< - GridTools::PeriodicFacePair> - & periodic_faces, - AffineConstraints & constraints, - const ComponentMask & component_mask = ComponentMask(), - const std::vector &first_vector_components = - std::vector(), - const number periodicity_factor = 1.); - /** @@ -1891,17 +1870,6 @@ namespace DoFTools const std::vector::active_cell_iterator> &patch); - /** - * The same as above. - * - * @deprecated Use the function that takes dim and spacedim as template - * argument. - */ - template - DEAL_II_DEPRECATED std::vector - get_dofs_on_patch( - const std::vector &patch); - /** * Creates a sparsity pattern, which lists * the degrees of freedom associated to each cell on the given @@ -2206,17 +2174,6 @@ namespace DoFTools const std::vector::active_cell_iterator> &patch); - /** - * The same as above. - * - * @deprecated Use the function that takes dim and spacedim as template - * argument. - */ - template - DEAL_II_DEPRECATED unsigned int - count_dofs_on_patch( - const std::vector &patch); - /** * @} */ @@ -2684,50 +2641,6 @@ namespace DoFTools for (types::global_dof_index i = 0; i < dof_handler.n_dofs(); ++i) point_to_index_map[support_points[i]] = i; } - - - - template - inline void - make_periodicity_constraints( - const std::vector< - GridTools::PeriodicFacePair> - & periodic_faces, - AffineConstraints & constraints, - const ComponentMask & component_mask, - const std::vector &first_vector_components, - const number periodicity_factor) - { - make_periodicity_constraints( - periodic_faces, - constraints, - component_mask, - first_vector_components, - periodicity_factor); - } - - - - template - inline std::vector - get_dofs_on_patch( - const std::vector &patch) - { - return get_dofs_on_patch(patch); - } - - - - template - inline unsigned int - count_dofs_on_patch( - const std::vector &patch) - { - return count_dofs_on_patch(patch); - } } // namespace DoFTools #endif diff --git a/include/deal.II/fe/fe.h b/include/deal.II/fe/fe.h index 3bd303c1f5..e0de934c0a 100644 --- a/include/deal.II/fe/fe.h +++ b/include/deal.II/fe/fe.h @@ -826,33 +826,6 @@ public: virtual std::string get_name() const = 0; - /** - * This operator returns a reference to the present object if the argument - * given equals to zero. While this does not seem particularly useful, it is - * helpful in writing code that works with both ::DoFHandler and the hp- - * version hp::DoFHandler, since one can then write code like this: - * @code - * dofs_per_cell = - * dof_handler->get_fe()[cell->active_fe_index()].n_dofs_per_cell(); - * @endcode - * - * This code doesn't work in both situations without the present operator - * because DoFHandler::get_fe() returns a finite element, whereas - * hp::DoFHandler::get_fe() returns a collection of finite elements that - * doesn't offer a dofs_per_cell member variable: one first has - * to select which finite element to work on, which is done using the - * operator[]. Fortunately, cell-@>active_fe_index() also works - * for non-hp-classes and simply returns zero in that case. The present - * operator[] accepts this zero argument, by returning the finite element - * with index zero within its collection (that, of course, consists only of - * the present finite element anyway). - * - * @deprecated With DoFHandler::get_fe(int) and the deprecation of the - * hp::DoFHandler class, there is no more use of this operator. - */ - DEAL_II_DEPRECATED const FiniteElement & - operator[](const unsigned int fe_index) const; - /** * @name Shape function access * @{ @@ -3093,18 +3066,6 @@ protected: //----------------------------------------------------------------------// -template -inline const FiniteElement & -FiniteElement::operator[](const unsigned int fe_index) const -{ - (void)fe_index; - Assert(fe_index == 0, - ExcMessage("A fe_index of zero is the only index allowed here")); - return *this; -} - - - template inline std::pair FiniteElement::system_to_component_index( diff --git a/include/deal.II/fe/fe_enriched.h b/include/deal.II/fe/fe_enriched.h index de7c119139..65bb51fe96 100644 --- a/include/deal.II/fe/fe_enriched.h +++ b/include/deal.II/fe/fe_enriched.h @@ -22,13 +22,14 @@ #include #include +#include + #include #include #include #include #include -#include #include #include diff --git a/include/deal.II/fe/fe_tools.templates.h b/include/deal.II/fe/fe_tools.templates.h index c8f7678dc6..74b524a2dd 100644 --- a/include/deal.II/fe/fe_tools.templates.h +++ b/include/deal.II/fe/fe_tools.templates.h @@ -60,8 +60,6 @@ #include #include -#include - #include #include diff --git a/include/deal.II/fe/fe_tools_extrapolate.templates.h b/include/deal.II/fe/fe_tools_extrapolate.templates.h index 7106bb5b1e..7275bec5a7 100644 --- a/include/deal.II/fe/fe_tools_extrapolate.templates.h +++ b/include/deal.II/fe/fe_tools_extrapolate.templates.h @@ -1761,10 +1761,10 @@ namespace FETools if (dynamic_cast *>(&dof2.get_triangulation()) != nullptr) { - Assert(dof1.get_fe()[0].reference_cell() == + Assert(dof1.get_fe(0).reference_cell() == ReferenceCells::get_hypercube(), ExcNotImplemented()); - Assert(dof2.get_fe()[0].reference_cell() == + Assert(dof2.get_fe(0).reference_cell() == ReferenceCells::get_hypercube(), ExcNotImplemented()); diff --git a/include/deal.II/fe/fe_tools_interpolate.templates.h b/include/deal.II/fe/fe_tools_interpolate.templates.h index 3afa943daf..b5e6c7ff92 100644 --- a/include/deal.II/fe/fe_tools_interpolate.templates.h +++ b/include/deal.II/fe/fe_tools_interpolate.templates.h @@ -36,8 +36,6 @@ #include #include -#include - #include #include #include diff --git a/include/deal.II/fe/mapping_fe_field.h b/include/deal.II/fe/mapping_fe_field.h index 4809b1b68f..1db832688e 100644 --- a/include/deal.II/fe/mapping_fe_field.h +++ b/include/deal.II/fe/mapping_fe_field.h @@ -39,56 +39,6 @@ DEAL_II_NAMESPACE_OPEN /*!@addtogroup mapping */ /*@{*/ -/** - * @deprecated Use MappingFEField instead. - */ -template , - typename DoFHandlerType = void> -class MappingFEField; - -#ifndef DOXYGEN -// prevent doxygen from complaining about potential recursive class relations -template -class MappingFEField : public MappingFEField -{ -public: - DEAL_II_DEPRECATED - MappingFEField(const DoFHandlerType &euler_dof_handler, - const VectorType & euler_vector, - const ComponentMask & mask = ComponentMask()) - : MappingFEField(euler_dof_handler, - euler_vector, - mask) - {} - - DEAL_II_DEPRECATED - MappingFEField(const DoFHandlerType & euler_dof_handler, - const std::vector &euler_vector, - const ComponentMask & mask = ComponentMask()) - : MappingFEField(euler_dof_handler, - euler_vector, - mask) - {} - - DEAL_II_DEPRECATED - MappingFEField(const DoFHandlerType & euler_dof_handler, - const MGLevelObject &euler_vector, - const ComponentMask & mask = ComponentMask()) - : MappingFEField(euler_dof_handler, - euler_vector, - mask) - {} - - DEAL_II_DEPRECATED - MappingFEField( - const MappingFEField &mapping) - : MappingFEField(mapping) - {} -}; -#endif // DOXYGEN - /** * The MappingFEField is a generalization of the MappingQEulerian class, for * arbitrary vector finite elements. The two main differences are that this @@ -124,9 +74,8 @@ public: * MappingFEField map(dhq, eulerq, mask); * @endcode */ -template -class MappingFEField - : public Mapping +template > +class MappingFEField : public Mapping { public: /** @@ -192,8 +141,7 @@ public: /** * Copy constructor. */ - MappingFEField( - const MappingFEField &mapping); + MappingFEField(const MappingFEField &mapping); /** * Return a pointer to a copy of the present object. The caller of this copy @@ -603,15 +551,15 @@ protected: /** * Reference to the vector of shifts. */ - std::vector>> + std::vector< + SmartPointer>> euler_vector; /** * Pointer to the DoFHandler to which the mapping vector is associated. */ SmartPointer, - MappingFEField> + MappingFEField> euler_dof_handler; private: @@ -661,7 +609,7 @@ private: void update_internal_dofs( const typename Triangulation::cell_iterator &cell, - const typename MappingFEField::InternalData + const typename MappingFEField::InternalData &data) const; /** @@ -670,8 +618,8 @@ private: virtual void compute_shapes_virtual( const std::vector> &unit_points, - typename MappingFEField::InternalData - &data) const; + typename MappingFEField::InternalData &data) + const; /* * Which components to use for the mapping. @@ -714,7 +662,7 @@ private: // Declare other MappingFEField classes friends. - template + template friend class MappingFEField; }; diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index f3f85b5ee9..ec7008cb9e 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -39,8 +39,6 @@ #include #include -#include - #include #include #include diff --git a/include/deal.II/hp/dof_handler.h b/include/deal.II/hp/dof_handler.h deleted file mode 100644 index bb49a9bd0a..0000000000 --- a/include/deal.II/hp/dof_handler.h +++ /dev/null @@ -1,129 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2005 - 2021 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - -#ifndef dealii_hp_dof_handler_h -#define dealii_hp_dof_handler_h - -#include - -DEAL_II_NAMESPACE_OPEN - -namespace hp -{ - /** - * Manage the distribution and numbering of the degrees of freedom for hp- - * FEM algorithms. This class satisfies the - * @ref ConceptMeshType "MeshType concept" - * requirements. - * - * The purpose of this class is to allow for an enumeration of degrees of - * freedom in the same way as the ::DoFHandler class, but it allows to use a - * different finite element on every cell. To this end, one assigns an - * active_fe_index to every cell that indicates which element - * within a collection of finite elements (represented by an object of type - * hp::FECollection) is the one that lives on this cell. The class then - * enumerates the degree of freedom associated with these finite elements on - * each cell of a triangulation and, if possible, identifies degrees of - * freedom at the interfaces of cells if they match. If neighboring cells - * have degrees of freedom along the common interface that do not immediate - * match (for example, if you have $Q_2$ and $Q_3$ elements meeting at a - * common face), then one needs to compute constraints to ensure that the - * resulting finite element space on the mesh remains conforming. - * - * The whole process of working with objects of this type is explained in - * step-27. Many of the algorithms this class implements are described in - * the - * @ref hp_paper "hp-paper". - * - * - *

Active FE indices and their behavior under mesh refinement

- * - * The typical workflow for using this class is to create a mesh, assign an - * active FE index to every active cell, calls - * hp::DoFHandler::distribute_dofs(), and then assemble a linear system and - * solve a problem on this finite element space. However, one can skip - * assigning active FE indices upon mesh refinement in certain - * circumstances. In particular, the following rules apply: - * - Upon mesh refinement, child cells inherit the active FE index of - * the parent. - * - When coarsening cells, the (now active) parent cell will be assigned - * an active FE index that is determined from its (no longer active) - * children, following the FiniteElementDomination logic: Out of the set of - * elements previously assigned to the former children, we choose the one - * dominated by all children for the parent cell. If none was found, we pick - * the most dominant element in the whole collection that is dominated by - * all former children. See hp::FECollection::find_dominated_fe_extended() - * for further information on this topic. - * - * @note Finite elements need to be assigned to each cell by either calling - * set_fe() or distribute_dofs() first to make this functionality available. - * - * - *

Active FE indices and parallel meshes

- * - * When this class is used with either a parallel::shared::Triangulation - * or a parallel::distributed::Triangulation, you can only set active - * FE indices on cells that are locally owned, - * using a call such as cell-@>set_active_fe_index(...). - * On the other hand, setting the active FE index on ghost - * or artificial cells is not allowed. - * - * Ghost cells do acquire the information what element - * is active on them, however: whenever - * you call hp::DoFHandler::distribute_dofs(), all processors that - * participate in the parallel mesh exchange information in such a way - * that the active FE index on ghost cells equals the active FE index - * that was set on that processor that owned that particular ghost cell. - * Consequently, one can query the @p active_fe_index on ghost - * cells, just not set it by hand. - * - * On artificial cells, no information is available about the - * @p active_fe_index used there. That's because we don't even know - * whether these cells exist at all, and even if they did, the - * current processor does not know anything specific about them. - * See - * @ref GlossArtificialCell "the glossary entry on artificial cells" - * for more information. - * - * During refinement and coarsening, information about the @p active_fe_index - * of each cell will be automatically transferred. - * - * However, using a parallel::distributed::Triangulation with an - * hp::DoFHandler requires additional attention during serialization, since no - * information on active FE indices will be automatically transferred. This - * has to be done manually using the - * prepare_for_serialization_of_active_fe_indices() and - * deserialize_active_fe_indices() functions. The former has to be called - * before parallel::distributed::Triangulation::save() is invoked, and the - * latter needs to be run after parallel::distributed::Triangulation::load(). - * If further data will be attached to the triangulation via the - * parallel::distributed::CellDataTransfer, - * parallel::distributed::SolutionTransfer, or Particles::ParticleHandler - * classes, all corresponding preparation and deserialization function calls - * need to happen in the same order. Consult the documentation of - * parallel::distributed::SolutionTransfer for more information. - * - * - * @ingroup dofs - * - * @deprecated The basic dealii::DoFHandler is capable of hp-adaptation now. - */ - template - using DoFHandler DEAL_II_DEPRECATED = dealii::DoFHandler; -} // namespace hp - -DEAL_II_NAMESPACE_CLOSE - -#endif diff --git a/include/deal.II/matrix_free/matrix_free.h b/include/deal.II/matrix_free/matrix_free.h index 498d0e828e..403954a29b 100644 --- a/include/deal.II/matrix_free/matrix_free.h +++ b/include/deal.II/matrix_free/matrix_free.h @@ -32,7 +32,6 @@ #include #include -#include #include #include @@ -623,22 +622,6 @@ public: const std::vector & quad, const AdditionalData &additional_data = AdditionalData()); - /** - * Initializes the data structures. Same as above, but using DoFHandlerType. - * - * @deprecated Use the overload taking a DoFHandler object instead. - */ - template - DEAL_II_DEPRECATED void - reinit(const MappingType & mapping, - const std::vector & dof_handler, - const std::vector *> &constraint, - const std::vector & quad, - const AdditionalData &additional_data = AdditionalData()); - /** * Initializes the data structures. Same as above, but using a $Q_1$ * mapping. @@ -652,18 +635,6 @@ public: const std::vector & quad, const AdditionalData &additional_data = AdditionalData()); - /** - * Initializes the data structures. Same as above, but using DoFHandlerType. - * - * @deprecated Use the overload taking a DoFHandler object instead. - */ - template - DEAL_II_DEPRECATED void - reinit(const std::vector & dof_handler, - const std::vector *> &constraint, - const std::vector & quad, - const AdditionalData &additional_data = AdditionalData()); - /** * Initializes the data structures. Same as before, but now the index set * description of the locally owned range of degrees of freedom is taken @@ -679,22 +650,6 @@ public: const QuadratureType & quad, const AdditionalData &additional_data = AdditionalData()); - /** - * Initializes the data structures. Same as above, but using DoFHandlerType. - * - * @deprecated Use the overload taking a DoFHandler object instead. - */ - template - DEAL_II_DEPRECATED void - reinit(const MappingType & mapping, - const std::vector & dof_handler, - const std::vector *> &constraint, - const QuadratureType & quad, - const AdditionalData &additional_data = AdditionalData()); - /** * Initializes the data structures. Same as above, but using a $Q_1$ * mapping. @@ -708,18 +663,6 @@ public: const QuadratureType & quad, const AdditionalData &additional_data = AdditionalData()); - /** - * Initializes the data structures. Same as above, but using DoFHandlerType. - * - * @deprecated Use the overload taking a DoFHandler object instead. - */ - template - DEAL_II_DEPRECATED void - reinit(const std::vector & dof_handler, - const std::vector *> &constraint, - const QuadratureType & quad, - const AdditionalData &additional_data = AdditionalData()); - /** * Copy function. Creates a deep copy of all data structures. It is usually * enough to keep the data for different operations once, so this function @@ -1727,20 +1670,6 @@ public: const DoFHandler & get_dof_handler(const unsigned int dof_handler_index = 0) const; - /** - * Return the DoFHandler with the index as given to the respective - * `std::vector` argument in the reinit() function. Note that if you want to - * call this function with a template parameter different than the default - * one, you will need to use the `template` before the function call, i.e., - * you will have something like `matrix_free.template - * get_dof_handler>()`. - * - * @deprecated Use the non-templated equivalent of this function. - */ - template - DEAL_II_DEPRECATED const DoFHandlerType & - get_dof_handler(const unsigned int dof_handler_index = 0) const; - /** * Return the cell iterator in deal.II speak to a given cell batch * (populating several lanes in a VectorizedArray) and the lane index within @@ -3119,32 +3048,6 @@ MatrixFree::reinit( -template -template -void -MatrixFree::reinit( - const MappingType & mapping, - const std::vector & dof_handler, - const std::vector *> &constraint, - const std::vector & quad, - const AdditionalData & additional_data) -{ - static_assert(dim == DoFHandlerType::dimension, - "Dimension dim not equal to DoFHandlerType::dimension."); - - std::vector *> dof_handlers; - - for (const auto dh : dof_handler) - dof_handlers.push_back(dh); - - this->reinit(mapping, dof_handlers, constraint, quad, additional_data); -} - - - template template void @@ -3172,28 +3075,6 @@ MatrixFree::reinit( -template -template -void -MatrixFree::reinit( - const std::vector & dof_handler, - const std::vector *> &constraint, - const std::vector & quad, - const AdditionalData & additional_data) -{ - static_assert(dim == DoFHandlerType::dimension, - "Dimension dim not equal to DoFHandlerType::dimension."); - - std::vector *> dof_handlers; - - for (const auto dh : dof_handler) - dof_handlers.push_back(dh); - - this->reinit(dof_handlers, constraint, quad, additional_data); -} - - - template template void @@ -3249,54 +3130,6 @@ MatrixFree::reinit( -template -template -void -MatrixFree::reinit( - const MappingType & mapping, - const std::vector & dof_handler, - const std::vector *> &constraint, - const QuadratureType & quad, - const AdditionalData & additional_data) -{ - static_assert(dim == DoFHandlerType::dimension, - "Dimension dim not equal to DoFHandlerType::dimension."); - - std::vector *> dof_handlers; - - for (const auto dh : dof_handler) - dof_handlers.push_back(dh); - - this->reinit(mapping, dof_handlers, constraint, quad, additional_data); -} - - - -template -template -void -MatrixFree::reinit( - const std::vector & dof_handler, - const std::vector *> &constraint, - const QuadratureType & quad, - const AdditionalData & additional_data) -{ - static_assert(dim == DoFHandlerType::dimension, - "Dimension dim not equal to DoFHandlerType::dimension."); - - std::vector *> dof_handlers; - - for (const auto dh : dof_handler) - dof_handlers.push_back(dh); - - this->reinit(dof_handlers, constraint, quad, additional_data); -} - - - // ------------------------------ implementation of loops -------------------- // internal helper functions that define how to call MPI data exchange diff --git a/include/deal.II/matrix_free/matrix_free.templates.h b/include/deal.II/matrix_free/matrix_free.templates.h index e6adbab2b0..e81690a01c 100644 --- a/include/deal.II/matrix_free/matrix_free.templates.h +++ b/include/deal.II/matrix_free/matrix_free.templates.h @@ -226,23 +226,6 @@ MatrixFree::get_dof_handler( -template -template -const DoFHandlerType & -MatrixFree::get_dof_handler( - const unsigned int dof_handler_index) const -{ - AssertIndexRange(dof_handler_index, n_components()); - - auto dh = - dynamic_cast(&*dof_handlers[dof_handler_index]); - Assert(dh != nullptr, ExcNotInitialized()); - - return *dh; -} - - - template typename DoFHandler::cell_iterator MatrixFree::get_cell_iterator( diff --git a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h index c068e3d97b..8015df751b 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h @@ -36,8 +36,6 @@ #include #include -#include - #include #include #include diff --git a/include/deal.II/numerics/data_out.h b/include/deal.II/numerics/data_out.h index 0913e4c740..4dd9e75449 100644 --- a/include/deal.II/numerics/data_out.h +++ b/include/deal.II/numerics/data_out.h @@ -451,17 +451,6 @@ private: const CurvedCellRegion curved_cell_region); }; -namespace Legacy -{ - /** - * @deprecated Use dealii::DataOut without the DoFHandlerType template - * instead. - */ - template > - using DataOut DEAL_II_DEPRECATED = - dealii::DataOut; -} // namespace Legacy - DEAL_II_NAMESPACE_CLOSE diff --git a/include/deal.II/numerics/data_out_dof_data.h b/include/deal.II/numerics/data_out_dof_data.h index 38d1479175..227c8aaca7 100644 --- a/include/deal.II/numerics/data_out_dof_data.h +++ b/include/deal.II/numerics/data_out_dof_data.h @@ -928,18 +928,6 @@ public: const DataOut_DoFData &source, const Point &shift = Point()); - /** - * @deprecated Use merge_patches() without the DoFHandlerType2 template - * instead. - */ - template - DEAL_II_DEPRECATED void - merge_patches(const DataOut_DoFData &source, - const Point &shift = Point()); - /** * Release the pointers to the data vectors and the DoF handler. You have to * set all data entries again using the add_data_vector() function. The @@ -1239,40 +1227,6 @@ DataOut_DoFData::merge_patches( } - -template -template -void -DataOut_DoFData::merge_patches( - const DataOut_DoFData &source, - const Point & shift) -{ - this->merge_patches(source, shift); -} - - - -namespace Legacy -{ - /** - * @deprecated Use dealii::DataOut_DoFData without the DoFHandlerType - * template instead. - */ - template - using DataOut_DoFData DEAL_II_DEPRECATED = - dealii::DataOut_DoFData; -} // namespace Legacy - - DEAL_II_NAMESPACE_CLOSE #endif diff --git a/include/deal.II/numerics/data_out_dof_data.templates.h b/include/deal.II/numerics/data_out_dof_data.templates.h index 29fee5604c..1f0d657ea9 100644 --- a/include/deal.II/numerics/data_out_dof_data.templates.h +++ b/include/deal.II/numerics/data_out_dof_data.templates.h @@ -40,7 +40,6 @@ #include #include -#include #include #include #include diff --git a/include/deal.II/numerics/data_out_faces.h b/include/deal.II/numerics/data_out_faces.h index e45b93e7a8..9b9ecb8475 100644 --- a/include/deal.II/numerics/data_out_faces.h +++ b/include/deal.II/numerics/data_out_faces.h @@ -243,17 +243,6 @@ private: DataOutBase::Patch & patch); }; -namespace Legacy -{ - /** - * @deprecated Use dealii::DataOutFaces without the DoFHandlerType template - * instead. - */ - template > - using DataOutFaces DEAL_II_DEPRECATED = - dealii::DataOutFaces; -} // namespace Legacy - DEAL_II_NAMESPACE_CLOSE diff --git a/include/deal.II/numerics/data_out_rotation.h b/include/deal.II/numerics/data_out_rotation.h index 7890a43151..ac335fba47 100644 --- a/include/deal.II/numerics/data_out_rotation.h +++ b/include/deal.II/numerics/data_out_rotation.h @@ -202,17 +202,6 @@ private: std::vector> &my_patches); }; -namespace Legacy -{ - /** - * @deprecated Use dealii::DataOutRotation without the DoFHandlerType - * template instead. - */ - template > - using DataOutRotation DEAL_II_DEPRECATED = - dealii::DataOutRotation; -} // namespace Legacy - DEAL_II_NAMESPACE_CLOSE diff --git a/include/deal.II/numerics/data_out_stack.h b/include/deal.II/numerics/data_out_stack.h index 83e086a24e..cc1c5c2a50 100644 --- a/include/deal.II/numerics/data_out_stack.h +++ b/include/deal.II/numerics/data_out_stack.h @@ -37,25 +37,6 @@ template class DoFHandler; #endif -/** - * @deprecated Use DataOutStack instead. - */ -template -class DataOutStack; - -#ifndef DOXYGEN -// prevent doxygen from complaining about potential recursive class relations -template -class DataOutStack : public DataOutStack -{ -public: - DEAL_II_DEPRECATED - DataOutStack() - : DataOutStack() - {} -}; -#endif // DOXYGEN - /** * This class is used to stack the output from several computations into one * output file by stacking the data sets in another coordinate direction @@ -130,9 +111,8 @@ public: * * @ingroup output */ -template -class DataOutStack - : public DataOutInterface +template +class DataOutStack : public DataOutInterface { static_assert(dim < 3, "Because this class stacks data into the (dim+1)st " @@ -343,8 +323,7 @@ private: * DoF handler to be used for the data corresponding to the present * parameter value. */ - SmartPointer, - DataOutStack> + SmartPointer, DataOutStack> dof_handler; /** @@ -391,9 +370,9 @@ private: * data in the form of Patch structures (declared in the base class * DataOutBase) to the actual output function. */ - virtual const std::vector::patch_dim, - DataOutStack::patch_spacedim>> & + virtual const std::vector< + dealii::DataOutBase::Patch::patch_dim, + DataOutStack::patch_spacedim>> & get_patches() const override; diff --git a/include/deal.II/numerics/data_postprocessor.h b/include/deal.II/numerics/data_postprocessor.h index 86dc109d34..ea67c6f89a 100644 --- a/include/deal.II/numerics/data_postprocessor.h +++ b/include/deal.II/numerics/data_postprocessor.h @@ -257,21 +257,6 @@ namespace DataPostprocessorInputs const typename DoFHandler::cell_iterator &cell, const unsigned int face_number); - /** - * Set the cell that is currently being used in evaluating the data - * for which the DataPostprocessor object is being called. - * - * This function is not usually called from user space, but is instead - * called by DataOut and similar classes when creating the object that - * is then passed to DataPostprocessor. - * - * @deprecated Use the equivalent function with the dim template parameter - * instead. - */ - template - DEAL_II_DEPRECATED void - set_cell(const typename DoFHandlerType::cell_iterator &cell); - /** * Query the cell on which we currently produce graphical output. * See the documentation of the current class for an example on how @@ -281,18 +266,6 @@ namespace DataPostprocessorInputs typename DoFHandler::cell_iterator get_cell() const; - /** - * Query the cell on which we currently produce graphical output. - * See the documentation of the current class for an example on how - * to use this function. - * - * @deprecated Use the equivalent function with the dim template parameter - * instead. - */ - template - DEAL_II_DEPRECATED typename DoFHandlerType::cell_iterator - get_cell() const; - /** * Query the face number on which we currently produce graphical output. * See the documentation of the current class for an example on how @@ -1330,17 +1303,6 @@ namespace DataPostprocessors namespace DataPostprocessorInputs { - template - template - void - CommonInputs::set_cell( - const typename DoFHandlerType::cell_iterator &new_cell) - { - return set_cell(new_cell); - } - - - template template void @@ -1379,16 +1341,6 @@ namespace DataPostprocessorInputs - template - template - typename DoFHandlerType::cell_iterator - CommonInputs::get_cell() const - { - return get_cell(); - } - - - template template typename DoFHandler::cell_iterator diff --git a/include/deal.II/numerics/fe_field_function.h b/include/deal.II/numerics/fe_field_function.h index ce4440d70a..0ff95d4773 100644 --- a/include/deal.II/numerics/fe_field_function.h +++ b/include/deal.II/numerics/fe_field_function.h @@ -488,22 +488,6 @@ namespace Functions }; } // namespace Functions -namespace Legacy -{ - namespace Functions - { - /** - * @deprecated Use dealii::Functions::FEFieldFunction without the - * DoFHandlerType template instead. - */ - template , - typename VectorType = Vector> - using FEFieldFunction DEAL_II_DEPRECATED = dealii::Functions:: - FEFieldFunction; - } // namespace Functions -} // namespace Legacy - DEAL_II_NAMESPACE_CLOSE diff --git a/include/deal.II/numerics/solution_transfer.h b/include/deal.II/numerics/solution_transfer.h index 470400f7fd..661f9d1258 100644 --- a/include/deal.II/numerics/solution_transfer.h +++ b/include/deal.II/numerics/solution_transfer.h @@ -566,19 +566,6 @@ private: dof_values_on_cell; }; -namespace Legacy -{ - /** - * @deprecated Use dealii::SolutionTransfer without the DoFHandlerType - * template instead. - */ - template , - typename DoFHandlerType = DoFHandler> - using SolutionTransfer DEAL_II_DEPRECATED = - dealii::SolutionTransfer; -} // namespace Legacy - DEAL_II_NAMESPACE_CLOSE diff --git a/source/distributed/solution_transfer.cc b/source/distributed/solution_transfer.cc index 2d10a6e2d2..d617fae553 100644 --- a/source/distributed/solution_transfer.cc +++ b/source/distributed/solution_transfer.cc @@ -27,8 +27,6 @@ # include # include -# include - # include # include # include diff --git a/source/dofs/dof_accessor.cc b/source/dofs/dof_accessor.cc index f0f533d261..7d37e1fdbf 100644 --- a/source/dofs/dof_accessor.cc +++ b/source/dofs/dof_accessor.cc @@ -22,8 +22,6 @@ #include #include -#include - #include DEAL_II_NAMESPACE_OPEN diff --git a/source/dofs/dof_accessor_get.cc b/source/dofs/dof_accessor_get.cc index 136aed8a7d..0909f6805e 100644 --- a/source/dofs/dof_accessor_get.cc +++ b/source/dofs/dof_accessor_get.cc @@ -22,8 +22,6 @@ #include #include -#include - #include #include #include diff --git a/source/dofs/dof_accessor_set.cc b/source/dofs/dof_accessor_set.cc index 72a385c0b5..739edb6ad9 100644 --- a/source/dofs/dof_accessor_set.cc +++ b/source/dofs/dof_accessor_set.cc @@ -22,8 +22,6 @@ #include #include -#include - #include #include #include diff --git a/source/dofs/dof_renumbering.cc b/source/dofs/dof_renumbering.cc index 6a536218b2..3e281fc5c9 100644 --- a/source/dofs/dof_renumbering.cc +++ b/source/dofs/dof_renumbering.cc @@ -30,7 +30,6 @@ #include #include -#include #include #include diff --git a/source/dofs/dof_tools.cc b/source/dofs/dof_tools.cc index ece004aaa1..5785431fd8 100644 --- a/source/dofs/dof_tools.cc +++ b/source/dofs/dof_tools.cc @@ -35,7 +35,6 @@ #include #include -#include #include #include #include diff --git a/source/fe/mapping_fe_field.cc b/source/fe/mapping_fe_field.cc index e6e2f3daa6..6ea53c7509 100644 --- a/source/fe/mapping_fe_field.cc +++ b/source/fe/mapping_fe_field.cc @@ -59,7 +59,7 @@ DEAL_II_NAMESPACE_OPEN template -MappingFEField::InternalData::InternalData( +MappingFEField::InternalData::InternalData( const FiniteElement &fe, const ComponentMask & mask) : unit_tangentials() @@ -73,8 +73,8 @@ MappingFEField::InternalData::InternalData( template std::size_t -MappingFEField::InternalData:: - memory_consumption() const +MappingFEField::InternalData::memory_consumption() + const { Assert(false, ExcNotImplemented()); return 0; @@ -84,7 +84,7 @@ MappingFEField::InternalData:: template double & -MappingFEField::InternalData::shape( +MappingFEField::InternalData::shape( const unsigned int qpoint, const unsigned int shape_nr) { @@ -95,7 +95,7 @@ MappingFEField::InternalData::shape( template const Tensor<1, dim> & -MappingFEField::InternalData::derivative( +MappingFEField::InternalData::derivative( const unsigned int qpoint, const unsigned int shape_nr) const { @@ -108,7 +108,7 @@ MappingFEField::InternalData::derivative( template Tensor<1, dim> & -MappingFEField::InternalData::derivative( +MappingFEField::InternalData::derivative( const unsigned int qpoint, const unsigned int shape_nr) { @@ -120,9 +120,9 @@ MappingFEField::InternalData::derivative( template const Tensor<2, dim> & -MappingFEField::InternalData:: - second_derivative(const unsigned int qpoint, - const unsigned int shape_nr) const +MappingFEField::InternalData::second_derivative( + const unsigned int qpoint, + const unsigned int shape_nr) const { AssertIndexRange(qpoint * n_shape_functions + shape_nr, shape_second_derivatives.size()); @@ -133,8 +133,9 @@ MappingFEField::InternalData:: template Tensor<2, dim> & -MappingFEField::InternalData:: - second_derivative(const unsigned int qpoint, const unsigned int shape_nr) +MappingFEField::InternalData::second_derivative( + const unsigned int qpoint, + const unsigned int shape_nr) { AssertIndexRange(qpoint * n_shape_functions + shape_nr, shape_second_derivatives.size()); @@ -144,7 +145,7 @@ MappingFEField::InternalData:: template const Tensor<3, dim> & -MappingFEField::InternalData::third_derivative( +MappingFEField::InternalData::third_derivative( const unsigned int qpoint, const unsigned int shape_nr) const { @@ -157,7 +158,7 @@ MappingFEField::InternalData::third_derivative( template Tensor<3, dim> & -MappingFEField::InternalData::third_derivative( +MappingFEField::InternalData::third_derivative( const unsigned int qpoint, const unsigned int shape_nr) { @@ -169,9 +170,9 @@ MappingFEField::InternalData::third_derivative( template const Tensor<4, dim> & -MappingFEField::InternalData:: - fourth_derivative(const unsigned int qpoint, - const unsigned int shape_nr) const +MappingFEField::InternalData::fourth_derivative( + const unsigned int qpoint, + const unsigned int shape_nr) const { AssertIndexRange(qpoint * n_shape_functions + shape_nr, shape_fourth_derivatives.size()); @@ -182,8 +183,9 @@ MappingFEField::InternalData:: template Tensor<4, dim> & -MappingFEField::InternalData:: - fourth_derivative(const unsigned int qpoint, const unsigned int shape_nr) +MappingFEField::InternalData::fourth_derivative( + const unsigned int qpoint, + const unsigned int shape_nr) { AssertIndexRange(qpoint * n_shape_functions + shape_nr, shape_fourth_derivatives.size()); @@ -193,7 +195,7 @@ MappingFEField::InternalData:: template -MappingFEField::MappingFEField( +MappingFEField::MappingFEField( const DoFHandler &euler_dof_handler, const VectorType & euler_vector, const ComponentMask & mask) @@ -223,7 +225,7 @@ MappingFEField::MappingFEField( template -MappingFEField::MappingFEField( +MappingFEField::MappingFEField( const DoFHandler &euler_dof_handler, const std::vector & euler_vector, const ComponentMask & mask) @@ -263,7 +265,7 @@ MappingFEField::MappingFEField( template -MappingFEField::MappingFEField( +MappingFEField::MappingFEField( const DoFHandler &euler_dof_handler, const MGLevelObject &euler_vector, const ComponentMask & mask) @@ -305,8 +307,8 @@ MappingFEField::MappingFEField( template -MappingFEField::MappingFEField( - const MappingFEField &mapping) +MappingFEField::MappingFEField( + const MappingFEField &mapping) : reference_cell(mapping.reference_cell) , uses_level_dofs(mapping.uses_level_dofs) , euler_vector(mapping.euler_vector) @@ -322,7 +324,7 @@ MappingFEField::MappingFEField( template inline const double & -MappingFEField::InternalData::shape( +MappingFEField::InternalData::shape( const unsigned int qpoint, const unsigned int shape_nr) const { @@ -334,8 +336,7 @@ MappingFEField::InternalData::shape( template bool -MappingFEField::preserves_vertex_locations() - const +MappingFEField::preserves_vertex_locations() const { return false; } @@ -344,7 +345,7 @@ MappingFEField::preserves_vertex_locations() template bool -MappingFEField::is_compatible_with( +MappingFEField::is_compatible_with( const ReferenceCell &reference_cell) const { Assert(dim == reference_cell.get_dimension(), @@ -362,7 +363,7 @@ MappingFEField::is_compatible_with( template boost::container::small_vector, GeometryInfo::vertices_per_cell> -MappingFEField::get_vertices( +MappingFEField::get_vertices( const typename Triangulation::cell_iterator &cell) const { // we transform our tria iterator into a dof iterator so we can access @@ -424,10 +425,9 @@ MappingFEField::get_vertices( template void -MappingFEField::compute_shapes_virtual( - const std::vector> &unit_points, - typename MappingFEField::InternalData &data) - const +MappingFEField::compute_shapes_virtual( + const std::vector> & unit_points, + typename MappingFEField::InternalData &data) const { const auto fe = &euler_dof_handler->get_fe(); const unsigned int n_points = unit_points.size(); @@ -462,7 +462,7 @@ MappingFEField::compute_shapes_virtual( template UpdateFlags -MappingFEField::requires_update_flags( +MappingFEField::requires_update_flags( const UpdateFlags in) const { // add flags if the respective quantities are necessary to compute @@ -517,7 +517,7 @@ MappingFEField::requires_update_flags( template void -MappingFEField::compute_data( +MappingFEField::compute_data( const UpdateFlags update_flags, const Quadrature &q, const unsigned int n_original_q_points, @@ -572,7 +572,7 @@ MappingFEField::compute_data( template void -MappingFEField::compute_face_data( +MappingFEField::compute_face_data( const UpdateFlags update_flags, const Quadrature &q, const unsigned int n_original_q_points, @@ -616,7 +616,7 @@ MappingFEField::compute_face_data( template typename std::unique_ptr::InternalDataBase> -MappingFEField::get_data( +MappingFEField::get_data( const UpdateFlags update_flags, const Quadrature &quadrature) const { @@ -632,7 +632,7 @@ MappingFEField::get_data( template std::unique_ptr::InternalDataBase> -MappingFEField::get_face_data( +MappingFEField::get_face_data( const UpdateFlags update_flags, const hp::QCollection &quadrature) const { @@ -651,7 +651,7 @@ MappingFEField::get_face_data( template std::unique_ptr::InternalDataBase> -MappingFEField::get_subface_data( +MappingFEField::get_subface_data( const UpdateFlags update_flags, const Quadrature &quadrature) const { @@ -683,7 +683,7 @@ namespace internal void maybe_compute_q_points( const typename dealii::QProjector::DataSetDescriptor data_set, - const typename dealii::MappingFEField:: + const typename dealii::MappingFEField:: InternalData & data, const FiniteElement &fe, const ComponentMask & fe_mask, @@ -725,7 +725,7 @@ namespace internal void maybe_update_Jacobians( const typename dealii::QProjector::DataSetDescriptor data_set, - const typename dealii::MappingFEField:: + const typename dealii::MappingFEField:: InternalData & data, const FiniteElement &fe, const ComponentMask & fe_mask, @@ -794,7 +794,7 @@ namespace internal void maybe_update_jacobian_grads( const typename dealii::QProjector::DataSetDescriptor data_set, - const typename dealii::MappingFEField:: + const typename dealii::MappingFEField:: InternalData & data, const FiniteElement & fe, const ComponentMask & fe_mask, @@ -844,7 +844,7 @@ namespace internal void maybe_update_jacobian_pushed_forward_grads( const typename dealii::QProjector::DataSetDescriptor data_set, - const typename dealii::MappingFEField:: + const typename dealii::MappingFEField:: InternalData & data, const FiniteElement &fe, const ComponentMask & fe_mask, @@ -917,7 +917,7 @@ namespace internal void maybe_update_jacobian_2nd_derivatives( const typename dealii::QProjector::DataSetDescriptor data_set, - const typename dealii::MappingFEField:: + const typename dealii::MappingFEField:: InternalData & data, const FiniteElement & fe, const ComponentMask & fe_mask, @@ -971,7 +971,7 @@ namespace internal void maybe_update_jacobian_pushed_forward_2nd_derivatives( const typename dealii::QProjector::DataSetDescriptor data_set, - const typename dealii::MappingFEField:: + const typename dealii::MappingFEField:: InternalData & data, const FiniteElement &fe, const ComponentMask & fe_mask, @@ -1067,7 +1067,7 @@ namespace internal void maybe_update_jacobian_3rd_derivatives( const typename dealii::QProjector::DataSetDescriptor data_set, - const typename dealii::MappingFEField:: + const typename dealii::MappingFEField:: InternalData & data, const FiniteElement & fe, const ComponentMask & fe_mask, @@ -1125,7 +1125,7 @@ namespace internal void maybe_update_jacobian_pushed_forward_3rd_derivatives( const typename dealii::QProjector::DataSetDescriptor data_set, - const typename dealii::MappingFEField:: + const typename dealii::MappingFEField:: InternalData & data, const FiniteElement &fe, const ComponentMask & fe_mask, @@ -1256,7 +1256,7 @@ namespace internal const unsigned int face_no, const unsigned int subface_no, const typename QProjector::DataSetDescriptor data_set, - const typename dealii::MappingFEField:: + const typename dealii::MappingFEField:: InternalData &data, internal::FEValuesImplementation::MappingRelatedData &output_data) @@ -1410,7 +1410,7 @@ namespace internal const unsigned int face_no, const unsigned int subface_no, const typename dealii::QProjector::DataSetDescriptor data_set, - const typename dealii::MappingFEField:: + const typename dealii::MappingFEField:: InternalData & data, const FiniteElement &fe, const ComponentMask & fe_mask, @@ -1488,7 +1488,7 @@ namespace internal // need to recalculate data even when cells are similar. template CellSimilarity::Similarity -MappingFEField::fill_fe_values( +MappingFEField::fill_fe_values( const typename Triangulation::cell_iterator &cell, const CellSimilarity::Similarity, const Quadrature & quadrature, @@ -1692,7 +1692,7 @@ MappingFEField::fill_fe_values( template void -MappingFEField::fill_fe_face_values( +MappingFEField::fill_fe_face_values( const typename Triangulation::cell_iterator &cell, const unsigned int face_no, const hp::QCollection & quadrature, @@ -1732,7 +1732,7 @@ MappingFEField::fill_fe_face_values( template void -MappingFEField::fill_fe_subface_values( +MappingFEField::fill_fe_subface_values( const typename Triangulation::cell_iterator &cell, const unsigned int face_no, const unsigned int subface_no, @@ -1787,17 +1787,15 @@ namespace internal const ArrayView> & output) { AssertDimension(input.size(), output.size()); - Assert( - (dynamic_cast< - const typename dealii:: - MappingFEField::InternalData *>( - &mapping_data) != nullptr), - ExcInternalError()); - const typename dealii::MappingFEField:: + Assert((dynamic_cast< + const typename dealii:: + MappingFEField::InternalData *>( + &mapping_data) != nullptr), + ExcInternalError()); + const typename dealii::MappingFEField:: InternalData &data = static_cast< - const typename dealii:: - MappingFEField::InternalData &>( - mapping_data); + const typename dealii::MappingFEField:: + InternalData &>(mapping_data); switch (mapping_kind) { @@ -1867,17 +1865,15 @@ namespace internal const ArrayView> & output) { AssertDimension(input.size(), output.size()); - Assert( - (dynamic_cast< - const typename dealii:: - MappingFEField::InternalData *>( - &mapping_data) != nullptr), - ExcInternalError()); - const typename dealii::MappingFEField:: + Assert((dynamic_cast< + const typename dealii:: + MappingFEField::InternalData *>( + &mapping_data) != nullptr), + ExcInternalError()); + const typename dealii::MappingFEField:: InternalData &data = static_cast< - const typename dealii:: - MappingFEField::InternalData &>( - mapping_data); + const typename dealii::MappingFEField:: + InternalData &>(mapping_data); switch (mapping_kind) { @@ -1905,7 +1901,7 @@ namespace internal template void -MappingFEField::transform( +MappingFEField::transform( const ArrayView> & input, const MappingKind mapping_kind, const typename Mapping::InternalDataBase &mapping_data, @@ -1924,7 +1920,7 @@ MappingFEField::transform( template void -MappingFEField::transform( +MappingFEField::transform( const ArrayView> &input, const MappingKind mapping_kind, const typename Mapping::InternalDataBase &mapping_data, @@ -1943,7 +1939,7 @@ MappingFEField::transform( template void -MappingFEField::transform( +MappingFEField::transform( const ArrayView> &input, const MappingKind, const typename Mapping::InternalDataBase &mapping_data, @@ -1961,7 +1957,7 @@ MappingFEField::transform( template void -MappingFEField::transform( +MappingFEField::transform( const ArrayView> &input, const MappingKind mapping_kind, const typename Mapping::InternalDataBase &mapping_data, @@ -2009,7 +2005,7 @@ MappingFEField::transform( template void -MappingFEField::transform( +MappingFEField::transform( const ArrayView> &input, const MappingKind /*mapping_kind*/, const typename Mapping::InternalDataBase &mapping_data, @@ -2027,7 +2023,7 @@ MappingFEField::transform( template Point -MappingFEField::transform_unit_to_real_cell( +MappingFEField::transform_unit_to_real_cell( const typename Triangulation::cell_iterator &cell, const Point & p) const { @@ -2048,7 +2044,7 @@ MappingFEField::transform_unit_to_real_cell( template Point -MappingFEField::do_transform_unit_to_real_cell( +MappingFEField::do_transform_unit_to_real_cell( const InternalData &data) const { Point p_real; @@ -2069,7 +2065,7 @@ MappingFEField::do_transform_unit_to_real_cell( template Point -MappingFEField::transform_real_to_unit_cell( +MappingFEField::transform_real_to_unit_cell( const typename Triangulation::cell_iterator &cell, const Point & p) const { @@ -2117,7 +2113,7 @@ MappingFEField::transform_real_to_unit_cell( template Point -MappingFEField::do_transform_real_to_unit_cell( +MappingFEField::do_transform_real_to_unit_cell( const typename Triangulation::cell_iterator &cell, const Point & p, const Point & initial_p_unit, @@ -2228,7 +2224,7 @@ failure: template unsigned int -MappingFEField::get_degree() const +MappingFEField::get_degree() const { return euler_dof_handler->get_fe().degree; } @@ -2237,7 +2233,7 @@ MappingFEField::get_degree() const template ComponentMask -MappingFEField::get_component_mask() const +MappingFEField::get_component_mask() const { return this->fe_mask; } @@ -2245,19 +2241,18 @@ MappingFEField::get_component_mask() const template std::unique_ptr> -MappingFEField::clone() const +MappingFEField::clone() const { - return std::make_unique>( - *this); + return std::make_unique>(*this); } template void -MappingFEField::update_internal_dofs( - const typename Triangulation::cell_iterator &cell, - const typename MappingFEField::InternalData - &data) const +MappingFEField::update_internal_dofs( + const typename Triangulation::cell_iterator & cell, + const typename MappingFEField::InternalData &data) + const { Assert(euler_dof_handler != nullptr, ExcMessage("euler_dof_handler is empty")); diff --git a/source/grid/grid_tools_dof_handlers.cc b/source/grid/grid_tools_dof_handlers.cc index 64483fedfe..809e69b521 100644 --- a/source/grid/grid_tools_dof_handlers.cc +++ b/source/grid/grid_tools_dof_handlers.cc @@ -33,7 +33,6 @@ #include #include -#include #include #include diff --git a/source/numerics/data_out.cc b/source/numerics/data_out.cc index a5461c2f65..59c0dd16e5 100644 --- a/source/numerics/data_out.cc +++ b/source/numerics/data_out.cc @@ -26,7 +26,6 @@ #include #include -#include #include #include diff --git a/source/numerics/data_out_stack.cc b/source/numerics/data_out_stack.cc index 1554c292ef..6d1b5c5d6a 100644 --- a/source/numerics/data_out_stack.cc +++ b/source/numerics/data_out_stack.cc @@ -39,7 +39,7 @@ DEAL_II_NAMESPACE_OPEN template std::size_t -DataOutStack::DataVector::memory_consumption() const +DataOutStack::DataVector::memory_consumption() const { return (MemoryConsumption::memory_consumption(data) + MemoryConsumption::memory_consumption(names)); @@ -49,8 +49,8 @@ DataOutStack::DataVector::memory_consumption() const template void -DataOutStack::new_parameter_value(const double p, - const double dp) +DataOutStack::new_parameter_value(const double p, + const double dp) { parameter = p; parameter_step = dp; @@ -72,7 +72,7 @@ DataOutStack::new_parameter_value(const double p, template void -DataOutStack::attach_dof_handler( +DataOutStack::attach_dof_handler( const DoFHandler &dof) { dof_handler = &dof; @@ -81,9 +81,8 @@ DataOutStack::attach_dof_handler( template void -DataOutStack::declare_data_vector( - const std::string &name, - const VectorType vector_type) +DataOutStack::declare_data_vector(const std::string &name, + const VectorType vector_type) { std::vector names; names.push_back(name); @@ -93,7 +92,7 @@ DataOutStack::declare_data_vector( template void -DataOutStack::declare_data_vector( +DataOutStack::declare_data_vector( const std::vector &names, const VectorType vector_type) { @@ -136,8 +135,8 @@ DataOutStack::declare_data_vector( template template void -DataOutStack::add_data_vector(const Vector &vec, - const std::string & name) +DataOutStack::add_data_vector(const Vector &vec, + const std::string & name) { const unsigned int n_components = dof_handler->get_fe(0).n_components(); @@ -170,7 +169,7 @@ DataOutStack::add_data_vector(const Vector &vec, template template void -DataOutStack::add_data_vector( +DataOutStack::add_data_vector( const Vector & vec, const std::vector &names) { @@ -244,8 +243,7 @@ DataOutStack::add_data_vector( template void -DataOutStack::build_patches( - const unsigned int nnnn_subdivisions) +DataOutStack::build_patches(const unsigned int nnnn_subdivisions) { // this is mostly copied from the // DataOut class @@ -432,7 +430,7 @@ DataOutStack::build_patches( template void -DataOutStack::finish_parameter_value() +DataOutStack::finish_parameter_value() { // release lock on dof handler dof_handler = nullptr; @@ -451,7 +449,7 @@ DataOutStack::finish_parameter_value() template std::size_t -DataOutStack::memory_consumption() const +DataOutStack::memory_consumption() const { return (DataOutInterface::memory_consumption() + MemoryConsumption::memory_consumption(parameter) + @@ -466,10 +464,9 @@ DataOutStack::memory_consumption() const template const std::vector< - dealii::DataOutBase::Patch::patch_dim, - DataOutStack::patch_spacedim>> - & - DataOutStack::get_patches() const + dealii::DataOutBase::Patch::patch_dim, + DataOutStack::patch_spacedim>> & +DataOutStack::get_patches() const { return patches; } @@ -478,7 +475,7 @@ const std::vector< template std::vector -DataOutStack::get_dataset_names() const +DataOutStack::get_dataset_names() const { std::vector names; for (typename std::vector::const_iterator dataset = diff --git a/source/numerics/fe_field_function.cc b/source/numerics/fe_field_function.cc index 5a5f936c26..152902930b 100644 --- a/source/numerics/fe_field_function.cc +++ b/source/numerics/fe_field_function.cc @@ -17,8 +17,6 @@ #include #include -#include - #include #include #include diff --git a/source/numerics/smoothness_estimator.cc b/source/numerics/smoothness_estimator.cc index 691f292888..14a4d644b8 100644 --- a/source/numerics/smoothness_estimator.cc +++ b/source/numerics/smoothness_estimator.cc @@ -16,11 +16,12 @@ #include #include +#include + #include #include -#include #include #include diff --git a/tests/bits/periodicity_06.cc b/tests/bits/periodicity_06.cc index 95fb337adc..190789ac3b 100644 --- a/tests/bits/periodicity_06.cc +++ b/tests/bits/periodicity_06.cc @@ -100,8 +100,8 @@ make_constraint_matrix(const DoFHandler<2> &dof_handler, int version) dof_handler, 1, 0, 0, periodicity_vectorDof); } - DoFTools::make_periodicity_constraints>(periodicity_vectorDof, - constraints); + DoFTools::make_periodicity_constraints(periodicity_vectorDof, + constraints); constraints.close(); std::map> support_points; diff --git a/tests/bits/periodicity_07.cc b/tests/bits/periodicity_07.cc index 5d258e1765..3b3f82211d 100644 --- a/tests/bits/periodicity_07.cc +++ b/tests/bits/periodicity_07.cc @@ -89,8 +89,8 @@ make_constraint_matrix(const DoFHandler<3> &dof_handler, int version) dof_handler, 1, 0, 0, periodicity_vectorDof); } - DoFTools::make_periodicity_constraints>(periodicity_vectorDof, - constraints); + DoFTools::make_periodicity_constraints(periodicity_vectorDof, + constraints); constraints.close(); std::map> support_points; diff --git a/tests/data_out/data_out_faces_postprocessor_scalar_02.cc b/tests/data_out/data_out_faces_postprocessor_scalar_02.cc index fe22054cc2..30d8ae62b6 100644 --- a/tests/data_out/data_out_faces_postprocessor_scalar_02.cc +++ b/tests/data_out/data_out_faces_postprocessor_scalar_02.cc @@ -63,7 +63,7 @@ public: // get the cell this all belongs to typename DoFHandler::cell_iterator cell = - input_data.template get_cell>(); + input_data.template get_cell(); Assert(input_data.solution_values[q] == double(cell->active_cell_index()), diff --git a/tests/data_out/data_out_faces_postprocessor_vector_02.cc b/tests/data_out/data_out_faces_postprocessor_vector_02.cc index c09e6a2e6e..8d46556fd9 100644 --- a/tests/data_out/data_out_faces_postprocessor_vector_02.cc +++ b/tests/data_out/data_out_faces_postprocessor_vector_02.cc @@ -65,7 +65,7 @@ public: // get the cell this all belongs to typename DoFHandler::cell_iterator cell = - input_data.template get_cell>(); + input_data.template get_cell(); Assert(input_data.solution_values[q](0) == double(cell->active_cell_index()), diff --git a/tests/data_out/data_out_postprocessor_scalar_02.cc b/tests/data_out/data_out_postprocessor_scalar_02.cc index 6879593bf7..f1ea121e62 100644 --- a/tests/data_out/data_out_postprocessor_scalar_02.cc +++ b/tests/data_out/data_out_postprocessor_scalar_02.cc @@ -63,7 +63,7 @@ public: // get the cell this all belongs to typename DoFHandler::cell_iterator cell = - input_data.template get_cell>(); + input_data.template get_cell(); Assert(input_data.solution_values[q] == double(cell->active_cell_index()), diff --git a/tests/data_out/data_out_postprocessor_vector_02.cc b/tests/data_out/data_out_postprocessor_vector_02.cc index 6472eb9e7f..ae6fdff3a1 100644 --- a/tests/data_out/data_out_postprocessor_vector_02.cc +++ b/tests/data_out/data_out_postprocessor_vector_02.cc @@ -65,7 +65,7 @@ public: // get the cell this all belongs to typename DoFHandler::cell_iterator cell = - input_data.template get_cell>(); + input_data.template get_cell(); Assert(input_data.solution_values[q](0) == double(cell->active_cell_index()), diff --git a/tests/data_out/data_out_rotation_postprocessor_scalar_02.cc b/tests/data_out/data_out_rotation_postprocessor_scalar_02.cc index 85c3fa007f..060db14cdc 100644 --- a/tests/data_out/data_out_rotation_postprocessor_scalar_02.cc +++ b/tests/data_out/data_out_rotation_postprocessor_scalar_02.cc @@ -63,7 +63,7 @@ public: // get the cell this all belongs to typename DoFHandler::cell_iterator cell = - input_data.template get_cell>(); + input_data.template get_cell(); Assert(input_data.solution_values[q] == double(cell->active_cell_index()), diff --git a/tests/dofs/count_dofs_on_patch.cc b/tests/dofs/count_dofs_on_patch.cc index 1fd127e4d5..5bd417f2e7 100644 --- a/tests/dofs/count_dofs_on_patch.cc +++ b/tests/dofs/count_dofs_on_patch.cc @@ -90,7 +90,7 @@ test() cell != dof_handler.end(); ++cell) deallog << cell << ": " - << DoFTools::count_dofs_on_patch>( + << DoFTools::count_dofs_on_patch( GridTools::get_patch_around_cell>(cell)) << std::endl; } diff --git a/tests/dofs/extract_dofs_by_component_02_mg.cc b/tests/dofs/extract_dofs_by_component_02_mg.cc index 4144d21653..902f9ac0f4 100644 --- a/tests/dofs/extract_dofs_by_component_02_mg.cc +++ b/tests/dofs/extract_dofs_by_component_02_mg.cc @@ -58,11 +58,11 @@ check() // try all possible block // masks, which we encode as bit // strings - for (unsigned int int_mask = 0; int_mask < (1U << element[0].n_blocks()); + for (unsigned int int_mask = 0; int_mask < (1U << element.n_blocks()); ++int_mask) { - std::vector component_mask(element[0].n_blocks()); - for (unsigned int c = 0; c < element[0].n_blocks(); ++c) + std::vector component_mask(element.n_blocks()); + for (unsigned int c = 0; c < element.n_blocks(); ++c) component_mask[c] = (int_mask & (1 << c)); for (unsigned int level = 0; level < tr.n_levels(); ++level) diff --git a/tests/dofs/get_dofs_on_patch.cc b/tests/dofs/get_dofs_on_patch.cc index 9ee2d2eaf6..289332c177 100644 --- a/tests/dofs/get_dofs_on_patch.cc +++ b/tests/dofs/get_dofs_on_patch.cc @@ -91,7 +91,7 @@ test() ++cell) { const std::vector m = - DoFTools::get_dofs_on_patch>( + DoFTools::get_dofs_on_patch( GridTools::get_patch_around_cell>(cell)); deallog << cell << ": "; for (unsigned int i = 0; i < m.size(); ++i) diff --git a/tests/matrix_free/matrix_vector_hp_no_template.cc b/tests/matrix_free/matrix_vector_hp_no_template.cc index 874f4ceeba..10ac6975e8 100644 --- a/tests/matrix_free/matrix_vector_hp_no_template.cc +++ b/tests/matrix_free/matrix_vector_hp_no_template.cc @@ -22,7 +22,8 @@ #include -#include +#include + #include #include "../tests.h" @@ -118,13 +119,10 @@ test() quadrature_collection_mf.push_back(QGauss<1>(deg + 1)); } - hp::DoFHandler dof(tria); + DoFHandler dof(tria); // set the active FE index in a random order { - typename hp::DoFHandler::active_cell_iterator cell = - dof.begin_active(), - endc = dof.end(); - for (; cell != endc; ++cell) + for (const auto &cell : dof.active_cell_iterators()) { const unsigned int fe_index = Testing::rand() % max_degree; cell->set_active_fe_index(fe_index + 1); @@ -132,8 +130,7 @@ test() // We cannot set random cells to FE_Nothing. We get the following error // The violated condition was: dominating_fe.n_dofs_per_face(face) <= // subface_fe.n_dofs_per_face(face) - cell = dof.begin_active(); - cell->set_active_fe_index(0); + dof.begin_active()->set_active_fe_index(0); } // setup DoFs @@ -173,10 +170,7 @@ test() FullMatrix cell_matrix; std::vector local_dof_indices; - typename hp::DoFHandler::active_cell_iterator cell = - dof.begin_active(), - endc = dof.end(); - for (; cell != endc; ++cell) + for (const auto &cell : dof.active_cell_iterators()) { const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell; diff --git a/tests/mpi/periodicity_02.cc b/tests/mpi/periodicity_02.cc index afa527c7c4..99b3c0dae2 100644 --- a/tests/mpi/periodicity_02.cc +++ b/tests/mpi/periodicity_02.cc @@ -383,11 +383,11 @@ namespace Step22 GridTools::collect_periodic_faces( dof_handler, 2, 3, 1, periodicity_vector, Tensor<1, dim>(), matrix); - DoFTools::make_periodicity_constraints>( - periodicity_vector, - constraints, - fe.component_mask(velocities), - first_vector_components); + DoFTools::make_periodicity_constraints(periodicity_vector, + constraints, + fe.component_mask( + velocities), + first_vector_components); #endif } diff --git a/tests/mpi/periodicity_03.cc b/tests/mpi/periodicity_03.cc index aab14a4df7..ba78ca4f42 100644 --- a/tests/mpi/periodicity_03.cc +++ b/tests/mpi/periodicity_03.cc @@ -287,11 +287,11 @@ namespace Step22 GridTools::collect_periodic_faces( dof_handler, 4, 0, 1, periodicity_vector, offset, rot_matrix); - DoFTools::make_periodicity_constraints>( - periodicity_vector, - constraints, - fe.component_mask(velocities), - first_vector_components); + DoFTools::make_periodicity_constraints(periodicity_vector, + constraints, + fe.component_mask( + velocities), + first_vector_components); VectorTools::interpolate_boundary_values(dof_handler, 1, diff --git a/tests/mpi/periodicity_04.cc b/tests/mpi/periodicity_04.cc index 45cef283e7..0d3502472a 100644 --- a/tests/mpi/periodicity_04.cc +++ b/tests/mpi/periodicity_04.cc @@ -198,8 +198,8 @@ check(const unsigned int orientation, bool reverse) GridTools::collect_periodic_faces( dof_handler, 42, 43, dim - 1, periodicity_vector); - DoFTools::make_periodicity_constraints>(periodicity_vector, - constraints); + DoFTools::make_periodicity_constraints(periodicity_vector, + constraints); } constraints.close(); diff --git a/tests/mpi/periodicity_06.cc b/tests/mpi/periodicity_06.cc index 679a4ff32b..3992c23fca 100644 --- a/tests/mpi/periodicity_06.cc +++ b/tests/mpi/periodicity_06.cc @@ -183,8 +183,8 @@ test(const unsigned numRefinementLevels = 2) /*direction*/ d, periodicity_vectorDof); - DoFTools::make_periodicity_constraints>(periodicity_vectorDof, - constraints); + DoFTools::make_periodicity_constraints(periodicity_vectorDof, + constraints); constraints.close(); const std::vector &locally_owned_dofs = diff --git a/tests/mpi/periodicity_07.cc b/tests/mpi/periodicity_07.cc index 8d9ccecaaf..129910f3a3 100644 --- a/tests/mpi/periodicity_07.cc +++ b/tests/mpi/periodicity_07.cc @@ -162,8 +162,8 @@ test(const unsigned numRefinementLevels = 2) /*direction*/ d, periodicity_vectorDof); - DoFTools::make_periodicity_constraints>(periodicity_vectorDof, - constraints); + DoFTools::make_periodicity_constraints(periodicity_vectorDof, + constraints); const bool consistent = constraints.is_consistent_in_parallel(locally_owned_dofs, -- 2.39.5