From bf6c6ffa31053e6ec5c8ec03073c9714a41ec797 Mon Sep 17 00:00:00 2001 From: David Wells Date: Fri, 4 Nov 2022 22:10:56 -0400 Subject: [PATCH] NonMatching: Remove template on sparsity pattern type. This is no longer necessary since all of our SparsityPatterns inherit from SparsityPatternBase. This file was previously the most expensive to compile in the entire library so cutting down the number of instantiations by a factor of 4 or 6 (with Trilinos) is quite nice. --- include/deal.II/non_matching/coupling.h | 24 ++++++------------------ source/non_matching/coupling.cc | 24 ++++++------------------ source/non_matching/coupling.inst.in | 7 +++---- 3 files changed, 15 insertions(+), 40 deletions(-) diff --git a/include/deal.II/non_matching/coupling.h b/include/deal.II/non_matching/coupling.h index 4d4c1d5fb2..a00b00ef71 100644 --- a/include/deal.II/non_matching/coupling.h +++ b/include/deal.II/non_matching/coupling.h @@ -90,17 +90,13 @@ namespace NonMatching * See the tutorial program step-60 for an example on how to use this * function. */ - template + template void create_coupling_sparsity_pattern( const DoFHandler &space_dh, const DoFHandler &immersed_dh, const Quadrature & quad, - Sparsity & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints & constraints = AffineConstraints(), const ComponentMask & space_comps = ComponentMask(), const ComponentMask & immersed_comps = ComponentMask(), @@ -117,18 +113,14 @@ namespace NonMatching * space_mapping cannot be specified, since it is taken from the @p cache * parameter. */ - template + template void create_coupling_sparsity_pattern( const GridTools::Cache &cache, const DoFHandler & space_dh, const DoFHandler & immersed_dh, const Quadrature & quad, - Sparsity & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints &constraints = AffineConstraints(), const ComponentMask & space_comps = ComponentMask(), const ComponentMask & immersed_comps = ComponentMask(), @@ -269,11 +261,7 @@ namespace NonMatching * restrictive conditions are required on the two spaces. See the * documentation of the other create_coupling_sparsity_pattern() function. */ - template + template void create_coupling_sparsity_pattern( const double & epsilon, @@ -282,7 +270,7 @@ namespace NonMatching const DoFHandler & dh0, const DoFHandler & dh1, const Quadrature & quad, - Sparsity & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints &constraints0 = AffineConstraints(), const ComponentMask & comps0 = ComponentMask(), const ComponentMask & comps1 = ComponentMask()); diff --git a/source/non_matching/coupling.cc b/source/non_matching/coupling.cc index d433dec087..e90811c1b8 100644 --- a/source/non_matching/coupling.cc +++ b/source/non_matching/coupling.cc @@ -169,17 +169,13 @@ namespace NonMatching } } // namespace internal - template + template void create_coupling_sparsity_pattern( const DoFHandler &space_dh, const DoFHandler &immersed_dh, const Quadrature & quad, - Sparsity & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints & constraints, const ComponentMask & space_comps, const ComponentMask & immersed_comps, @@ -203,18 +199,14 @@ namespace NonMatching - template + template void create_coupling_sparsity_pattern( const GridTools::Cache &cache, const DoFHandler & space_dh, const DoFHandler & immersed_dh, const Quadrature & quad, - Sparsity & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints & constraints, const ComponentMask & space_comps, const ComponentMask & immersed_comps, @@ -626,11 +618,7 @@ namespace NonMatching } } - template + template void create_coupling_sparsity_pattern( const double & epsilon, @@ -639,7 +627,7 @@ namespace NonMatching const DoFHandler & dh0, const DoFHandler & dh1, const Quadrature & quad, - Sparsity & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints & constraints0, const ComponentMask & comps0, const ComponentMask & comps1) diff --git a/source/non_matching/coupling.inst.in b/source/non_matching/coupling.inst.in index d5ff79b4f9..712442fc65 100644 --- a/source/non_matching/coupling.inst.in +++ b/source/non_matching/coupling.inst.in @@ -15,7 +15,6 @@ for (dim0 : DIMENSIONS; dim1 : DIMENSIONS; spacedim : SPACE_DIMENSIONS; - Sparsity : SPARSITY_PATTERNS; S : REAL_AND_COMPLEX_SCALARS) { #if dim1 <= spacedim && dim0 <= spacedim @@ -23,7 +22,7 @@ for (dim0 : DIMENSIONS; dim1 : DIMENSIONS; spacedim : SPACE_DIMENSIONS; const DoFHandler &space_dh, const DoFHandler &immersed_dh, const Quadrature & quad, - Sparsity & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints & constraints, const ComponentMask & space_comps, const ComponentMask & immersed_comps, @@ -36,7 +35,7 @@ for (dim0 : DIMENSIONS; dim1 : DIMENSIONS; spacedim : SPACE_DIMENSIONS; const DoFHandler & space_dh, const DoFHandler & immersed_dh, const Quadrature & quad, - Sparsity & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints & constraints, const ComponentMask & space_comps, const ComponentMask & immersed_comps, @@ -50,7 +49,7 @@ for (dim0 : DIMENSIONS; dim1 : DIMENSIONS; spacedim : SPACE_DIMENSIONS; const DoFHandler & dh0, const DoFHandler & dh1, const Quadrature & quad, - Sparsity & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints & constraints0, const ComponentMask & comps0, const ComponentMask & comps1); -- 2.39.5