From: Peter Munch Date: Mon, 30 Oct 2023 12:20:52 +0000 (+0100) Subject: MGConstrainedDoFs: move implementation into new file X-Git-Tag: relicensing~269^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a789ff1113718a2ed12b6a7eb7cb222aedc2c346;p=dealii.git MGConstrainedDoFs: move implementation into new file --- diff --git a/doc/news/changes/incompatibilities/20231031Munch b/doc/news/changes/incompatibilities/20231031Munch new file mode 100644 index 0000000000..8d5ccbf5c8 --- /dev/null +++ b/doc/news/changes/incompatibilities/20231031Munch @@ -0,0 +1,5 @@ +Removed: The file `include/deal.II/multigrid/mg_constrained_dofs.h` +used to include `deal.II/dofs/dof_tools.h` and +`deal.II/multigrid/mg_tools.h`. This is not the case any more. +
+(Peter Munch, 2023/10/31) diff --git a/examples/step-87/step-87.cc b/examples/step-87/step-87.cc index d47034a54d..66feef4eb6 100644 --- a/examples/step-87/step-87.cc +++ b/examples/step-87/step-87.cc @@ -31,6 +31,7 @@ #include #include +#include #include #include diff --git a/include/deal.II/multigrid/mg_constrained_dofs.h b/include/deal.II/multigrid/mg_constrained_dofs.h index fbb3d7f7ec..d28f92bd41 100644 --- a/include/deal.II/multigrid/mg_constrained_dofs.h +++ b/include/deal.II/multigrid/mg_constrained_dofs.h @@ -21,12 +21,8 @@ #include #include -#include - #include -#include - #include #include @@ -274,227 +270,6 @@ private: -template -inline void -MGConstrainedDoFs::initialize( - const DoFHandler &dof, - const MGLevelObject &level_relevant_dofs) -{ - boundary_indices.clear(); - refinement_edge_indices.clear(); - level_constraints.clear(); - user_constraints.clear(); - - const unsigned int nlevels = dof.get_triangulation().n_global_levels(); - const unsigned int min_level = level_relevant_dofs.min_level(); - const unsigned int max_level = (level_relevant_dofs.max_level() == 0) ? - nlevels - 1 : - level_relevant_dofs.max_level(); - const bool use_provided_level_relevant_dofs = - (level_relevant_dofs.max_level() > 0); - - // At this point level_constraint and refinement_edge_indices are empty. - refinement_edge_indices.resize(nlevels); - level_constraints.resize(nlevels); - user_constraints.resize(nlevels); - for (unsigned int l = min_level; l <= max_level; ++l) - { - if (use_provided_level_relevant_dofs) - { - level_constraints[l].reinit(dof.locally_owned_mg_dofs(l), - level_relevant_dofs[l]); - } - else - { - const IndexSet relevant_dofs = - DoFTools::extract_locally_relevant_level_dofs(dof, l); - level_constraints[l].reinit(dof.locally_owned_mg_dofs(l), - relevant_dofs); - } - } - - // TODO: currently we only consider very basic periodic constraints - const IdentityMatrix transformation(dof.get_fe().n_dofs_per_face()); - const ComponentMask component_mask; - const double periodicity_factor = 1.0; - - for (const auto &[first_cell, second_cell] : - dof.get_triangulation().get_periodic_face_map()) - { - // only consider non-artificial cells - if (first_cell.first->is_artificial_on_level()) - continue; - if (second_cell.first.first->is_artificial_on_level()) - continue; - - // consider cell pairs with the same level - if (first_cell.first->level() != second_cell.first.first->level()) - continue; - - DoFTools::internal::set_periodicity_constraints( - first_cell.first->as_dof_handler_level_iterator(dof)->face( - first_cell.second), - second_cell.first.first->as_dof_handler_level_iterator(dof)->face( - second_cell.first.second), - transformation, - level_constraints[first_cell.first->level()], - component_mask, - second_cell.second[0], - second_cell.second[1], - second_cell.second[2], - periodicity_factor, - first_cell.first->level()); - } - - for (unsigned int l = min_level; l <= max_level; ++l) - { - level_constraints[l].close(); - - // Initialize with empty IndexSet of correct size - refinement_edge_indices[l] = IndexSet(dof.n_dofs(l)); - } - - MGTools::extract_inner_interface_dofs(dof, refinement_edge_indices); -} - - - -template -inline void -MGConstrainedDoFs::make_zero_boundary_constraints( - const DoFHandler &dof, - const std::set &boundary_ids, - const ComponentMask &component_mask) -{ - // allocate an IndexSet for each global level. Contents will be - // overwritten inside make_boundary_list. - const unsigned int n_levels = dof.get_triangulation().n_global_levels(); - Assert(boundary_indices.empty() || boundary_indices.size() == n_levels, - ExcInternalError()); - boundary_indices.resize(n_levels); - - MGTools::make_boundary_list(dof, - boundary_ids, - boundary_indices, - component_mask); -} - - - -template -inline void -MGConstrainedDoFs::add_boundary_indices(const DoFHandler &dof, - const unsigned int level, - const IndexSet &level_boundary_indices) -{ - const unsigned int n_levels = dof.get_triangulation().n_global_levels(); - if (boundary_indices.empty()) - { - boundary_indices.resize(n_levels); - for (unsigned int i = 0; i < n_levels; ++i) - boundary_indices[i] = IndexSet(dof.n_dofs(i)); - } - AssertDimension(boundary_indices.size(), n_levels); - boundary_indices[level].add_indices(level_boundary_indices); -} - - - -template -inline void -MGConstrainedDoFs::make_no_normal_flux_constraints( - const DoFHandler &dof, - const types::boundary_id bid, - const unsigned int first_vector_component) -{ - // For a given boundary id, find which vector component is on the boundary - // and set a zero boundary constraint for those degrees of freedom. - const unsigned int n_components = dof.get_fe_collection().n_components(); - AssertIndexRange(first_vector_component + dim - 1, n_components); - - ComponentMask comp_mask(n_components, false); - - - typename Triangulation::face_iterator - face = dof.get_triangulation().begin_face(), - endf = dof.get_triangulation().end_face(); - for (; face != endf; ++face) - if (face->at_boundary() && face->boundary_id() == bid) - for (unsigned int d = 0; d < dim; ++d) - { - Tensor<1, dim, double> unit_vec; - unit_vec[d] = 1.0; - - const Tensor<1, dim> normal_vec = - face->get_manifold().normal_vector(face, face->center()); - - if (std::abs(std::abs(unit_vec * normal_vec) - 1.0) < 1e-10) - comp_mask.set(d + first_vector_component, true); - else - Assert( - std::abs(unit_vec * normal_vec) < 1e-10, - ExcMessage( - "We can currently only support no normal flux conditions " - "for a specific boundary id if all faces are normal to the " - "x, y, or z axis.")); - } - - Assert(comp_mask.n_selected_components() == 1, - ExcMessage( - "We can currently only support no normal flux conditions " - "for a specific boundary id if all faces are facing in the " - "same direction, i.e., a boundary normal to the x-axis must " - "have a different boundary id than a boundary normal to the " - "y- or z-axis and so on. If the mesh here was produced using " - "GridGenerator::..., setting colorize=true during mesh generation " - "and calling make_no_normal_flux_constraints() for each no normal " - "flux boundary will fulfill the condition.")); - - this->make_zero_boundary_constraints(dof, {bid}, comp_mask); -} - - - -inline void -MGConstrainedDoFs::add_user_constraints( - const unsigned int level, - const AffineConstraints &constraints_on_level) -{ - AssertIndexRange(level, user_constraints.size()); - - // Get the relevant DoFs from level_constraints if - // the user constraint matrix has not been initialized - if (user_constraints[level].get_local_lines().size() == 0) - user_constraints[level].reinit( - level_constraints[level].get_locally_owned_indices(), - level_constraints[level].get_local_lines()); - - user_constraints[level].merge( - constraints_on_level, - AffineConstraints::MergeConflictBehavior::right_object_wins); - user_constraints[level].close(); -} - - - -inline void -MGConstrainedDoFs::clear_user_constraints() -{ - for (auto &constraint : user_constraints) - constraint.clear(); -} - - - -inline void -MGConstrainedDoFs::clear() -{ - boundary_indices.clear(); - refinement_edge_indices.clear(); - user_constraints.clear(); -} - - inline bool MGConstrainedDoFs::is_boundary_index(const unsigned int level, const types::global_dof_index index) const @@ -580,61 +355,6 @@ MGConstrainedDoFs::get_user_constraint_matrix(const unsigned int level) const -template -inline void -MGConstrainedDoFs::merge_constraints(AffineConstraints &constraints, - const unsigned int level, - const bool add_boundary_indices, - const bool add_refinement_edge_indices, - const bool add_level_constraints, - const bool add_user_constraints) const -{ - constraints.clear(); - - // determine local lines - IndexSet index_set(this->get_refinement_edge_indices(level).size()); - - if (add_boundary_indices && this->have_boundary_indices()) - index_set.add_indices(this->get_boundary_indices(level)); - - if (add_refinement_edge_indices) - index_set.add_indices(this->get_refinement_edge_indices(level)); - - if (add_level_constraints) - index_set.add_indices(this->get_level_constraints(level).get_local_lines()); - - if (add_user_constraints) - index_set.add_indices( - this->get_user_constraint_matrix(level).get_local_lines()); - - constraints.reinit(level_constraints[level].get_locally_owned_indices(), - index_set); - - // merge constraints - if (add_boundary_indices && this->have_boundary_indices()) - for (const auto i : this->get_boundary_indices(level)) - constraints.constrain_dof_to_zero(i); - - if (add_refinement_edge_indices) - for (const auto i : this->get_refinement_edge_indices(level)) - constraints.constrain_dof_to_zero(i); - - if (add_level_constraints) - constraints.merge(this->get_level_constraints(level), - AffineConstraints::left_object_wins, - true); - - if (add_user_constraints) - constraints.merge(this->get_user_constraint_matrix(level), - AffineConstraints::left_object_wins, - true); - - // finalize setup - constraints.close(); -} - - - DEAL_II_NAMESPACE_CLOSE #endif diff --git a/include/deal.II/numerics/vector_tools_project.templates.h b/include/deal.II/numerics/vector_tools_project.templates.h index dfaefee818..43fa6e6b93 100644 --- a/include/deal.II/numerics/vector_tools_project.templates.h +++ b/include/deal.II/numerics/vector_tools_project.templates.h @@ -16,6 +16,8 @@ #ifndef dealii_vector_tools_project_templates_h #define dealii_vector_tools_project_templates_h +#include + #include #include #include diff --git a/source/multigrid/CMakeLists.txt b/source/multigrid/CMakeLists.txt index 03bbd16756..285f91a924 100644 --- a/source/multigrid/CMakeLists.txt +++ b/source/multigrid/CMakeLists.txt @@ -15,6 +15,7 @@ set(_unity_include_src mg_base.cc + mg_constrained_dofs.cc mg_level_global_transfer.cc mg_transfer_block.cc mg_transfer_component.cc @@ -40,6 +41,7 @@ setup_source_list("${_unity_include_src}" set(_inst mg_base.inst.in + mg_constrained_dofs.inst.in mg_level_global_transfer.inst.in mg_tools.inst.in mg_transfer_block.inst.in diff --git a/source/multigrid/mg_constrained_dofs.cc b/source/multigrid/mg_constrained_dofs.cc new file mode 100644 index 0000000000..27da1a26c3 --- /dev/null +++ b/source/multigrid/mg_constrained_dofs.cc @@ -0,0 +1,305 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2010 - 2023 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. +// +// --------------------------------------------------------------------- + + +#include + +#include + +#include +#include + +DEAL_II_NAMESPACE_OPEN + + +template +void +MGConstrainedDoFs::initialize( + const DoFHandler &dof, + const MGLevelObject &level_relevant_dofs) +{ + boundary_indices.clear(); + refinement_edge_indices.clear(); + level_constraints.clear(); + user_constraints.clear(); + + const unsigned int nlevels = dof.get_triangulation().n_global_levels(); + const unsigned int min_level = level_relevant_dofs.min_level(); + const unsigned int max_level = (level_relevant_dofs.max_level() == 0) ? + nlevels - 1 : + level_relevant_dofs.max_level(); + const bool use_provided_level_relevant_dofs = + (level_relevant_dofs.max_level() > 0); + + // At this point level_constraint and refinement_edge_indices are empty. + refinement_edge_indices.resize(nlevels); + level_constraints.resize(nlevels); + user_constraints.resize(nlevels); + for (unsigned int l = min_level; l <= max_level; ++l) + { + if (use_provided_level_relevant_dofs) + { + level_constraints[l].reinit(dof.locally_owned_mg_dofs(l), + level_relevant_dofs[l]); + } + else + { + const IndexSet relevant_dofs = + DoFTools::extract_locally_relevant_level_dofs(dof, l); + level_constraints[l].reinit(dof.locally_owned_mg_dofs(l), + relevant_dofs); + } + } + + // TODO: currently we only consider very basic periodic constraints + const IdentityMatrix transformation(dof.get_fe().n_dofs_per_face()); + const ComponentMask component_mask; + const double periodicity_factor = 1.0; + + for (const auto &[first_cell, second_cell] : + dof.get_triangulation().get_periodic_face_map()) + { + // only consider non-artificial cells + if (first_cell.first->is_artificial_on_level()) + continue; + if (second_cell.first.first->is_artificial_on_level()) + continue; + + // consider cell pairs with the same level + if (first_cell.first->level() != second_cell.first.first->level()) + continue; + + DoFTools::internal::set_periodicity_constraints( + first_cell.first->as_dof_handler_level_iterator(dof)->face( + first_cell.second), + second_cell.first.first->as_dof_handler_level_iterator(dof)->face( + second_cell.first.second), + transformation, + level_constraints[first_cell.first->level()], + component_mask, + second_cell.second[0], + second_cell.second[1], + second_cell.second[2], + periodicity_factor, + first_cell.first->level()); + } + + for (unsigned int l = min_level; l <= max_level; ++l) + { + level_constraints[l].close(); + + // Initialize with empty IndexSet of correct size + refinement_edge_indices[l] = IndexSet(dof.n_dofs(l)); + } + + MGTools::extract_inner_interface_dofs(dof, refinement_edge_indices); +} + + + +template +void +MGConstrainedDoFs::make_zero_boundary_constraints( + const DoFHandler &dof, + const std::set &boundary_ids, + const ComponentMask &component_mask) +{ + // allocate an IndexSet for each global level. Contents will be + // overwritten inside make_boundary_list. + const unsigned int n_levels = dof.get_triangulation().n_global_levels(); + Assert(boundary_indices.empty() || boundary_indices.size() == n_levels, + ExcInternalError()); + boundary_indices.resize(n_levels); + + MGTools::make_boundary_list(dof, + boundary_ids, + boundary_indices, + component_mask); +} + + + +template +void +MGConstrainedDoFs::add_boundary_indices(const DoFHandler &dof, + const unsigned int level, + const IndexSet &level_boundary_indices) +{ + const unsigned int n_levels = dof.get_triangulation().n_global_levels(); + if (boundary_indices.empty()) + { + boundary_indices.resize(n_levels); + for (unsigned int i = 0; i < n_levels; ++i) + boundary_indices[i] = IndexSet(dof.n_dofs(i)); + } + AssertDimension(boundary_indices.size(), n_levels); + boundary_indices[level].add_indices(level_boundary_indices); +} + + + +template +void +MGConstrainedDoFs::make_no_normal_flux_constraints( + const DoFHandler &dof, + const types::boundary_id bid, + const unsigned int first_vector_component) +{ + // For a given boundary id, find which vector component is on the boundary + // and set a zero boundary constraint for those degrees of freedom. + const unsigned int n_components = dof.get_fe_collection().n_components(); + AssertIndexRange(first_vector_component + dim - 1, n_components); + + ComponentMask comp_mask(n_components, false); + + + typename Triangulation::face_iterator + face = dof.get_triangulation().begin_face(), + endf = dof.get_triangulation().end_face(); + for (; face != endf; ++face) + if (face->at_boundary() && face->boundary_id() == bid) + for (unsigned int d = 0; d < dim; ++d) + { + Tensor<1, dim, double> unit_vec; + unit_vec[d] = 1.0; + + const Tensor<1, dim> normal_vec = + face->get_manifold().normal_vector(face, face->center()); + + if (std::abs(std::abs(unit_vec * normal_vec) - 1.0) < 1e-10) + comp_mask.set(d + first_vector_component, true); + else + Assert( + std::abs(unit_vec * normal_vec) < 1e-10, + ExcMessage( + "We can currently only support no normal flux conditions " + "for a specific boundary id if all faces are normal to the " + "x, y, or z axis.")); + } + + Assert(comp_mask.n_selected_components() == 1, + ExcMessage( + "We can currently only support no normal flux conditions " + "for a specific boundary id if all faces are facing in the " + "same direction, i.e., a boundary normal to the x-axis must " + "have a different boundary id than a boundary normal to the " + "y- or z-axis and so on. If the mesh here was produced using " + "GridGenerator::..., setting colorize=true during mesh generation " + "and calling make_no_normal_flux_constraints() for each no normal " + "flux boundary will fulfill the condition.")); + + this->make_zero_boundary_constraints(dof, {bid}, comp_mask); +} + + + +void +MGConstrainedDoFs::add_user_constraints( + const unsigned int level, + const AffineConstraints &constraints_on_level) +{ + AssertIndexRange(level, user_constraints.size()); + + // Get the relevant DoFs from level_constraints if + // the user constraint matrix has not been initialized + if (user_constraints[level].get_local_lines().size() == 0) + user_constraints[level].reinit( + level_constraints[level].get_locally_owned_indices(), + level_constraints[level].get_local_lines()); + + user_constraints[level].merge( + constraints_on_level, + AffineConstraints::MergeConflictBehavior::right_object_wins); + user_constraints[level].close(); +} + + + +void +MGConstrainedDoFs::clear_user_constraints() +{ + for (auto &constraint : user_constraints) + constraint.clear(); +} + + + +void +MGConstrainedDoFs::clear() +{ + boundary_indices.clear(); + refinement_edge_indices.clear(); + user_constraints.clear(); +} + + + +template +void +MGConstrainedDoFs::merge_constraints(AffineConstraints &constraints, + const unsigned int level, + const bool add_boundary_indices, + const bool add_refinement_edge_indices, + const bool add_level_constraints, + const bool add_user_constraints) const +{ + constraints.clear(); + + // determine local lines + IndexSet index_set(this->get_refinement_edge_indices(level).size()); + + if (add_boundary_indices && this->have_boundary_indices()) + index_set.add_indices(this->get_boundary_indices(level)); + + if (add_refinement_edge_indices) + index_set.add_indices(this->get_refinement_edge_indices(level)); + + if (add_level_constraints) + index_set.add_indices(this->get_level_constraints(level).get_local_lines()); + + if (add_user_constraints) + index_set.add_indices( + this->get_user_constraint_matrix(level).get_local_lines()); + + constraints.reinit(level_constraints[level].get_locally_owned_indices(), + index_set); + + // merge constraints + if (add_boundary_indices && this->have_boundary_indices()) + for (const auto i : this->get_boundary_indices(level)) + constraints.constrain_dof_to_zero(i); + + if (add_refinement_edge_indices) + for (const auto i : this->get_refinement_edge_indices(level)) + constraints.constrain_dof_to_zero(i); + + if (add_level_constraints) + constraints.merge(this->get_level_constraints(level), + AffineConstraints::left_object_wins, + true); + + if (add_user_constraints) + constraints.merge(this->get_user_constraint_matrix(level), + AffineConstraints::left_object_wins, + true); + + // finalize setup + constraints.close(); +} + +#include "mg_constrained_dofs.inst" + + +DEAL_II_NAMESPACE_CLOSE diff --git a/source/multigrid/mg_constrained_dofs.inst.in b/source/multigrid/mg_constrained_dofs.inst.in new file mode 100644 index 0000000000..571e037aa4 --- /dev/null +++ b/source/multigrid/mg_constrained_dofs.inst.in @@ -0,0 +1,49 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2010 - 2023 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. +// +// --------------------------------------------------------------------- + + + +for (deal_II_dimension : DIMENSIONS) + { + template void MGConstrainedDoFs::initialize( + const DoFHandler &dof, + const MGLevelObject &level_relevant_dofs); + + template void MGConstrainedDoFs::make_zero_boundary_constraints( + const DoFHandler &dof, + const std::set &boundary_ids, + const ComponentMask &component_mask); + + template void MGConstrainedDoFs::add_boundary_indices( + const DoFHandler &dof, + const unsigned int level, + const IndexSet &boundary_indices); + + template void MGConstrainedDoFs::make_no_normal_flux_constraints( + const DoFHandler &dof, + const types::boundary_id bid, + const unsigned int first_vector_component); + } + +for (S1 : REAL_SCALARS) + { + template void MGConstrainedDoFs::merge_constraints( + AffineConstraints & constraints, + const unsigned int level, + const bool add_boundary_indices, + const bool add_refinement_edge_indices, + const bool add_level_constraints, + const bool add_user_constraints) const; + } diff --git a/tests/grid/grid_generator_marching_cube_algorithm_02.cc b/tests/grid/grid_generator_marching_cube_algorithm_02.cc index 3aa1458c98..c342684b1c 100644 --- a/tests/grid/grid_generator_marching_cube_algorithm_02.cc +++ b/tests/grid/grid_generator_marching_cube_algorithm_02.cc @@ -20,6 +20,7 @@ #include #include +#include #include #include diff --git a/tests/integrators/assembler_simple_matrix_03.cc b/tests/integrators/assembler_simple_matrix_03.cc index c8bd6f11ce..c8bd42be62 100644 --- a/tests/integrators/assembler_simple_matrix_03.cc +++ b/tests/integrators/assembler_simple_matrix_03.cc @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/tests/integrators/assembler_simple_matrix_03m.cc b/tests/integrators/assembler_simple_matrix_03m.cc index 3d9aae1c4a..c38b62f73c 100644 --- a/tests/integrators/assembler_simple_matrix_03m.cc +++ b/tests/integrators/assembler_simple_matrix_03m.cc @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/tests/integrators/assembler_simple_matrix_03tri.cc b/tests/integrators/assembler_simple_matrix_03tri.cc index f4ff982902..9308cb056e 100644 --- a/tests/integrators/assembler_simple_matrix_03tri.cc +++ b/tests/integrators/assembler_simple_matrix_03tri.cc @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/tests/integrators/assembler_simple_matrix_04.cc b/tests/integrators/assembler_simple_matrix_04.cc index 2cbfdee2c8..ba1f2e64e0 100644 --- a/tests/integrators/assembler_simple_matrix_04.cc +++ b/tests/integrators/assembler_simple_matrix_04.cc @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/tests/matrix_free/mass_operator_04.cc b/tests/matrix_free/mass_operator_04.cc index f3a5dd15b4..1023d16c38 100644 --- a/tests/matrix_free/mass_operator_04.cc +++ b/tests/matrix_free/mass_operator_04.cc @@ -24,6 +24,7 @@ #include #include +#include #include #include diff --git a/tests/matrix_free/matrix_vector_stokes_base.cc b/tests/matrix_free/matrix_vector_stokes_base.cc index f4e39338b7..5c23da762c 100644 --- a/tests/matrix_free/matrix_vector_stokes_base.cc +++ b/tests/matrix_free/matrix_vector_stokes_base.cc @@ -20,6 +20,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/block_01.cc b/tests/multigrid-global-coarsening/block_01.cc index 32316620a4..62e6a5d822 100644 --- a/tests/multigrid-global-coarsening/block_01.cc +++ b/tests/multigrid-global-coarsening/block_01.cc @@ -27,6 +27,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/fe_nothing_01.cc b/tests/multigrid-global-coarsening/fe_nothing_01.cc index d64f59ea31..0e0fa8ae3d 100644 --- a/tests/multigrid-global-coarsening/fe_nothing_01.cc +++ b/tests/multigrid-global-coarsening/fe_nothing_01.cc @@ -27,6 +27,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/interpolate_01.cc b/tests/multigrid-global-coarsening/interpolate_01.cc index 0ceb8a9169..238871a2de 100644 --- a/tests/multigrid-global-coarsening/interpolate_01.cc +++ b/tests/multigrid-global-coarsening/interpolate_01.cc @@ -26,6 +26,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/interpolate_to_mg_01.cc b/tests/multigrid-global-coarsening/interpolate_to_mg_01.cc index a30f5b954e..cf6d45c6fc 100644 --- a/tests/multigrid-global-coarsening/interpolate_to_mg_01.cc +++ b/tests/multigrid-global-coarsening/interpolate_to_mg_01.cc @@ -21,6 +21,8 @@ #include +#include + #include #include #include diff --git a/tests/multigrid-global-coarsening/mg_transfer_a_01.cc b/tests/multigrid-global-coarsening/mg_transfer_a_01.cc index 13d3e73c9b..69122d21e0 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_a_01.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_a_01.cc @@ -40,6 +40,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/mg_transfer_a_02.cc b/tests/multigrid-global-coarsening/mg_transfer_a_02.cc index abede4c932..0ad3689f03 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_a_02.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_a_02.cc @@ -26,6 +26,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/mg_transfer_a_03.cc b/tests/multigrid-global-coarsening/mg_transfer_a_03.cc index ca0f35f4e1..9bbcc29c5a 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_a_03.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_a_03.cc @@ -27,6 +27,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/mg_transfer_a_04.cc b/tests/multigrid-global-coarsening/mg_transfer_a_04.cc index 4fd335c5f6..fd3fe9d2f6 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_a_04.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_a_04.cc @@ -24,6 +24,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/mg_transfer_a_05.cc b/tests/multigrid-global-coarsening/mg_transfer_a_05.cc index 3bba3c378f..85e73951e2 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_a_05.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_a_05.cc @@ -29,6 +29,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/mg_transfer_p_01.cc b/tests/multigrid-global-coarsening/mg_transfer_p_01.cc index 11b68190a6..36bb1f901e 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_p_01.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_p_01.cc @@ -40,6 +40,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/mg_transfer_p_02.cc b/tests/multigrid-global-coarsening/mg_transfer_p_02.cc index 297c4ae964..3880b0adb7 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_p_02.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_p_02.cc @@ -40,6 +40,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/mg_transfer_p_03.cc b/tests/multigrid-global-coarsening/mg_transfer_p_03.cc index 73ae1ceaa2..bc6fe62924 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_p_03.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_p_03.cc @@ -26,6 +26,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/mg_transfer_p_04.cc b/tests/multigrid-global-coarsening/mg_transfer_p_04.cc index ad3ef0182d..73a0a79cc7 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_p_04.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_p_04.cc @@ -41,6 +41,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/mg_transfer_p_05.cc b/tests/multigrid-global-coarsening/mg_transfer_p_05.cc index b85f8237b9..8e28009979 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_p_05.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_p_05.cc @@ -40,6 +40,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/mg_transfer_p_06.cc b/tests/multigrid-global-coarsening/mg_transfer_p_06.cc index a636a89627..fa14736439 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_p_06.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_p_06.cc @@ -38,6 +38,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/mg_transfer_p_07.cc b/tests/multigrid-global-coarsening/mg_transfer_p_07.cc index 4fbc8eeb17..5545ce996b 100644 --- a/tests/multigrid-global-coarsening/mg_transfer_p_07.cc +++ b/tests/multigrid-global-coarsening/mg_transfer_p_07.cc @@ -24,6 +24,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/non_nested_transfer_01.cc b/tests/multigrid-global-coarsening/non_nested_transfer_01.cc index d31ebd8335..36ffc8d761 100644 --- a/tests/multigrid-global-coarsening/non_nested_transfer_01.cc +++ b/tests/multigrid-global-coarsening/non_nested_transfer_01.cc @@ -41,6 +41,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/non_nested_transfer_02.cc b/tests/multigrid-global-coarsening/non_nested_transfer_02.cc index 5a78d7d483..dc74b2d231 100644 --- a/tests/multigrid-global-coarsening/non_nested_transfer_02.cc +++ b/tests/multigrid-global-coarsening/non_nested_transfer_02.cc @@ -27,6 +27,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/non_nested_transfer_03.cc b/tests/multigrid-global-coarsening/non_nested_transfer_03.cc index c320fca471..0d502c23fc 100644 --- a/tests/multigrid-global-coarsening/non_nested_transfer_03.cc +++ b/tests/multigrid-global-coarsening/non_nested_transfer_03.cc @@ -28,6 +28,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/non_nested_transfer_04.cc b/tests/multigrid-global-coarsening/non_nested_transfer_04.cc index 76b063ea5a..b4ca3029a9 100644 --- a/tests/multigrid-global-coarsening/non_nested_transfer_04.cc +++ b/tests/multigrid-global-coarsening/non_nested_transfer_04.cc @@ -24,6 +24,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/non_nested_transfer_05.cc b/tests/multigrid-global-coarsening/non_nested_transfer_05.cc index 97e0313f48..3cc8135451 100644 --- a/tests/multigrid-global-coarsening/non_nested_transfer_05.cc +++ b/tests/multigrid-global-coarsening/non_nested_transfer_05.cc @@ -30,6 +30,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid-global-coarsening/transfer_matrix_free_04.cc b/tests/multigrid-global-coarsening/transfer_matrix_free_04.cc index 665c50ad71..41f110bbe9 100644 --- a/tests/multigrid-global-coarsening/transfer_matrix_free_04.cc +++ b/tests/multigrid-global-coarsening/transfer_matrix_free_04.cc @@ -20,6 +20,8 @@ #include +#include + #include #include diff --git a/tests/multigrid/constrained_dofs_04.cc b/tests/multigrid/constrained_dofs_04.cc index 22646c3411..b4a45c9d76 100644 --- a/tests/multigrid/constrained_dofs_04.cc +++ b/tests/multigrid/constrained_dofs_04.cc @@ -17,6 +17,8 @@ // check that we get a reasonable error message when trying to call // MGConstrainedDofs::initialize() with distributing level dofs. +#include + #include #include diff --git a/tests/multigrid/constrained_dofs_07.cc b/tests/multigrid/constrained_dofs_07.cc index e6aa5afc55..507eed838c 100644 --- a/tests/multigrid/constrained_dofs_07.cc +++ b/tests/multigrid/constrained_dofs_07.cc @@ -17,6 +17,8 @@ // Check clear_user_constraints() #include +#include + #include #include diff --git a/tests/multigrid/flux_sparsity_pattern_constraints.cc b/tests/multigrid/flux_sparsity_pattern_constraints.cc index d3283f9ad7..6054ced002 100644 --- a/tests/multigrid/flux_sparsity_pattern_constraints.cc +++ b/tests/multigrid/flux_sparsity_pattern_constraints.cc @@ -38,6 +38,7 @@ #include #include +#include #include "../tests.h" diff --git a/tests/multigrid/interface_matrix_entry_01.cc b/tests/multigrid/interface_matrix_entry_01.cc index e808c12f89..458329582a 100644 --- a/tests/multigrid/interface_matrix_entry_01.cc +++ b/tests/multigrid/interface_matrix_entry_01.cc @@ -41,6 +41,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid/interpolate_to_mg_01.cc b/tests/multigrid/interpolate_to_mg_01.cc index a5cd8ff9fd..a77b49aca6 100644 --- a/tests/multigrid/interpolate_to_mg_01.cc +++ b/tests/multigrid/interpolate_to_mg_01.cc @@ -21,6 +21,8 @@ #include +#include + #include #include #include diff --git a/tests/multigrid/max_level_for_coarse_mesh.cc b/tests/multigrid/max_level_for_coarse_mesh.cc index 558853b49b..ec251fe81c 100644 --- a/tests/multigrid/max_level_for_coarse_mesh.cc +++ b/tests/multigrid/max_level_for_coarse_mesh.cc @@ -29,6 +29,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid/mg_stats_01.cc b/tests/multigrid/mg_stats_01.cc index 65de32e0df..58737f2bb9 100644 --- a/tests/multigrid/mg_stats_01.cc +++ b/tests/multigrid/mg_stats_01.cc @@ -28,6 +28,7 @@ #include #include +#include #include #include diff --git a/tests/multigrid/transfer_matrix_free_04.cc b/tests/multigrid/transfer_matrix_free_04.cc index ae3a5c32fe..13481d0bc2 100644 --- a/tests/multigrid/transfer_matrix_free_04.cc +++ b/tests/multigrid/transfer_matrix_free_04.cc @@ -26,6 +26,7 @@ #include +#include #include #include diff --git a/tests/multigrid/transfer_matrix_free_13.cc b/tests/multigrid/transfer_matrix_free_13.cc index 197fa2106b..3f364bf4c7 100644 --- a/tests/multigrid/transfer_matrix_free_13.cc +++ b/tests/multigrid/transfer_matrix_free_13.cc @@ -18,6 +18,8 @@ #include +#include + #include #include diff --git a/tests/multigrid/transfer_prebuilt_05.cc b/tests/multigrid/transfer_prebuilt_05.cc index 7a0239ef6f..45345de78f 100644 --- a/tests/multigrid/transfer_prebuilt_05.cc +++ b/tests/multigrid/transfer_prebuilt_05.cc @@ -18,6 +18,8 @@ #include +#include + #include #include diff --git a/tests/multigrid/workload_imbalance.cc b/tests/multigrid/workload_imbalance.cc index e52294f741..84667507f6 100644 --- a/tests/multigrid/workload_imbalance.cc +++ b/tests/multigrid/workload_imbalance.cc @@ -27,6 +27,7 @@ #include #include +#include #include #include diff --git a/tests/simplex/step-67.cc b/tests/simplex/step-67.cc index 75be730e4c..e6f7dd8fd8 100644 --- a/tests/simplex/step-67.cc +++ b/tests/simplex/step-67.cc @@ -61,6 +61,7 @@ #endif #include +#include #include #include