]> https://gitweb.dealii.org/ - dealii.git/commitdiff
RCM: Update non_matching: coupling
authorMatthias Maier <tamiko@43-1.org>
Fri, 25 May 2018 22:05:49 +0000 (17:05 -0500)
committerMatthias Maier <tamiko@43-1.org>
Wed, 6 Jun 2018 15:19:38 +0000 (10:19 -0500)
include/deal.II/non_matching/coupling.h
source/non_matching/coupling.cc
source/non_matching/coupling.inst.in

index 3b22d4aebcf15eb1b66f43fc1d07d760071a58da..b8e134abd8f9f415119ffb763c38571044526f53 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <deal.II/grid/grid_tools_cache.h>
 
-#include <deal.II/lac/constraint_matrix.h>
+#include <deal.II/lac/affine_constraints.h>
 
 DEAL_II_NAMESPACE_OPEN
 
@@ -90,15 +90,19 @@ namespace NonMatching
    *
    * @author Luca Heltai, 2018
    */
-  template <int dim0, int dim1, int spacedim, typename Sparsity>
+  template <int dim0,
+            int dim1,
+            int spacedim,
+            typename Sparsity,
+            typename number = double>
   void
   create_coupling_sparsity_pattern(
     const DoFHandler<dim0, spacedim> &space_dh,
     const DoFHandler<dim1, spacedim> &immersed_dh,
     const Quadrature<dim1> &          quad,
     Sparsity &                        sparsity,
-    const ConstraintMatrix &          constraints    = ConstraintMatrix(),
-    const ComponentMask &             space_comps    = ComponentMask(),
+    const AffineConstraints<number> & constraints = AffineConstraints<number>(),
+    const ComponentMask &             space_comps = ComponentMask(),
     const ComponentMask &             immersed_comps = ComponentMask(),
     const Mapping<dim0, spacedim> &   space_mapping =
       StaticMappingQ1<dim0, spacedim>::mapping,
@@ -113,7 +117,11 @@ namespace NonMatching
    *
    * @author Luca Heltai, 2018
    */
-  template <int dim0, int dim1, int spacedim, typename Sparsity>
+  template <int dim0,
+            int dim1,
+            int spacedim,
+            typename Sparsity,
+            typename number = double>
   void
   create_coupling_sparsity_pattern(
     const GridTools::Cache<dim0, spacedim> &cache,
@@ -121,10 +129,10 @@ namespace NonMatching
     const DoFHandler<dim1, spacedim> &      immersed_dh,
     const Quadrature<dim1> &                quad,
     Sparsity &                              sparsity,
-    const ConstraintMatrix &                constraints    = ConstraintMatrix(),
-    const ComponentMask &                   space_comps    = ComponentMask(),
-    const ComponentMask &                   immersed_comps = ComponentMask(),
-    const Mapping<dim1, spacedim> &         immersed_mapping =
+    const AffineConstraints<number> &constraints = AffineConstraints<number>(),
+    const ComponentMask &            space_comps = ComponentMask(),
+    const ComponentMask &            immersed_comps = ComponentMask(),
+    const Mapping<dim1, spacedim> &  immersed_mapping =
       StaticMappingQ1<dim1, spacedim>::mapping);
 
 
@@ -176,14 +184,15 @@ namespace NonMatching
   template <int dim0, int dim1, int spacedim, typename Matrix>
   void
   create_coupling_mass_matrix(
-    const DoFHandler<dim0, spacedim> &space_dh,
-    const DoFHandler<dim1, spacedim> &immersed_dh,
-    const Quadrature<dim1> &          quad,
-    Matrix &                          matrix,
-    const ConstraintMatrix &          constraints    = ConstraintMatrix(),
-    const ComponentMask &             space_comps    = ComponentMask(),
-    const ComponentMask &             immersed_comps = ComponentMask(),
-    const Mapping<dim0, spacedim> &   space_mapping =
+    const DoFHandler<dim0, spacedim> &                    space_dh,
+    const DoFHandler<dim1, spacedim> &                    immersed_dh,
+    const Quadrature<dim1> &                              quad,
+    Matrix &                                              matrix,
+    const AffineConstraints<typename Matrix::value_type> &constraints =
+      AffineConstraints<typename Matrix::value_type>(),
+    const ComponentMask &          space_comps    = ComponentMask(),
+    const ComponentMask &          immersed_comps = ComponentMask(),
+    const Mapping<dim0, spacedim> &space_mapping =
       StaticMappingQ1<dim0, spacedim>::mapping,
     const Mapping<dim1, spacedim> &immersed_mapping =
       StaticMappingQ1<dim1, spacedim>::mapping);
@@ -199,15 +208,16 @@ namespace NonMatching
   template <int dim0, int dim1, int spacedim, typename Matrix>
   void
   create_coupling_mass_matrix(
-    const GridTools::Cache<dim0, spacedim> &cache,
-    const DoFHandler<dim0, spacedim> &      space_dh,
-    const DoFHandler<dim1, spacedim> &      immersed_dh,
-    const Quadrature<dim1> &                quad,
-    Matrix &                                matrix,
-    const ConstraintMatrix &                constraints    = ConstraintMatrix(),
-    const ComponentMask &                   space_comps    = ComponentMask(),
-    const ComponentMask &                   immersed_comps = ComponentMask(),
-    const Mapping<dim1, spacedim> &         immersed_mapping =
+    const GridTools::Cache<dim0, spacedim> &              cache,
+    const DoFHandler<dim0, spacedim> &                    space_dh,
+    const DoFHandler<dim1, spacedim> &                    immersed_dh,
+    const Quadrature<dim1> &                              quad,
+    Matrix &                                              matrix,
+    const AffineConstraints<typename Matrix::value_type> &constraints =
+      AffineConstraints<typename Matrix::value_type>(),
+    const ComponentMask &          space_comps    = ComponentMask(),
+    const ComponentMask &          immersed_comps = ComponentMask(),
+    const Mapping<dim1, spacedim> &immersed_mapping =
       StaticMappingQ1<dim1, spacedim>::mapping);
 } // namespace NonMatching
 DEAL_II_NAMESPACE_CLOSE
index cc78a61c8a6d4e85d270fa98205dc63a3434d315..2e5a07a018e6f8a97da6679def33f873312e3dae 100644 (file)
 DEAL_II_NAMESPACE_OPEN
 namespace NonMatching
 {
-  template <int dim0, int dim1, int spacedim, typename Sparsity>
+  template <int dim0,
+            int dim1,
+            int spacedim,
+            typename Sparsity,
+            typename number>
   void
   create_coupling_sparsity_pattern(
     const DoFHandler<dim0, spacedim> &space_dh,
     const DoFHandler<dim1, spacedim> &immersed_dh,
     const Quadrature<dim1> &          quad,
     Sparsity &                        sparsity,
-    const ConstraintMatrix &          constraints,
+    const AffineConstraints<number> & constraints,
     const ComponentMask &             space_comps,
     const ComponentMask &             immersed_comps,
     const Mapping<dim0, spacedim> &   space_mapping,
@@ -69,7 +73,11 @@ namespace NonMatching
 
 
 
-  template <int dim0, int dim1, int spacedim, typename Sparsity>
+  template <int dim0,
+            int dim1,
+            int spacedim,
+            typename Sparsity,
+            typename number>
   void
   create_coupling_sparsity_pattern(
     const GridTools::Cache<dim0, spacedim> &cache,
@@ -77,7 +85,7 @@ namespace NonMatching
     const DoFHandler<dim1, spacedim> &      immersed_dh,
     const Quadrature<dim1> &                quad,
     Sparsity &                              sparsity,
-    const ConstraintMatrix &                constraints,
+    const AffineConstraints<number> &       constraints,
     const ComponentMask &                   space_comps,
     const ComponentMask &                   immersed_comps,
     const Mapping<dim1, spacedim> &         immersed_mapping)
@@ -187,15 +195,16 @@ namespace NonMatching
 
   template <int dim0, int dim1, int spacedim, typename Matrix>
   void
-  create_coupling_mass_matrix(const DoFHandler<dim0, spacedim> &space_dh,
-                              const DoFHandler<dim1, spacedim> &immersed_dh,
-                              const Quadrature<dim1> &          quad,
-                              Matrix &                          matrix,
-                              const ConstraintMatrix &          constraints,
-                              const ComponentMask &             space_comps,
-                              const ComponentMask &             immersed_comps,
-                              const Mapping<dim0, spacedim> &   space_mapping,
-                              const Mapping<dim1, spacedim> &immersed_mapping)
+  create_coupling_mass_matrix(
+    const DoFHandler<dim0, spacedim> &                    space_dh,
+    const DoFHandler<dim1, spacedim> &                    immersed_dh,
+    const Quadrature<dim1> &                              quad,
+    Matrix &                                              matrix,
+    const AffineConstraints<typename Matrix::value_type> &constraints,
+    const ComponentMask &                                 space_comps,
+    const ComponentMask &                                 immersed_comps,
+    const Mapping<dim0, spacedim> &                       space_mapping,
+    const Mapping<dim1, spacedim> &                       immersed_mapping)
   {
     GridTools::Cache<dim0, spacedim> cache(space_dh.get_triangulation(),
                                            space_mapping);
@@ -214,15 +223,16 @@ namespace NonMatching
 
   template <int dim0, int dim1, int spacedim, typename Matrix>
   void
-  create_coupling_mass_matrix(const GridTools::Cache<dim0, spacedim> &cache,
-                              const DoFHandler<dim0, spacedim> &      space_dh,
-                              const DoFHandler<dim1, spacedim> &immersed_dh,
-                              const Quadrature<dim1> &          quad,
-                              Matrix &                          matrix,
-                              const ConstraintMatrix &          constraints,
-                              const ComponentMask &             space_comps,
-                              const ComponentMask &             immersed_comps,
-                              const Mapping<dim1, spacedim> &immersed_mapping)
+  create_coupling_mass_matrix(
+    const GridTools::Cache<dim0, spacedim> &              cache,
+    const DoFHandler<dim0, spacedim> &                    space_dh,
+    const DoFHandler<dim1, spacedim> &                    immersed_dh,
+    const Quadrature<dim1> &                              quad,
+    Matrix &                                              matrix,
+    const AffineConstraints<typename Matrix::value_type> &constraints,
+    const ComponentMask &                                 space_comps,
+    const ComponentMask &                                 immersed_comps,
+    const Mapping<dim1, spacedim> &                       immersed_mapping)
   {
     AssertDimension(matrix.m(), space_dh.n_dofs());
     AssertDimension(matrix.n(), immersed_dh.n_dofs());
index 8846120d98cc61268fb866b9c5f00b94195be37c..fa3ddaa833230ecd540f779a6234bed1102456dd 100644 (file)
@@ -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<dim1, spacedim> &immersed_dh,
       const Quadrature<dim1> &          quad,
       Sparsity &                        sparsity,
-      const ConstraintMatrix &          constraints,
+      const AffineConstraints<S> &      constraints,
       const ComponentMask &             space_comps,
       const ComponentMask &             immersed_comps,
       const Mapping<dim0, spacedim> &   space_mapping,
@@ -35,7 +36,7 @@ for (dim0 : DIMENSIONS; dim1 : DIMENSIONS; spacedim : SPACE_DIMENSIONS;
       const DoFHandler<dim1, spacedim> &      immersed_dh,
       const Quadrature<dim1> &                quad,
       Sparsity &                              sparsity,
-      const ConstraintMatrix &                constraints,
+      const AffineConstraints<S> &            constraints,
       const ComponentMask &                   space_comps,
       const ComponentMask &                   immersed_comps,
       const Mapping<dim1, spacedim> &         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<dim0, spacedim> &space_dh,
-      const DoFHandler<dim1, spacedim> &immersed_dh,
-      const Quadrature<dim1> &          quad,
-      Matrix &                          matrix,
-      const ConstraintMatrix &          constraints,
-      const ComponentMask &             space_comps,
-      const ComponentMask &             immersed_comps,
-      const Mapping<dim0, spacedim> &   space_mapping,
-      const Mapping<dim1, spacedim> &   immersed_mapping);
+      const DoFHandler<dim0, spacedim> &           space_dh,
+      const DoFHandler<dim1, spacedim> &           immersed_dh,
+      const Quadrature<dim1> &                     quad,
+      Matrix &                                     matrix,
+      const AffineConstraints<Matrix::value_type> &constraints,
+      const ComponentMask &                        space_comps,
+      const ComponentMask &                        immersed_comps,
+      const Mapping<dim0, spacedim> &              space_mapping,
+      const Mapping<dim1, spacedim> &              immersed_mapping);
 
     template void create_coupling_mass_matrix(
-      const GridTools::Cache<dim0, spacedim> &cache,
-      const DoFHandler<dim0, spacedim> &      space_dh,
-      const DoFHandler<dim1, spacedim> &      immersed_dh,
-      const Quadrature<dim1> &                quad,
-      Matrix &                                matrix,
-      const ConstraintMatrix &                constraints,
-      const ComponentMask &                   space_comps,
-      const ComponentMask &                   immersed_comps,
-      const Mapping<dim1, spacedim> &         immersed_mapping);
+      const GridTools::Cache<dim0, spacedim> &     cache,
+      const DoFHandler<dim0, spacedim> &           space_dh,
+      const DoFHandler<dim1, spacedim> &           immersed_dh,
+      const Quadrature<dim1> &                     quad,
+      Matrix &                                     matrix,
+      const AffineConstraints<Matrix::value_type> &constraints,
+      const ComponentMask &                        space_comps,
+      const ComponentMask &                        immersed_comps,
+      const Mapping<dim1, spacedim> &              immersed_mapping);
 #endif
   }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.