From dfd894b58f60b32f5620da08a1dede25526c48b0 Mon Sep 17 00:00:00 2001
From: Wolfgang Bangerth <bangerth@colostate.edu>
Date: Mon, 21 Aug 2023 16:50:55 -0600
Subject: [PATCH] Be more terse about AffineConstraint default arguments.

---
 include/deal.II/dofs/dof_tools.h         |  6 +++---
 include/deal.II/lac/affine_constraints.h |  3 +--
 include/deal.II/multigrid/mg_tools.h     | 22 ++++++++++------------
 include/deal.II/non_matching/coupling.h  | 12 ++++++------
 4 files changed, 20 insertions(+), 23 deletions(-)

diff --git a/include/deal.II/dofs/dof_tools.h b/include/deal.II/dofs/dof_tools.h
index bcfafffd04..722400f2dc 100644
--- a/include/deal.II/dofs/dof_tools.h
+++ b/include/deal.II/dofs/dof_tools.h
@@ -424,7 +424,7 @@ namespace DoFTools
   make_sparsity_pattern(
     const DoFHandler<dim, spacedim> &dof_handler,
     SparsityPatternBase &            sparsity_pattern,
-    const AffineConstraints<number> &constraints = AffineConstraints<number>(),
+    const AffineConstraints<number> &constraints           = {},
     const bool                       keep_constrained_dofs = true,
     const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id);
 
@@ -499,7 +499,7 @@ namespace DoFTools
     const DoFHandler<dim, spacedim> &dof_handler,
     const Table<2, Coupling> &       coupling,
     SparsityPatternBase &            sparsity_pattern,
-    const AffineConstraints<number> &constraints = AffineConstraints<number>(),
+    const AffineConstraints<number> &constraints           = {},
     const bool                       keep_constrained_dofs = true,
     const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id);
 
@@ -1378,7 +1378,7 @@ namespace DoFTools
     const std::function<
       bool(const typename DoFHandler<dim, spacedim>::active_cell_iterator &)>
       &                              predicate,
-    const AffineConstraints<number> &constraints = AffineConstraints<number>());
+    const AffineConstraints<number> &constraints = {});
 
   /**
    * Extract a vector that represents the constant modes of the DoFHandler for
diff --git a/include/deal.II/lac/affine_constraints.h b/include/deal.II/lac/affine_constraints.h
index 9f0f61d7d7..8c1036bcb9 100644
--- a/include/deal.II/lac/affine_constraints.h
+++ b/include/deal.II/lac/affine_constraints.h
@@ -557,8 +557,7 @@ public:
    * for the locally relevant DoFs, see
    * @ref GlossLocallyRelevantDof .)
    * Consequently, this constructor creates internal data structures for
-   * <i>all</i> possible
-   * indices will be created, leading to memory consumption on every
+   * <i>all</i> possible indices, leading to memory consumption on every
    * processor that is proportional to the <i>overall</i> size of the
    * problem, not just proportional to the size of the portion of the
    * overall problem that is handled by the current processor. Calling
diff --git a/include/deal.II/multigrid/mg_tools.h b/include/deal.II/multigrid/mg_tools.h
index 63b3c5e514..e16b3330af 100644
--- a/include/deal.II/multigrid/mg_tools.h
+++ b/include/deal.II/multigrid/mg_tools.h
@@ -88,12 +88,11 @@ namespace MGTools
    */
   template <int dim, int spacedim, typename number = double>
   void
-  make_sparsity_pattern(
-    const DoFHandler<dim, spacedim> &dof_handler,
-    SparsityPatternBase &            sparsity,
-    const unsigned int               level,
-    const AffineConstraints<number> &constraints = AffineConstraints<number>(),
-    const bool                       keep_constrained_dofs = true);
+  make_sparsity_pattern(const DoFHandler<dim, spacedim> &dof_handler,
+                        SparsityPatternBase &            sparsity,
+                        const unsigned int               level,
+                        const AffineConstraints<number> &constraints = {},
+                        const bool keep_constrained_dofs             = true);
 
   /**
    * Make a sparsity pattern including fluxes of discontinuous Galerkin
@@ -105,12 +104,11 @@ namespace MGTools
    */
   template <int dim, int spacedim, typename number = double>
   void
-  make_flux_sparsity_pattern(
-    const DoFHandler<dim, spacedim> &dof_handler,
-    SparsityPatternBase &            sparsity,
-    const unsigned int               level,
-    const AffineConstraints<number> &constraints = AffineConstraints<number>(),
-    const bool                       keep_constrained_dofs = true);
+  make_flux_sparsity_pattern(const DoFHandler<dim, spacedim> &dof_handler,
+                             SparsityPatternBase &            sparsity,
+                             const unsigned int               level,
+                             const AffineConstraints<number> &constraints = {},
+                             const bool keep_constrained_dofs = true);
 
 
   /**
diff --git a/include/deal.II/non_matching/coupling.h b/include/deal.II/non_matching/coupling.h
index 6517f5b564..88824ee689 100644
--- a/include/deal.II/non_matching/coupling.h
+++ b/include/deal.II/non_matching/coupling.h
@@ -97,8 +97,8 @@ namespace NonMatching
     const DoFHandler<dim1, spacedim> &immersed_dh,
     const Quadrature<dim1> &          quad,
     SparsityPatternBase &             sparsity,
-    const AffineConstraints<number> & constraints = AffineConstraints<number>(),
-    const ComponentMask &             space_comps = {},
+    const AffineConstraints<number> & constraints    = {},
+    const ComponentMask &             space_comps    = {},
     const ComponentMask &             immersed_comps = {},
     const Mapping<dim0, spacedim> &   space_mapping =
       StaticMappingQ1<dim0, spacedim>::mapping,
@@ -121,10 +121,10 @@ namespace NonMatching
     const DoFHandler<dim1, spacedim> &      immersed_dh,
     const Quadrature<dim1> &                quad,
     SparsityPatternBase &                   sparsity,
-    const AffineConstraints<number> &constraints = AffineConstraints<number>(),
-    const ComponentMask &            space_comps = {},
-    const ComponentMask &            immersed_comps = {},
-    const Mapping<dim1, spacedim> &  immersed_mapping =
+    const AffineConstraints<number> &       constraints    = {},
+    const ComponentMask &                   space_comps    = {},
+    const ComponentMask &                   immersed_comps = {},
+    const Mapping<dim1, spacedim> &         immersed_mapping =
       StaticMappingQ1<dim1, spacedim>::mapping,
     const AffineConstraints<number> &immersed_constraints =
       AffineConstraints<number>());
-- 
2.39.5