From a5d55b604f6bfb260993c4ce5bb05e8128b8f638 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Fri, 25 May 2018 17:05:49 -0500 Subject: [PATCH] RCM: Update non_matching: coupling --- include/deal.II/non_matching/coupling.h | 62 ++++++++++++++----------- source/non_matching/coupling.cc | 54 ++++++++++++--------- source/non_matching/coupling.inst.in | 43 ++++++++--------- 3 files changed, 90 insertions(+), 69 deletions(-) diff --git a/include/deal.II/non_matching/coupling.h b/include/deal.II/non_matching/coupling.h index 3b22d4aebc..b8e134abd8 100644 --- a/include/deal.II/non_matching/coupling.h +++ b/include/deal.II/non_matching/coupling.h @@ -28,7 +28,7 @@ #include -#include +#include DEAL_II_NAMESPACE_OPEN @@ -90,15 +90,19 @@ namespace NonMatching * * @author Luca Heltai, 2018 */ - template + template void create_coupling_sparsity_pattern( const DoFHandler &space_dh, const DoFHandler &immersed_dh, const Quadrature & quad, Sparsity & sparsity, - const ConstraintMatrix & constraints = ConstraintMatrix(), - const ComponentMask & space_comps = ComponentMask(), + const AffineConstraints & constraints = AffineConstraints(), + const ComponentMask & space_comps = ComponentMask(), const ComponentMask & immersed_comps = ComponentMask(), const Mapping & space_mapping = StaticMappingQ1::mapping, @@ -113,7 +117,11 @@ namespace NonMatching * * @author Luca Heltai, 2018 */ - template + template void create_coupling_sparsity_pattern( const GridTools::Cache &cache, @@ -121,10 +129,10 @@ namespace NonMatching const DoFHandler & immersed_dh, const Quadrature & quad, Sparsity & sparsity, - const ConstraintMatrix & constraints = ConstraintMatrix(), - const ComponentMask & space_comps = ComponentMask(), - const ComponentMask & immersed_comps = ComponentMask(), - const Mapping & immersed_mapping = + const AffineConstraints &constraints = AffineConstraints(), + const ComponentMask & space_comps = ComponentMask(), + const ComponentMask & immersed_comps = ComponentMask(), + const Mapping & immersed_mapping = StaticMappingQ1::mapping); @@ -176,14 +184,15 @@ namespace NonMatching template void create_coupling_mass_matrix( - const DoFHandler &space_dh, - const DoFHandler &immersed_dh, - const Quadrature & quad, - Matrix & matrix, - const ConstraintMatrix & constraints = ConstraintMatrix(), - const ComponentMask & space_comps = ComponentMask(), - const ComponentMask & immersed_comps = ComponentMask(), - const Mapping & space_mapping = + const DoFHandler & space_dh, + const DoFHandler & immersed_dh, + const Quadrature & quad, + Matrix & matrix, + const AffineConstraints &constraints = + AffineConstraints(), + const ComponentMask & space_comps = ComponentMask(), + const ComponentMask & immersed_comps = ComponentMask(), + const Mapping &space_mapping = StaticMappingQ1::mapping, const Mapping &immersed_mapping = StaticMappingQ1::mapping); @@ -199,15 +208,16 @@ namespace NonMatching template void create_coupling_mass_matrix( - const GridTools::Cache &cache, - const DoFHandler & space_dh, - const DoFHandler & immersed_dh, - const Quadrature & quad, - Matrix & matrix, - const ConstraintMatrix & constraints = ConstraintMatrix(), - const ComponentMask & space_comps = ComponentMask(), - const ComponentMask & immersed_comps = ComponentMask(), - const Mapping & immersed_mapping = + const GridTools::Cache & cache, + const DoFHandler & space_dh, + const DoFHandler & immersed_dh, + const Quadrature & quad, + Matrix & matrix, + const AffineConstraints &constraints = + AffineConstraints(), + const ComponentMask & space_comps = ComponentMask(), + const ComponentMask & immersed_comps = ComponentMask(), + const Mapping &immersed_mapping = StaticMappingQ1::mapping); } // namespace NonMatching DEAL_II_NAMESPACE_CLOSE diff --git a/source/non_matching/coupling.cc b/source/non_matching/coupling.cc index cc78a61c8a..2e5a07a018 100644 --- a/source/non_matching/coupling.cc +++ b/source/non_matching/coupling.cc @@ -41,14 +41,18 @@ DEAL_II_NAMESPACE_OPEN namespace NonMatching { - template + template void create_coupling_sparsity_pattern( const DoFHandler &space_dh, const DoFHandler &immersed_dh, const Quadrature & quad, Sparsity & sparsity, - const ConstraintMatrix & constraints, + const AffineConstraints & constraints, const ComponentMask & space_comps, const ComponentMask & immersed_comps, const Mapping & space_mapping, @@ -69,7 +73,11 @@ namespace NonMatching - template + template void create_coupling_sparsity_pattern( const GridTools::Cache &cache, @@ -77,7 +85,7 @@ namespace NonMatching const DoFHandler & immersed_dh, const Quadrature & quad, Sparsity & sparsity, - const ConstraintMatrix & constraints, + const AffineConstraints & constraints, const ComponentMask & space_comps, const ComponentMask & immersed_comps, const Mapping & immersed_mapping) @@ -187,15 +195,16 @@ namespace NonMatching template void - create_coupling_mass_matrix(const DoFHandler &space_dh, - const DoFHandler &immersed_dh, - const Quadrature & quad, - Matrix & matrix, - const ConstraintMatrix & constraints, - const ComponentMask & space_comps, - const ComponentMask & immersed_comps, - const Mapping & space_mapping, - const Mapping &immersed_mapping) + create_coupling_mass_matrix( + const DoFHandler & space_dh, + const DoFHandler & immersed_dh, + const Quadrature & quad, + Matrix & matrix, + const AffineConstraints &constraints, + const ComponentMask & space_comps, + const ComponentMask & immersed_comps, + const Mapping & space_mapping, + const Mapping & immersed_mapping) { GridTools::Cache cache(space_dh.get_triangulation(), space_mapping); @@ -214,15 +223,16 @@ namespace NonMatching template void - create_coupling_mass_matrix(const GridTools::Cache &cache, - const DoFHandler & space_dh, - const DoFHandler &immersed_dh, - const Quadrature & quad, - Matrix & matrix, - const ConstraintMatrix & constraints, - const ComponentMask & space_comps, - const ComponentMask & immersed_comps, - const Mapping &immersed_mapping) + create_coupling_mass_matrix( + const GridTools::Cache & cache, + const DoFHandler & space_dh, + const DoFHandler & immersed_dh, + const Quadrature & quad, + Matrix & matrix, + const AffineConstraints &constraints, + const ComponentMask & space_comps, + const ComponentMask & immersed_comps, + const Mapping & immersed_mapping) { AssertDimension(matrix.m(), space_dh.n_dofs()); AssertDimension(matrix.n(), immersed_dh.n_dofs()); diff --git a/source/non_matching/coupling.inst.in b/source/non_matching/coupling.inst.in index 8846120d98..fa3ddaa833 100644 --- a/source/non_matching/coupling.inst.in +++ b/source/non_matching/coupling.inst.in @@ -15,7 +15,8 @@ for (dim0 : DIMENSIONS; dim1 : DIMENSIONS; spacedim : SPACE_DIMENSIONS; - Sparsity : SPARSITY_PATTERNS) + Sparsity : SPARSITY_PATTERNS; + S : REAL_AND_COMPLEX_SCALARS) { #if dim1 <= dim0 && dim0 <= spacedim template void create_coupling_sparsity_pattern( @@ -23,7 +24,7 @@ for (dim0 : DIMENSIONS; dim1 : DIMENSIONS; spacedim : SPACE_DIMENSIONS; const DoFHandler &immersed_dh, const Quadrature & quad, Sparsity & sparsity, - const ConstraintMatrix & constraints, + const AffineConstraints & constraints, const ComponentMask & space_comps, const ComponentMask & immersed_comps, const Mapping & space_mapping, @@ -35,7 +36,7 @@ for (dim0 : DIMENSIONS; dim1 : DIMENSIONS; spacedim : SPACE_DIMENSIONS; const DoFHandler & immersed_dh, const Quadrature & quad, Sparsity & sparsity, - const ConstraintMatrix & constraints, + const AffineConstraints & constraints, const ComponentMask & space_comps, const ComponentMask & immersed_comps, const Mapping & immersed_mapping); @@ -48,25 +49,25 @@ for (dim0 : DIMENSIONS; dim1 : DIMENSIONS; spacedim : SPACE_DIMENSIONS; { #if dim1 <= dim0 && dim0 <= spacedim template void create_coupling_mass_matrix( - const DoFHandler &space_dh, - const DoFHandler &immersed_dh, - const Quadrature & quad, - Matrix & matrix, - const ConstraintMatrix & constraints, - const ComponentMask & space_comps, - const ComponentMask & immersed_comps, - const Mapping & space_mapping, - const Mapping & immersed_mapping); + const DoFHandler & space_dh, + const DoFHandler & immersed_dh, + const Quadrature & quad, + Matrix & matrix, + const AffineConstraints &constraints, + const ComponentMask & space_comps, + const ComponentMask & immersed_comps, + const Mapping & space_mapping, + const Mapping & immersed_mapping); template void create_coupling_mass_matrix( - const GridTools::Cache &cache, - const DoFHandler & space_dh, - const DoFHandler & immersed_dh, - const Quadrature & quad, - Matrix & matrix, - const ConstraintMatrix & constraints, - const ComponentMask & space_comps, - const ComponentMask & immersed_comps, - const Mapping & immersed_mapping); + const GridTools::Cache & cache, + const DoFHandler & space_dh, + const DoFHandler & immersed_dh, + const Quadrature & quad, + Matrix & matrix, + const AffineConstraints &constraints, + const ComponentMask & space_comps, + const ComponentMask & immersed_comps, + const Mapping & immersed_mapping); #endif } -- 2.39.5