]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Instantiate make_periodicity_constraints for all scalar numbers 13652/head
authorMartin Kronbichler <martin.kronbichler@uni-a.de>
Thu, 28 Apr 2022 12:49:42 +0000 (14:49 +0200)
committerMartin Kronbichler <martin.kronbichler@uni-a.de>
Thu, 28 Apr 2022 12:49:42 +0000 (14:49 +0200)
source/dofs/dof_tools_constraints.cc
source/dofs/dof_tools_constraints.inst.in

index 589d93c0b9eedf56b9fe3806347f535cb15f40eb..244fc6bf0829d01aad529141b923d84d5483cddc 100644 (file)
@@ -2140,7 +2140,7 @@ namespace DoFTools
 
           if (constraints_are_cyclic)
             {
-              if (std::abs(cycle_constraint_factor - 1.) > eps)
+              if (std::abs(cycle_constraint_factor - number(1.)) > eps)
                 affine_constraints.add_line(dof_left);
             }
           else
@@ -2169,10 +2169,10 @@ namespace DoFTools
               // just very small due to roundoff. Of course, constraining x2 in
               // terms of x1 has the same problem. So one chooses x1 = b/a*x2 if
               // |b|<|a|, and x2 = a/b*x1 if |a|<|b|.
-              Assert(
-                std::abs(constraint_factor) < 1e10,
-                ExcMessage(
-                  "The periodicity constraint is too large. The parameter periodicity_factor might be too large or too small."));
+              Assert(std::abs(constraint_factor) < 1e10,
+                     ExcMessage("The periodicity constraint is too large. "
+                                "The parameter periodicity_factor might "
+                                "be too large or too small."));
             }
         } /* for dofs_per_face */
     }
index f583f5abf3e7272d09644ab8b22c1b66a7349f6d..43ac1d6d71ea50388ad9538c09e21e035ee4f78d 100644 (file)
@@ -13,7 +13,8 @@
 //
 // ---------------------------------------------------------------------
 
-for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
+for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
+     S : REAL_AND_COMPLEX_SCALARS)
   {
 #if deal_II_dimension <= deal_II_space_dimension
     template void DoFTools::make_periodicity_constraints(
@@ -21,99 +22,49 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
                        deal_II_space_dimension>::face_iterator &,
       const DoFHandler<deal_II_dimension,
                        deal_II_space_dimension>::face_iterator &,
-      AffineConstraints<double> &,
-      const ComponentMask &,
-      bool,
-      bool,
-      bool,
-      const FullMatrix<double> &,
-      const std::vector<unsigned int> &,
-      const double);
-
-#  ifdef DEAL_II_WITH_COMPLEX_VALUES
-    template void DoFTools::make_periodicity_constraints(
-      const DoFHandler<deal_II_dimension,
-                       deal_II_space_dimension>::face_iterator &,
-      const DoFHandler<deal_II_dimension,
-                       deal_II_space_dimension>::face_iterator &,
-      AffineConstraints<std::complex<double>> &,
+      AffineConstraints<S> &,
       const ComponentMask &,
       bool,
       bool,
       bool,
       const FullMatrix<double> &,
       const std::vector<unsigned int> &,
-      std::complex<double>);
-#  endif
+      const S);
 #endif
   }
 
-for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
+for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
+     S : REAL_AND_COMPLEX_SCALARS)
   {
 #if deal_II_dimension <= deal_II_space_dimension
     template void
     DoFTools::make_periodicity_constraints<deal_II_dimension,
                                            deal_II_space_dimension,
-                                           double>(
-      const std::vector<GridTools::PeriodicFacePair<
-        DoFHandler<deal_II_dimension, deal_II_space_dimension>::cell_iterator>>
-        &,
-      AffineConstraints<double> &,
-      const ComponentMask &,
-      const std::vector<unsigned int> &,
-      const double);
-
-#  ifdef DEAL_II_WITH_COMPLEX_VALUES
-    template void
-    DoFTools::make_periodicity_constraints<deal_II_dimension,
-                                           deal_II_space_dimension,
-                                           std::complex<double>>(
+                                           S>(
       const std::vector<GridTools::PeriodicFacePair<
         DoFHandler<deal_II_dimension, deal_II_space_dimension>::cell_iterator>>
         &,
-      AffineConstraints<std::complex<double>> &,
+      AffineConstraints<S> &,
       const ComponentMask &,
       const std::vector<unsigned int> &,
-      const std::complex<double>);
-#  endif
-
-    template void DoFTools::make_periodicity_constraints(
-      const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
-      const types::boundary_id,
-      const types::boundary_id,
-      const unsigned int,
-      AffineConstraints<double> &,
-      const ComponentMask &,
-      const double);
+      const S);
 
-#  ifdef DEAL_II_WITH_COMPLEX_VALUES
     template void DoFTools::make_periodicity_constraints(
       const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
       const types::boundary_id,
       const types::boundary_id,
       const unsigned int,
-      AffineConstraints<std::complex<double>> &,
-      const ComponentMask &,
-      const std::complex<double>);
-#  endif
-
-    template void DoFTools::make_periodicity_constraints(
-      const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
-      const types::boundary_id,
-      const unsigned int,
-      AffineConstraints<double> &,
+      AffineConstraints<S> &,
       const ComponentMask &,
-      const double);
+      const S);
 
-#  ifdef DEAL_II_WITH_COMPLEX_VALUES
     template void DoFTools::make_periodicity_constraints(
       const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
       const types::boundary_id,
       const unsigned int,
-      AffineConstraints<std::complex<double>> &,
+      AffineConstraints<S> &,
       const ComponentMask &,
-      const std::complex<double>);
-#  endif
+      const S);
 #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.