From dfd894b58f60b32f5620da08a1dede25526c48b0 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth 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 &dof_handler, SparsityPatternBase & sparsity_pattern, - const AffineConstraints &constraints = AffineConstraints(), + const AffineConstraints &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 &dof_handler, const Table<2, Coupling> & coupling, SparsityPatternBase & sparsity_pattern, - const AffineConstraints &constraints = AffineConstraints(), + const AffineConstraints &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::active_cell_iterator &)> & predicate, - const AffineConstraints &constraints = AffineConstraints()); + const AffineConstraints &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 - * all possible - * indices will be created, leading to memory consumption on every + * all possible indices, leading to memory consumption on every * processor that is proportional to the overall 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 void - make_sparsity_pattern( - const DoFHandler &dof_handler, - SparsityPatternBase & sparsity, - const unsigned int level, - const AffineConstraints &constraints = AffineConstraints(), - const bool keep_constrained_dofs = true); + make_sparsity_pattern(const DoFHandler &dof_handler, + SparsityPatternBase & sparsity, + const unsigned int level, + const AffineConstraints &constraints = {}, + const bool keep_constrained_dofs = true); /** * Make a sparsity pattern including fluxes of discontinuous Galerkin @@ -105,12 +104,11 @@ namespace MGTools */ template void - make_flux_sparsity_pattern( - const DoFHandler &dof_handler, - SparsityPatternBase & sparsity, - const unsigned int level, - const AffineConstraints &constraints = AffineConstraints(), - const bool keep_constrained_dofs = true); + make_flux_sparsity_pattern(const DoFHandler &dof_handler, + SparsityPatternBase & sparsity, + const unsigned int level, + const AffineConstraints &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 &immersed_dh, const Quadrature & quad, SparsityPatternBase & sparsity, - const AffineConstraints & constraints = AffineConstraints(), - const ComponentMask & space_comps = {}, + const AffineConstraints & constraints = {}, + const ComponentMask & space_comps = {}, const ComponentMask & immersed_comps = {}, const Mapping & space_mapping = StaticMappingQ1::mapping, @@ -121,10 +121,10 @@ namespace NonMatching const DoFHandler & immersed_dh, const Quadrature & quad, SparsityPatternBase & sparsity, - const AffineConstraints &constraints = AffineConstraints(), - const ComponentMask & space_comps = {}, - const ComponentMask & immersed_comps = {}, - const Mapping & immersed_mapping = + const AffineConstraints & constraints = {}, + const ComponentMask & space_comps = {}, + const ComponentMask & immersed_comps = {}, + const Mapping & immersed_mapping = StaticMappingQ1::mapping, const AffineConstraints &immersed_constraints = AffineConstraints()); -- 2.39.5