]> https://gitweb.dealii.org/ - dealii.git/commitdiff
RCM: Update numerics, part 1: matrix_tools, matrix_creator
authorMatthias Maier <tamiko@43-1.org>
Sat, 26 May 2018 00:52:21 +0000 (19:52 -0500)
committerMatthias Maier <tamiko@43-1.org>
Wed, 6 Jun 2018 15:19:38 +0000 (10:19 -0500)
 - Incompatible change: Change the signature of all mass matrix creator
   functions to matching number types for matrices and right-hand side.

include/deal.II/numerics/matrix_creator.templates.h
include/deal.II/numerics/matrix_tools.h
source/numerics/matrix_creator.inst.in

index f291f7dfcc341be38523021eef04b6cc01bd092e..c6840c8b8576aa58dac8fa1b292990452fac660b 100644 (file)
@@ -134,15 +134,12 @@ namespace MatrixCreator
       template <int dim, int spacedim, typename number>
       struct Scratch
       {
-        Scratch(
-          const ::dealii::hp::FECollection<dim, spacedim> &fe,
-          const UpdateFlags                                update_flags,
-          const Function<spacedim,
-                         typename numbers::NumberTraits<number>::real_type>
-            *                                                   coefficient,
-          const Function<spacedim, number> *                    rhs_function,
-          const ::dealii::hp::QCollection<dim> &                quadrature,
-          const ::dealii::hp::MappingCollection<dim, spacedim> &mapping) :
+        Scratch(const ::dealii::hp::FECollection<dim, spacedim> &fe,
+                const UpdateFlags                                update_flags,
+                const Function<spacedim, number> *               coefficient,
+                const Function<spacedim, number> *               rhs_function,
+                const ::dealii::hp::QCollection<dim> &           quadrature,
+                const ::dealii::hp::MappingCollection<dim, spacedim> &mapping) :
           fe_collection(fe),
           quadrature_collection(quadrature),
           mapping_collection(mapping),
@@ -153,8 +150,7 @@ namespace MatrixCreator
           coefficient_values(quadrature_collection.max_n_quadrature_points()),
           coefficient_vector_values(
             quadrature_collection.max_n_quadrature_points(),
-            dealii::Vector<typename numbers::NumberTraits<number>::real_type>(
-              fe_collection.n_components())),
+            dealii::Vector<number>(fe_collection.n_components())),
           rhs_values(quadrature_collection.max_n_quadrature_points()),
           rhs_vector_values(
             quadrature_collection.max_n_quadrature_points(),
@@ -196,17 +192,12 @@ namespace MatrixCreator
 
         ::dealii::hp::FEValues<dim, spacedim> x_fe_values;
 
-        std::vector<typename numbers::NumberTraits<number>::real_type>
-          coefficient_values;
-        std::vector<
-          dealii::Vector<typename numbers::NumberTraits<number>::real_type>>
-                                            coefficient_vector_values;
+        std::vector<number>                 coefficient_values;
+        std::vector<dealii::Vector<number>> coefficient_vector_values;
         std::vector<number>                 rhs_values;
         std::vector<dealii::Vector<number>> rhs_vector_values;
 
-        const Function<spacedim,
-                       typename numbers::NumberTraits<number>::real_type>
-          *                               coefficient;
+        const Function<spacedim, number> *coefficient;
         const Function<spacedim, number> *rhs_function;
 
         const UpdateFlags update_flags;
@@ -217,10 +208,9 @@ namespace MatrixCreator
       struct CopyData
       {
         std::vector<types::global_dof_index> dof_indices;
-        FullMatrix<typename numbers::NumberTraits<number>::real_type>
-                                cell_matrix;
-        dealii::Vector<number>  cell_rhs;
-        const ConstraintMatrix *constraints;
+        FullMatrix<number>                   cell_matrix;
+        dealii::Vector<number>               cell_rhs;
+        const AffineConstraints<number> *    constraints;
       };
     } // namespace AssemblerData
 
@@ -287,10 +277,7 @@ namespace MatrixCreator
           else
             {
               data.coefficient_vector_values.resize(
-                n_q_points,
-                dealii::Vector<
-                  typename numbers::NumberTraits<number>::real_type>(
-                  n_components));
+                n_q_points, dealii::Vector<number>(n_components));
               data.coefficient->vector_value_list(
                 fe_values.get_quadrature_points(),
                 data.coefficient_vector_values);
@@ -314,9 +301,8 @@ namespace MatrixCreator
               if ((n_components == 1) ||
                   (fe.system_to_component_index(j).first == component_i))
                 {
-                  const double *phi_j = &fe_values.shape_value(j, 0);
-                  typename numbers::NumberTraits<number>::real_type add_data =
-                    0;
+                  const double *phi_j    = &fe_values.shape_value(j, 0);
+                  number        add_data = 0;
                   if (use_coefficient)
                     {
                       if (data.coefficient->n_components == 1)
@@ -363,7 +349,7 @@ namespace MatrixCreator
             // symmetry again
             for (unsigned int j = i; j < dofs_per_cell; ++j)
               {
-                typename numbers::NumberTraits<number>::real_type add_data = 0;
+                number add_data = 0;
                 for (unsigned int comp_i = 0; comp_i < n_components; ++comp_i)
                   if (fe.get_nonzero_components(i)[comp_i] &&
                       fe.get_nonzero_components(j)[comp_i])
@@ -675,10 +661,8 @@ namespace MatrixCreator
         std::vector<types::global_dof_index>          dofs;
         std::vector<std::vector<bool>>                dof_is_on_face;
         typename DoFHandlerType::active_cell_iterator cell;
-        std::vector<
-          FullMatrix<typename numbers::NumberTraits<number>::real_type>>
-                                    cell_matrix;
-        std::vector<Vector<number>> cell_vector;
+        std::vector<FullMatrix<number>>               cell_matrix;
+        std::vector<Vector<number>>                   cell_vector;
       };
 
 
@@ -711,7 +695,7 @@ namespace MatrixCreator
                      const Quadrature<dim> &                 q,
                      SparseMatrix<number> &                  matrix,
                      const Function<spacedim, number> *const coefficient,
-                     const ConstraintMatrix &                constraints)
+                     const AffineConstraints<number> &       constraints)
   {
     Assert(matrix.m() == dof.n_dofs(),
            ExcDimensionMismatch(matrix.m(), dof.n_dofs()));
@@ -767,7 +751,7 @@ namespace MatrixCreator
                      const Quadrature<dim> &                 q,
                      SparseMatrix<number> &                  matrix,
                      const Function<spacedim, number> *const coefficient,
-                     const ConstraintMatrix &                constraints)
+                     const AffineConstraints<number> &       constraints)
   {
     create_mass_matrix(StaticMappingQ1<dim, spacedim>::mapping,
                        dof,
@@ -781,16 +765,14 @@ namespace MatrixCreator
 
   template <int dim, int spacedim, typename number>
   void
-  create_mass_matrix(
-    const Mapping<dim, spacedim> &                                   mapping,
-    const DoFHandler<dim, spacedim> &                                dof,
-    const Quadrature<dim> &                                          q,
-    SparseMatrix<typename numbers::NumberTraits<number>::real_type> &matrix,
-    const Function<spacedim, number> &                               rhs,
-    Vector<number> &                                                 rhs_vector,
-    const Function<spacedim, typename numbers::NumberTraits<number>::real_type>
-      *const                coefficient,
-    const ConstraintMatrix &constraints)
+  create_mass_matrix(const Mapping<dim, spacedim> &          mapping,
+                     const DoFHandler<dim, spacedim> &       dof,
+                     const Quadrature<dim> &                 q,
+                     SparseMatrix<number> &                  matrix,
+                     const Function<spacedim, number> &      rhs,
+                     Vector<number> &                        rhs_vector,
+                     const Function<spacedim, number> *const coefficient,
+                     const AffineConstraints<number> &       constraints)
   {
     Assert(matrix.m() == dof.n_dofs(),
            ExcDimensionMismatch(matrix.m(), dof.n_dofs()));
@@ -827,10 +809,8 @@ namespace MatrixCreator
         typename DoFHandler<dim, spacedim>::active_cell_iterator,
         number>,
       std::bind(
-        &MatrixCreator::internal::copy_local_to_global<
-          number,
-          SparseMatrix<typename numbers::NumberTraits<number>::real_type>,
-          Vector<number>>,
+        &MatrixCreator::internal::
+          copy_local_to_global<number, SparseMatrix<number>, Vector<number>>,
         std::placeholders::_1,
         &matrix,
         &rhs_vector),
@@ -842,15 +822,13 @@ namespace MatrixCreator
 
   template <int dim, int spacedim, typename number>
   void
-  create_mass_matrix(
-    const DoFHandler<dim, spacedim> &                                dof,
-    const Quadrature<dim> &                                          q,
-    SparseMatrix<typename numbers::NumberTraits<number>::real_type> &matrix,
-    const Function<spacedim, number> &                               rhs,
-    Vector<number> &                                                 rhs_vector,
-    const Function<spacedim, typename numbers::NumberTraits<number>::real_type>
-      *const                coefficient,
-    const ConstraintMatrix &constraints)
+  create_mass_matrix(const DoFHandler<dim, spacedim> &       dof,
+                     const Quadrature<dim> &                 q,
+                     SparseMatrix<number> &                  matrix,
+                     const Function<spacedim, number> &      rhs,
+                     Vector<number> &                        rhs_vector,
+                     const Function<spacedim, number> *const coefficient,
+                     const AffineConstraints<number> &       constraints)
   {
     create_mass_matrix(StaticMappingQ1<dim, spacedim>::mapping,
                        dof,
@@ -871,7 +849,7 @@ namespace MatrixCreator
                      const hp::QCollection<dim> &                q,
                      SparseMatrix<number> &                      matrix,
                      const Function<spacedim, number> *const     coefficient,
-                     const ConstraintMatrix &                    constraints)
+                     const AffineConstraints<number> &           constraints)
   {
     Assert(matrix.m() == dof.n_dofs(),
            ExcDimensionMismatch(matrix.m(), dof.n_dofs()));
@@ -923,7 +901,7 @@ namespace MatrixCreator
                      const hp::QCollection<dim> &            q,
                      SparseMatrix<number> &                  matrix,
                      const Function<spacedim, number> *const coefficient,
-                     const ConstraintMatrix &                constraints)
+                     const AffineConstraints<number> &       constraints)
   {
     create_mass_matrix(hp::StaticMappingQ1<dim, spacedim>::mapping_collection,
                        dof,
@@ -937,16 +915,14 @@ namespace MatrixCreator
 
   template <int dim, int spacedim, typename number>
   void
-  create_mass_matrix(
-    const hp::MappingCollection<dim, spacedim> &                     mapping,
-    const hp::DoFHandler<dim, spacedim> &                            dof,
-    const hp::QCollection<dim> &                                     q,
-    SparseMatrix<typename numbers::NumberTraits<number>::real_type> &matrix,
-    const Function<spacedim, number> &                               rhs,
-    Vector<number> &                                                 rhs_vector,
-    const Function<spacedim, typename numbers::NumberTraits<number>::real_type>
-      *const                coefficient,
-    const ConstraintMatrix &constraints)
+  create_mass_matrix(const hp::MappingCollection<dim, spacedim> &mapping,
+                     const hp::DoFHandler<dim, spacedim> &       dof,
+                     const hp::QCollection<dim> &                q,
+                     SparseMatrix<number> &                      matrix,
+                     const Function<spacedim, number> &          rhs,
+                     Vector<number> &                            rhs_vector,
+                     const Function<spacedim, number> *const     coefficient,
+                     const AffineConstraints<number> &           constraints)
   {
     Assert(matrix.m() == dof.n_dofs(),
            ExcDimensionMismatch(matrix.m(), dof.n_dofs()));
@@ -980,10 +956,8 @@ namespace MatrixCreator
         typename hp::DoFHandler<dim, spacedim>::active_cell_iterator,
         number>,
       std::bind(
-        &MatrixCreator::internal::copy_local_to_global<
-          number,
-          SparseMatrix<typename numbers::NumberTraits<number>::real_type>,
-          Vector<number>>,
+        &MatrixCreator::internal::
+          copy_local_to_global<number, SparseMatrix<number>, Vector<number>>,
         std::placeholders::_1,
         &matrix,
         &rhs_vector),
@@ -995,15 +969,13 @@ namespace MatrixCreator
 
   template <int dim, int spacedim, typename number>
   void
-  create_mass_matrix(
-    const hp::DoFHandler<dim, spacedim> &                            dof,
-    const hp::QCollection<dim> &                                     q,
-    SparseMatrix<typename numbers::NumberTraits<number>::real_type> &matrix,
-    const Function<spacedim, number> &                               rhs,
-    Vector<number> &                                                 rhs_vector,
-    const Function<spacedim, typename numbers::NumberTraits<number>::real_type>
-      *const                coefficient,
-    const ConstraintMatrix &constraints)
+  create_mass_matrix(const hp::DoFHandler<dim, spacedim> &   dof,
+                     const hp::QCollection<dim> &            q,
+                     SparseMatrix<number> &                  matrix,
+                     const Function<spacedim, number> &      rhs,
+                     Vector<number> &                        rhs_vector,
+                     const Function<spacedim, number> *const coefficient,
+                     const AffineConstraints<number> &       constraints)
   {
     create_mass_matrix(hp::StaticMappingQ1<dim, spacedim>::mapping_collection,
                        dof,
@@ -1029,11 +1001,9 @@ namespace MatrixCreator
       FiniteElement<dim, spacedim> const &           fe,
       Quadrature<dim - 1> const &                    q,
       std::map<types::boundary_id, const Function<spacedim, number> *> const
-        &boundary_functions,
-      Function<spacedim,
-               typename numbers::NumberTraits<number>::real_type> const
-        *const                         coefficient,
-      std::vector<unsigned int> const &component_mapping)
+        &                                     boundary_functions,
+      Function<spacedim, number> const *const coefficient,
+      std::vector<unsigned int> const &       component_mapping)
 
     {
       // Most assertions for this function are in the calling function
@@ -1056,13 +1026,9 @@ namespace MatrixCreator
 
       // two variables for the coefficient, one for the two cases
       // indicated in the name
-      std::vector<typename numbers::NumberTraits<number>::real_type>
-        coefficient_values(fe_values.n_quadrature_points, 1.);
-      std::vector<Vector<typename numbers::NumberTraits<number>::real_type>>
-        coefficient_vector_values(
-          fe_values.n_quadrature_points,
-          Vector<typename numbers::NumberTraits<number>::real_type>(
-            n_components));
+      std::vector<number> coefficient_values(fe_values.n_quadrature_points, 1.);
+      std::vector<Vector<number>> coefficient_vector_values(
+        fe_values.n_quadrature_points, Vector<number>(n_components));
       const bool coefficient_is_vector =
         (coefficient != nullptr && coefficient->n_components != 1);
 
@@ -1267,8 +1233,8 @@ namespace MatrixCreator
       std::map<types::boundary_id, const Function<spacedim, number> *> const
         &                                         boundary_functions,
       std::vector<types::global_dof_index> const &dof_to_boundary_mapping,
-      SparseMatrix<typename numbers::NumberTraits<number>::real_type> &matrix,
-      Vector<number> &rhs_vector)
+      SparseMatrix<number> &                      matrix,
+      Vector<number> &                            rhs_vector)
     {
       // now transfer cell matrix and vector to the whole boundary matrix
       //
@@ -1377,17 +1343,16 @@ namespace MatrixCreator
   template <int dim, int spacedim, typename number>
   void
   create_boundary_mass_matrix(
-    const Mapping<dim, spacedim> &                                   mapping,
-    const DoFHandler<dim, spacedim> &                                dof,
-    const Quadrature<dim - 1> &                                      q,
-    SparseMatrix<typename numbers::NumberTraits<number>::real_type> &matrix,
+    const Mapping<dim, spacedim> &   mapping,
+    const DoFHandler<dim, spacedim> &dof,
+    const Quadrature<dim - 1> &      q,
+    SparseMatrix<number> &           matrix,
     const std::map<types::boundary_id, const Function<spacedim, number> *>
-      &                                   boundary_functions,
-    Vector<number> &                      rhs_vector,
-    std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-    const Function<spacedim, typename numbers::NumberTraits<number>::real_type>
-      *const                  coefficient,
-    std::vector<unsigned int> component_mapping)
+      &                                     boundary_functions,
+    Vector<number> &                        rhs_vector,
+    std::vector<types::global_dof_index> &  dof_to_boundary_mapping,
+    const Function<spacedim, number> *const coefficient,
+    std::vector<unsigned int>               component_mapping)
   {
     // what would that be in 1d? the
     // identity matrix on the boundary
@@ -1473,11 +1438,9 @@ namespace MatrixCreator
       hp::FECollection<dim, spacedim> const &            fe_collection,
       hp::QCollection<dim - 1> const &                   q,
       const std::map<types::boundary_id, const Function<spacedim, number> *>
-        &boundary_functions,
-      Function<spacedim,
-               typename numbers::NumberTraits<number>::real_type> const
-        *const                         coefficient,
-      std::vector<unsigned int> const &component_mapping)
+        &                                     boundary_functions,
+      Function<spacedim, number> const *const coefficient,
+      std::vector<unsigned int> const &       component_mapping)
     {
       const unsigned int n_components = fe_collection.n_components();
       const unsigned int n_function_components =
@@ -1502,10 +1465,8 @@ namespace MatrixCreator
       // two variables for the coefficient,
       // one for the two cases indicated in
       // the name
-      std::vector<typename numbers::NumberTraits<number>::real_type>
-        coefficient_values;
-      std::vector<Vector<typename numbers::NumberTraits<number>::real_type>>
-        coefficient_vector_values;
+      std::vector<number>         coefficient_values;
+      std::vector<Vector<number>> coefficient_vector_values;
 
       const bool coefficient_is_vector =
         (coefficient != nullptr && coefficient->n_components != 1);
@@ -1545,10 +1506,8 @@ namespace MatrixCreator
             if (fe_is_system)
               // FE has several components
               {
-                coefficient_vector_values.resize(
-                  fe_values.n_quadrature_points,
-                  Vector<typename numbers::NumberTraits<number>::real_type>(
-                    n_components));
+                coefficient_vector_values.resize(fe_values.n_quadrature_points,
+                                                 Vector<number>(n_components));
                 coefficient_values.resize(fe_values.n_quadrature_points, 1.);
 
                 rhs_values_system.resize(fe_values.n_quadrature_points,
@@ -1729,8 +1688,8 @@ namespace MatrixCreator
       std::map<types::boundary_id, const Function<spacedim, number> *> const
         &                                         boundary_functions,
       std::vector<types::global_dof_index> const &dof_to_boundary_mapping,
-      SparseMatrix<typename numbers::NumberTraits<number>::real_type> &matrix,
-      Vector<number> &rhs_vector)
+      SparseMatrix<number> &                      matrix,
+      Vector<number> &                            rhs_vector)
     {
       // now transfer cell matrix and vector to the whole boundary matrix
       //
@@ -1830,15 +1789,14 @@ namespace MatrixCreator
   template <int dim, int spacedim, typename number>
   void
   create_boundary_mass_matrix(
-    const DoFHandler<dim, spacedim> &                                dof,
-    const Quadrature<dim - 1> &                                      q,
-    SparseMatrix<typename numbers::NumberTraits<number>::real_type> &matrix,
+    const DoFHandler<dim, spacedim> &dof,
+    const Quadrature<dim - 1> &      q,
+    SparseMatrix<number> &           matrix,
     const std::map<types::boundary_id, const Function<spacedim, number> *> &rhs,
-    Vector<number> &                      rhs_vector,
-    std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-    const Function<spacedim, typename numbers::NumberTraits<number>::real_type>
-      *const                  a,
-    std::vector<unsigned int> component_mapping)
+    Vector<number> &                        rhs_vector,
+    std::vector<types::global_dof_index> &  dof_to_boundary_mapping,
+    const Function<spacedim, number> *const a,
+    std::vector<unsigned int>               component_mapping)
   {
     create_boundary_mass_matrix(StaticMappingQ1<dim, spacedim>::mapping,
                                 dof,
@@ -1856,17 +1814,16 @@ namespace MatrixCreator
   template <int dim, int spacedim, typename number>
   void
   create_boundary_mass_matrix(
-    const hp::MappingCollection<dim, spacedim> &                     mapping,
-    const hp::DoFHandler<dim, spacedim> &                            dof,
-    const hp::QCollection<dim - 1> &                                 q,
-    SparseMatrix<typename numbers::NumberTraits<number>::real_type> &matrix,
+    const hp::MappingCollection<dim, spacedim> &mapping,
+    const hp::DoFHandler<dim, spacedim> &       dof,
+    const hp::QCollection<dim - 1> &            q,
+    SparseMatrix<number> &                      matrix,
     const std::map<types::boundary_id, const Function<spacedim, number> *>
-      &                                   boundary_functions,
-    Vector<number> &                      rhs_vector,
-    std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-    const Function<spacedim, typename numbers::NumberTraits<number>::real_type>
-      *const                  coefficient,
-    std::vector<unsigned int> component_mapping)
+      &                                     boundary_functions,
+    Vector<number> &                        rhs_vector,
+    std::vector<types::global_dof_index> &  dof_to_boundary_mapping,
+    const Function<spacedim, number> *const coefficient,
+    std::vector<unsigned int>               component_mapping)
   {
     // what would that be in 1d? the
     // identity matrix on the boundary
@@ -1942,15 +1899,14 @@ namespace MatrixCreator
   template <int dim, int spacedim, typename number>
   void
   create_boundary_mass_matrix(
-    const hp::DoFHandler<dim, spacedim> &                            dof,
-    const hp::QCollection<dim - 1> &                                 q,
-    SparseMatrix<typename numbers::NumberTraits<number>::real_type> &matrix,
+    const hp::DoFHandler<dim, spacedim> &dof,
+    const hp::QCollection<dim - 1> &     q,
+    SparseMatrix<number> &               matrix,
     const std::map<types::boundary_id, const Function<spacedim, number> *> &rhs,
-    Vector<number> &                      rhs_vector,
-    std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-    const Function<spacedim, typename numbers::NumberTraits<number>::real_type>
-      *const                  a,
-    std::vector<unsigned int> component_mapping)
+    Vector<number> &                        rhs_vector,
+    std::vector<types::global_dof_index> &  dof_to_boundary_mapping,
+    const Function<spacedim, number> *const a,
+    std::vector<unsigned int>               component_mapping)
   {
     create_boundary_mass_matrix(
       hp::StaticMappingQ1<dim, spacedim>::mapping_collection,
@@ -1973,7 +1929,7 @@ namespace MatrixCreator
                         const Quadrature<dim> &          q,
                         SparseMatrix<double> &           matrix,
                         const Function<spacedim> *const  coefficient,
-                        const ConstraintMatrix &         constraints)
+                        const AffineConstraints<double> &constraints)
   {
     Assert(matrix.m() == dof.n_dofs(),
            ExcDimensionMismatch(matrix.m(), dof.n_dofs()));
@@ -2027,7 +1983,7 @@ namespace MatrixCreator
                         const Quadrature<dim> &          q,
                         SparseMatrix<double> &           matrix,
                         const Function<spacedim> *const  coefficient,
-                        const ConstraintMatrix &         constraints)
+                        const AffineConstraints<double> &constraints)
   {
     create_laplace_matrix(StaticMappingQ1<dim, spacedim>::mapping,
                           dof,
@@ -2048,7 +2004,7 @@ namespace MatrixCreator
                         const Function<spacedim> &       rhs,
                         Vector<double> &                 rhs_vector,
                         const Function<spacedim> *const  coefficient,
-                        const ConstraintMatrix &         constraints)
+                        const AffineConstraints<double> &constraints)
   {
     Assert(matrix.m() == dof.n_dofs(),
            ExcDimensionMismatch(matrix.m(), dof.n_dofs()));
@@ -2103,7 +2059,7 @@ namespace MatrixCreator
                         const Function<spacedim> &       rhs,
                         Vector<double> &                 rhs_vector,
                         const Function<spacedim> *const  coefficient,
-                        const ConstraintMatrix &         constraints)
+                        const AffineConstraints<double> &constraints)
   {
     create_laplace_matrix(StaticMappingQ1<dim, spacedim>::mapping,
                           dof,
@@ -2124,7 +2080,7 @@ namespace MatrixCreator
                         const hp::QCollection<dim> &                q,
                         SparseMatrix<double> &                      matrix,
                         const Function<spacedim> *const             coefficient,
-                        const ConstraintMatrix &                    constraints)
+                        const AffineConstraints<double> &           constraints)
   {
     Assert(matrix.m() == dof.n_dofs(),
            ExcDimensionMismatch(matrix.m(), dof.n_dofs()));
@@ -2175,7 +2131,7 @@ namespace MatrixCreator
                         const hp::QCollection<dim> &         q,
                         SparseMatrix<double> &               matrix,
                         const Function<spacedim> *const      coefficient,
-                        const ConstraintMatrix &             constraints)
+                        const AffineConstraints<double> &    constraints)
   {
     create_laplace_matrix(
       hp::StaticMappingQ1<dim, spacedim>::mapping_collection,
@@ -2197,7 +2153,7 @@ namespace MatrixCreator
                         const Function<spacedim> &                  rhs,
                         Vector<double> &                            rhs_vector,
                         const Function<spacedim> *const             coefficient,
-                        const ConstraintMatrix &                    constraints)
+                        const AffineConstraints<double> &           constraints)
   {
     Assert(matrix.m() == dof.n_dofs(),
            ExcDimensionMismatch(matrix.m(), dof.n_dofs()));
@@ -2249,7 +2205,7 @@ namespace MatrixCreator
                         const Function<spacedim> &           rhs,
                         Vector<double> &                     rhs_vector,
                         const Function<spacedim> *const      coefficient,
-                        const ConstraintMatrix &             constraints)
+                        const AffineConstraints<double> &    constraints)
   {
     create_laplace_matrix(
       hp::StaticMappingQ1<dim, spacedim>::mapping_collection,
index 9a6199337c554a24b3452338e09b5d4765d18190..44f6d70892f0fbe3395dc4f50e84728e3ae9df93 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <deal.II/dofs/function_map.h>
 
-#include <deal.II/lac/constraint_matrix.h>
+#include <deal.II/lac/affine_constraints.h>
 
 #include <map>
 
@@ -126,13 +126,13 @@ namespace TrilinosWrappers
  * hanging nodes are not eliminated. The reason is that you may want to add
  * several matrices and could then condense afterwards only once, instead of
  * for every matrix. To actually do computations with these matrices, you have
- * to condense the matrix using the ConstraintMatrix::condense function; you
+ * to condense the matrix using the AffineConstraints::condense function; you
  * also have to condense the right hand side accordingly and distribute the
  * solution afterwards. Alternatively, you can give an optional argument
- * ConstraintMatrix that writes cell matrix (and vector) entries with
+ * AffineConstraints that writes cell matrix (and vector) entries with
  * distribute_local_to_global into the global matrix and vector. This way,
- * adding several matrices from different sources is more complicated and you
- * should make sure that you do not mix different ways of applying
+ * adding several matrices from different sources is more complicated and
+ * you should make sure that you do not mix different ways of applying
  * constraints. Particular caution is necessary when the given constraint
  * matrix contains inhomogeneous constraints: In that case, the matrix
  * assembled this way must be the only matrix (or you need to assemble the
@@ -252,12 +252,13 @@ namespace MatrixCreator
    */
   template <int dim, int spacedim, typename number>
   void
-  create_mass_matrix(const Mapping<dim, spacedim> &          mapping,
-                     const DoFHandler<dim, spacedim> &       dof,
-                     const Quadrature<dim> &                 q,
-                     SparseMatrix<number> &                  matrix,
-                     const Function<spacedim, number> *const a = nullptr,
-                     const ConstraintMatrix &constraints = ConstraintMatrix());
+  create_mass_matrix(
+    const Mapping<dim, spacedim> &          mapping,
+    const DoFHandler<dim, spacedim> &       dof,
+    const Quadrature<dim> &                 q,
+    SparseMatrix<number> &                  matrix,
+    const Function<spacedim, number> *const a    = nullptr,
+    const AffineConstraints<number> &constraints = AffineConstraints<number>());
 
   /**
    * Call the create_mass_matrix() function, see above, with
@@ -265,11 +266,12 @@ namespace MatrixCreator
    */
   template <int dim, int spacedim, typename number>
   void
-  create_mass_matrix(const DoFHandler<dim, spacedim> &       dof,
-                     const Quadrature<dim> &                 q,
-                     SparseMatrix<number> &                  matrix,
-                     const Function<spacedim, number> *const a = nullptr,
-                     const ConstraintMatrix &constraints = ConstraintMatrix());
+  create_mass_matrix(
+    const DoFHandler<dim, spacedim> &       dof,
+    const Quadrature<dim> &                 q,
+    SparseMatrix<number> &                  matrix,
+    const Function<spacedim, number> *const a    = nullptr,
+    const AffineConstraints<number> &constraints = AffineConstraints<number>());
 
   /**
    * Assemble the mass matrix and a right hand side vector. If no coefficient
@@ -293,15 +295,14 @@ namespace MatrixCreator
   template <int dim, int spacedim, typename number>
   void
   create_mass_matrix(
-    const Mapping<dim, spacedim> &                                   mapping,
-    const DoFHandler<dim, spacedim> &                                dof,
-    const Quadrature<dim> &                                          q,
-    SparseMatrix<typename numbers::NumberTraits<number>::real_type> &matrix,
-    const Function<spacedim, number> &                               rhs,
-    Vector<number> &                                                 rhs_vector,
-    const Function<spacedim, typename numbers::NumberTraits<number>::real_type>
-      *const                a           = nullptr,
-    const ConstraintMatrix &constraints = ConstraintMatrix());
+    const Mapping<dim, spacedim> &          mapping,
+    const DoFHandler<dim, spacedim> &       dof,
+    const Quadrature<dim> &                 q,
+    SparseMatrix<number> &                  matrix,
+    const Function<spacedim, number> &      rhs,
+    Vector<number> &                        rhs_vector,
+    const Function<spacedim, number> *const a    = nullptr,
+    const AffineConstraints<number> &constraints = AffineConstraints<number>());
 
   /**
    * Call the create_mass_matrix() function, see above, with
@@ -310,37 +311,38 @@ namespace MatrixCreator
   template <int dim, int spacedim, typename number>
   void
   create_mass_matrix(
-    const DoFHandler<dim, spacedim> &                                dof,
-    const Quadrature<dim> &                                          q,
-    SparseMatrix<typename numbers::NumberTraits<number>::real_type> &matrix,
-    const Function<spacedim, number> &                               rhs,
-    Vector<number> &                                                 rhs_vector,
-    const Function<spacedim, typename numbers::NumberTraits<number>::real_type>
-      *const                a           = nullptr,
-    const ConstraintMatrix &constraints = ConstraintMatrix());
+    const DoFHandler<dim, spacedim> &       dof,
+    const Quadrature<dim> &                 q,
+    SparseMatrix<number> &                  matrix,
+    const Function<spacedim, number> &      rhs,
+    Vector<number> &                        rhs_vector,
+    const Function<spacedim, number> *const a    = nullptr,
+    const AffineConstraints<number> &constraints = AffineConstraints<number>());
 
   /**
    * Same function as above, but for hp objects.
    */
   template <int dim, int spacedim, typename number>
   void
-  create_mass_matrix(const hp::MappingCollection<dim, spacedim> &mapping,
-                     const hp::DoFHandler<dim, spacedim> &       dof,
-                     const hp::QCollection<dim> &                q,
-                     SparseMatrix<number> &                      matrix,
-                     const Function<spacedim, number> *const     a = nullptr,
-                     const ConstraintMatrix &constraints = ConstraintMatrix());
+  create_mass_matrix(
+    const hp::MappingCollection<dim, spacedim> &mapping,
+    const hp::DoFHandler<dim, spacedim> &       dof,
+    const hp::QCollection<dim> &                q,
+    SparseMatrix<number> &                      matrix,
+    const Function<spacedim, number> *const     a = nullptr,
+    const AffineConstraints<number> &constraints = AffineConstraints<number>());
 
   /**
    * Same function as above, but for hp objects.
    */
   template <int dim, int spacedim, typename number>
   void
-  create_mass_matrix(const hp::DoFHandler<dim, spacedim> &   dof,
-                     const hp::QCollection<dim> &            q,
-                     SparseMatrix<number> &                  matrix,
-                     const Function<spacedim, number> *const a = nullptr,
-                     const ConstraintMatrix &constraints = ConstraintMatrix());
+  create_mass_matrix(
+    const hp::DoFHandler<dim, spacedim> &   dof,
+    const hp::QCollection<dim> &            q,
+    SparseMatrix<number> &                  matrix,
+    const Function<spacedim, number> *const a    = nullptr,
+    const AffineConstraints<number> &constraints = AffineConstraints<number>());
 
   /**
    * Same function as above, but for hp objects.
@@ -348,15 +350,14 @@ namespace MatrixCreator
   template <int dim, int spacedim, typename number>
   void
   create_mass_matrix(
-    const hp::MappingCollection<dim, spacedim> &                     mapping,
-    const hp::DoFHandler<dim, spacedim> &                            dof,
-    const hp::QCollection<dim> &                                     q,
-    SparseMatrix<typename numbers::NumberTraits<number>::real_type> &matrix,
-    const Function<spacedim, number> &                               rhs,
-    Vector<number> &                                                 rhs_vector,
-    const Function<spacedim, typename numbers::NumberTraits<number>::real_type>
-      *const                a           = nullptr,
-    const ConstraintMatrix &constraints = ConstraintMatrix());
+    const hp::MappingCollection<dim, spacedim> &mapping,
+    const hp::DoFHandler<dim, spacedim> &       dof,
+    const hp::QCollection<dim> &                q,
+    SparseMatrix<number> &                      matrix,
+    const Function<spacedim, number> &          rhs,
+    Vector<number> &                            rhs_vector,
+    const Function<spacedim, number> *const     a = nullptr,
+    const AffineConstraints<number> &constraints = AffineConstraints<number>());
 
   /**
    * Same function as above, but for hp objects.
@@ -364,14 +365,13 @@ namespace MatrixCreator
   template <int dim, int spacedim, typename number>
   void
   create_mass_matrix(
-    const hp::DoFHandler<dim, spacedim> &                            dof,
-    const hp::QCollection<dim> &                                     q,
-    SparseMatrix<typename numbers::NumberTraits<number>::real_type> &matrix,
-    const Function<spacedim, number> &                               rhs,
-    Vector<number> &                                                 rhs_vector,
-    const Function<spacedim, typename numbers::NumberTraits<number>::real_type>
-      *const                a           = nullptr,
-    const ConstraintMatrix &constraints = ConstraintMatrix());
+    const hp::DoFHandler<dim, spacedim> &   dof,
+    const hp::QCollection<dim> &            q,
+    SparseMatrix<number> &                  matrix,
+    const Function<spacedim, number> &      rhs,
+    Vector<number> &                        rhs_vector,
+    const Function<spacedim, number> *const a    = nullptr,
+    const AffineConstraints<number> &constraints = AffineConstraints<number>());
 
 
   /**
@@ -402,16 +402,15 @@ namespace MatrixCreator
   template <int dim, int spacedim, typename number>
   void
   create_boundary_mass_matrix(
-    const Mapping<dim, spacedim> &                                   mapping,
-    const DoFHandler<dim, spacedim> &                                dof,
-    const Quadrature<dim - 1> &                                      q,
-    SparseMatrix<typename numbers::NumberTraits<number>::real_type> &matrix,
+    const Mapping<dim, spacedim> &   mapping,
+    const DoFHandler<dim, spacedim> &dof,
+    const Quadrature<dim - 1> &      q,
+    SparseMatrix<number> &           matrix,
     const std::map<types::boundary_id, const Function<spacedim, number> *>
-      &                                   boundary_functions,
-    Vector<number> &                      rhs_vector,
-    std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-    const Function<spacedim, typename numbers::NumberTraits<number>::real_type>
-      *const                  weight            = 0,
+      &                                     boundary_functions,
+    Vector<number> &                        rhs_vector,
+    std::vector<types::global_dof_index> &  dof_to_boundary_mapping,
+    const Function<spacedim, number> *const weight = 0,
     std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
 
 
@@ -422,15 +421,14 @@ namespace MatrixCreator
   template <int dim, int spacedim, typename number>
   void
   create_boundary_mass_matrix(
-    const DoFHandler<dim, spacedim> &                                dof,
-    const Quadrature<dim - 1> &                                      q,
-    SparseMatrix<typename numbers::NumberTraits<number>::real_type> &matrix,
+    const DoFHandler<dim, spacedim> &dof,
+    const Quadrature<dim - 1> &      q,
+    SparseMatrix<number> &           matrix,
     const std::map<types::boundary_id, const Function<spacedim, number> *>
-      &                                   boundary_functions,
-    Vector<number> &                      rhs_vector,
-    std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-    const Function<spacedim, typename numbers::NumberTraits<number>::real_type>
-      *const                  a                 = nullptr,
+      &                                     boundary_functions,
+    Vector<number> &                        rhs_vector,
+    std::vector<types::global_dof_index> &  dof_to_boundary_mapping,
+    const Function<spacedim, number> *const a   = nullptr,
     std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
 
   /**
@@ -439,16 +437,15 @@ namespace MatrixCreator
   template <int dim, int spacedim, typename number>
   void
   create_boundary_mass_matrix(
-    const hp::MappingCollection<dim, spacedim> &                     mapping,
-    const hp::DoFHandler<dim, spacedim> &                            dof,
-    const hp::QCollection<dim - 1> &                                 q,
-    SparseMatrix<typename numbers::NumberTraits<number>::real_type> &matrix,
+    const hp::MappingCollection<dim, spacedim> &mapping,
+    const hp::DoFHandler<dim, spacedim> &       dof,
+    const hp::QCollection<dim - 1> &            q,
+    SparseMatrix<number> &                      matrix,
     const std::map<types::boundary_id, const Function<spacedim, number> *>
-      &                                   boundary_functions,
-    Vector<number> &                      rhs_vector,
-    std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-    const Function<spacedim, typename numbers::NumberTraits<number>::real_type>
-      *const                  a                 = nullptr,
+      &                                     boundary_functions,
+    Vector<number> &                        rhs_vector,
+    std::vector<types::global_dof_index> &  dof_to_boundary_mapping,
+    const Function<spacedim, number> *const a   = nullptr,
     std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
 
   /**
@@ -457,15 +454,14 @@ namespace MatrixCreator
   template <int dim, int spacedim, typename number>
   void
   create_boundary_mass_matrix(
-    const hp::DoFHandler<dim, spacedim> &                            dof,
-    const hp::QCollection<dim - 1> &                                 q,
-    SparseMatrix<typename numbers::NumberTraits<number>::real_type> &matrix,
+    const hp::DoFHandler<dim, spacedim> &dof,
+    const hp::QCollection<dim - 1> &     q,
+    SparseMatrix<number> &               matrix,
     const std::map<types::boundary_id, const Function<spacedim, number> *>
-      &                                   boundary_functions,
-    Vector<number> &                      rhs_vector,
-    std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-    const Function<spacedim, typename numbers::NumberTraits<number>::real_type>
-      *const                  a                 = nullptr,
+      &                                     boundary_functions,
+    Vector<number> &                        rhs_vector,
+    std::vector<types::global_dof_index> &  dof_to_boundary_mapping,
+    const Function<spacedim, number> *const a   = nullptr,
     std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
 
   /**
@@ -495,7 +491,7 @@ namespace MatrixCreator
     const Quadrature<dim> &          q,
     SparseMatrix<double> &           matrix,
     const Function<spacedim> *const  a           = nullptr,
-    const ConstraintMatrix &         constraints = ConstraintMatrix());
+    const AffineConstraints<double> &constraints = AffineConstraints<double>());
 
   /**
    * Call the create_laplace_matrix() function, see above, with
@@ -508,7 +504,7 @@ namespace MatrixCreator
     const Quadrature<dim> &          q,
     SparseMatrix<double> &           matrix,
     const Function<spacedim> *const  a           = nullptr,
-    const ConstraintMatrix &         constraints = ConstraintMatrix());
+    const AffineConstraints<double> &constraints = AffineConstraints<double>());
 
   /**
    * Assemble the Laplace matrix and a right hand side vector. If no
@@ -538,7 +534,7 @@ namespace MatrixCreator
     const Function<spacedim> &       rhs,
     Vector<double> &                 rhs_vector,
     const Function<spacedim> *const  a           = nullptr,
-    const ConstraintMatrix &         constraints = ConstraintMatrix());
+    const AffineConstraints<double> &constraints = AffineConstraints<double>());
 
   /**
    * Call the create_laplace_matrix() function, see above, with
@@ -553,7 +549,7 @@ namespace MatrixCreator
     const Function<spacedim> &       rhs,
     Vector<double> &                 rhs_vector,
     const Function<spacedim> *const  a           = nullptr,
-    const ConstraintMatrix &         constraints = ConstraintMatrix());
+    const AffineConstraints<double> &constraints = AffineConstraints<double>());
 
   /**
    * Like the functions above, but for hp dof handlers, mappings, and
@@ -567,7 +563,7 @@ namespace MatrixCreator
     const hp::QCollection<dim> &                q,
     SparseMatrix<double> &                      matrix,
     const Function<spacedim> *const             a = nullptr,
-    const ConstraintMatrix &constraints           = ConstraintMatrix());
+    const AffineConstraints<double> &constraints = AffineConstraints<double>());
 
   /**
    * Like the functions above, but for hp dof handlers, mappings, and
@@ -579,8 +575,8 @@ namespace MatrixCreator
     const hp::DoFHandler<dim, spacedim> &dof,
     const hp::QCollection<dim> &         q,
     SparseMatrix<double> &               matrix,
-    const Function<spacedim> *const      a           = nullptr,
-    const ConstraintMatrix &             constraints = ConstraintMatrix());
+    const Function<spacedim> *const      a       = nullptr,
+    const AffineConstraints<double> &constraints = AffineConstraints<double>());
 
   /**
    * Like the functions above, but for hp dof handlers, mappings, and
@@ -596,7 +592,7 @@ namespace MatrixCreator
     const Function<spacedim> &                  rhs,
     Vector<double> &                            rhs_vector,
     const Function<spacedim> *const             a = nullptr,
-    const ConstraintMatrix &constraints           = ConstraintMatrix());
+    const AffineConstraints<double> &constraints = AffineConstraints<double>());
 
   /**
    * Like the functions above, but for hp dof handlers, mappings, and
@@ -610,8 +606,8 @@ namespace MatrixCreator
     SparseMatrix<double> &               matrix,
     const Function<spacedim> &           rhs,
     Vector<double> &                     rhs_vector,
-    const Function<spacedim> *const      a           = nullptr,
-    const ConstraintMatrix &             constraints = ConstraintMatrix());
+    const Function<spacedim> *const      a       = nullptr,
+    const AffineConstraints<double> &constraints = AffineConstraints<double>());
 
   /**
    * Exception
index 2a44491a1a6fd183e650fcc42a8c5bce07b46d63..1a46dd9cc772c8f30865562ba76dba927cb7a438 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2010 - 2017 by the deal.II authors
+// Copyright (C) 2010 - 2018 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -29,14 +29,14 @@ for (scalar : REAL_SCALARS; deal_II_dimension : DIMENSIONS;
         const Quadrature<deal_II_dimension> &                         q,
         SparseMatrix<scalar> &                                        matrix,
         const Function<deal_II_space_dimension, scalar> *const coefficient,
-        const ConstraintMatrix &                               constraints);
+        const AffineConstraints<scalar> &                      constraints);
     template void MatrixCreator::
       create_mass_matrix<deal_II_dimension, deal_II_space_dimension, scalar>(
         const DoFHandler<deal_II_dimension, deal_II_space_dimension> &dof,
         const Quadrature<deal_II_dimension> &                         q,
         SparseMatrix<scalar> &                                        matrix,
         const Function<deal_II_space_dimension, scalar> *const coefficient,
-        const ConstraintMatrix &                               constraints);
+        const AffineConstraints<scalar> &                      constraints);
 
     // hp versions of functions
     template void MatrixCreator::
@@ -47,7 +47,7 @@ for (scalar : REAL_SCALARS; deal_II_dimension : DIMENSIONS;
         const hp::QCollection<deal_II_dimension> &                        q,
         SparseMatrix<scalar> &                                 matrix,
         const Function<deal_II_space_dimension, scalar> *const coefficient,
-        const ConstraintMatrix &                               constraints);
+        const AffineConstraints<scalar> &                      constraints);
 
     template void MatrixCreator::
       create_mass_matrix<deal_II_dimension, deal_II_space_dimension, scalar>(
@@ -55,7 +55,7 @@ for (scalar : REAL_SCALARS; deal_II_dimension : DIMENSIONS;
         const hp::QCollection<deal_II_dimension> &                        q,
         SparseMatrix<scalar> &                                 matrix,
         const Function<deal_II_space_dimension, scalar> *const coefficient,
-        const ConstraintMatrix &                               constraints);
+        const AffineConstraints<scalar> &                      constraints);
 #endif
   }
 
@@ -72,24 +72,20 @@ for (scalar : REAL_AND_COMPLEX_SCALARS; deal_II_dimension : DIMENSIONS;
         const Mapping<deal_II_dimension, deal_II_space_dimension> &   mapping,
         const DoFHandler<deal_II_dimension, deal_II_space_dimension> &dof,
         const Quadrature<deal_II_dimension> &                         q,
-        SparseMatrix<numbers::NumberTraits<scalar>::real_type> &      matrix,
+        SparseMatrix<scalar> &                                        matrix,
         const Function<deal_II_space_dimension, scalar> &             rhs,
-        Vector<scalar> &rhs_vector,
-        const Function<deal_II_space_dimension,
-                       numbers::NumberTraits<scalar>::real_type>
-          *const                coefficient,
-        const ConstraintMatrix &constraints);
+        Vector<scalar> &                                       rhs_vector,
+        const Function<deal_II_space_dimension, scalar> *const coefficient,
+        const AffineConstraints<scalar> &                      constraints);
     template void MatrixCreator::
       create_mass_matrix<deal_II_dimension, deal_II_space_dimension, scalar>(
         const DoFHandler<deal_II_dimension, deal_II_space_dimension> &dof,
         const Quadrature<deal_II_dimension> &                         q,
-        SparseMatrix<numbers::NumberTraits<scalar>::real_type> &      matrix,
+        SparseMatrix<scalar> &                                        matrix,
         const Function<deal_II_space_dimension, scalar> &             rhs,
-        Vector<scalar> &rhs_vector,
-        const Function<deal_II_space_dimension,
-                       numbers::NumberTraits<scalar>::real_type>
-          *const                coefficient,
-        const ConstraintMatrix &constraints);
+        Vector<scalar> &                                       rhs_vector,
+        const Function<deal_II_space_dimension, scalar> *const coefficient,
+        const AffineConstraints<scalar> &                      constraints);
 
     // hp version
     template void MatrixCreator::
@@ -98,25 +94,21 @@ for (scalar : REAL_AND_COMPLEX_SCALARS; deal_II_dimension : DIMENSIONS;
           &mapping,
         const hp::DoFHandler<deal_II_dimension, deal_II_space_dimension> &dof,
         const hp::QCollection<deal_II_dimension> &                        q,
-        SparseMatrix<numbers::NumberTraits<scalar>::real_type> &matrix,
-        const Function<deal_II_space_dimension, scalar> &       rhs,
-        Vector<scalar> &                                        rhs_vector,
-        const Function<deal_II_space_dimension,
-                       numbers::NumberTraits<scalar>::real_type>
-          *const                coefficient,
-        const ConstraintMatrix &constraints);
+        SparseMatrix<scalar> &                                 matrix,
+        const Function<deal_II_space_dimension, scalar> &      rhs,
+        Vector<scalar> &                                       rhs_vector,
+        const Function<deal_II_space_dimension, scalar> *const coefficient,
+        const AffineConstraints<scalar> &                      constraints);
 
     template void MatrixCreator::
       create_mass_matrix<deal_II_dimension, deal_II_space_dimension, scalar>(
         const hp::DoFHandler<deal_II_dimension, deal_II_space_dimension> &dof,
         const hp::QCollection<deal_II_dimension> &                        q,
-        SparseMatrix<numbers::NumberTraits<scalar>::real_type> &matrix,
-        const Function<deal_II_space_dimension, scalar> &       rhs,
-        Vector<scalar> &                                        rhs_vector,
-        const Function<deal_II_space_dimension,
-                       numbers::NumberTraits<scalar>::real_type>
-          *const                coefficient,
-        const ConstraintMatrix &constraints);
+        SparseMatrix<scalar> &                                 matrix,
+        const Function<deal_II_space_dimension, scalar> &      rhs,
+        Vector<scalar> &                                       rhs_vector,
+        const Function<deal_II_space_dimension, scalar> *const coefficient,
+        const AffineConstraints<scalar> &                      constraints);
 #endif
   }
 
@@ -131,13 +123,12 @@ for (scalar : REAL_AND_COMPLEX_SCALARS; deal_II_dimension : DIMENSIONS;
                                                scalar>(
       const DoFHandler<deal_II_dimension, deal_II_space_dimension> &     dof,
       const Quadrature<deal_II_dimension - 1> &                          q,
-      SparseMatrix<numbers::NumberTraits<scalar>::real_type> &           matrix,
+      SparseMatrix<scalar> &                                             matrix,
       const std::map<types::boundary_id,
                      const Function<deal_II_space_dimension, scalar> *> &rhs,
       Vector<scalar> &                      rhs_vector,
       std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-      const Function<deal_II_space_dimension,
-                     numbers::NumberTraits<scalar>::real_type> *const a,
+      const Function<deal_II_space_dimension, scalar> *const a,
       std::vector<unsigned int>);
 
     template void
@@ -147,13 +138,12 @@ for (scalar : REAL_AND_COMPLEX_SCALARS; deal_II_dimension : DIMENSIONS;
       const Mapping<deal_II_dimension, deal_II_space_dimension> &,
       const DoFHandler<deal_II_dimension, deal_II_space_dimension> &     dof,
       const Quadrature<deal_II_dimension - 1> &                          q,
-      SparseMatrix<numbers::NumberTraits<scalar>::real_type> &           matrix,
+      SparseMatrix<scalar> &                                             matrix,
       const std::map<types::boundary_id,
                      const Function<deal_II_space_dimension, scalar> *> &rhs,
       Vector<scalar> &                      rhs_vector,
       std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-      const Function<deal_II_space_dimension,
-                     numbers::NumberTraits<scalar>::real_type> *const a,
+      const Function<deal_II_space_dimension, scalar> *const a,
       std::vector<unsigned int>);
 
     template void
@@ -163,13 +153,12 @@ for (scalar : REAL_AND_COMPLEX_SCALARS; deal_II_dimension : DIMENSIONS;
       const hp::MappingCollection<deal_II_dimension, deal_II_space_dimension> &,
       const hp::DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
       const hp::QCollection<deal_II_dimension - 1> &,
-      SparseMatrix<numbers::NumberTraits<scalar>::real_type> &,
+      SparseMatrix<scalar> &,
       const std::map<types::boundary_id,
                      const Function<deal_II_space_dimension, scalar> *> &,
       Vector<scalar> &,
       std::vector<types::global_dof_index> &,
-      const Function<deal_II_space_dimension,
-                     numbers::NumberTraits<scalar>::real_type> *const,
+      const Function<deal_II_space_dimension, scalar> *const,
       std::vector<unsigned int>);
 
     template void
@@ -178,13 +167,12 @@ for (scalar : REAL_AND_COMPLEX_SCALARS; deal_II_dimension : DIMENSIONS;
                                                scalar>(
       const hp::DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
       const hp::QCollection<deal_II_dimension - 1> &,
-      SparseMatrix<numbers::NumberTraits<scalar>::real_type> &,
+      SparseMatrix<scalar> &,
       const std::map<types::boundary_id,
                      const Function<deal_II_space_dimension, scalar> *> &,
       Vector<scalar> &,
       std::vector<types::global_dof_index> &,
-      const Function<deal_II_space_dimension,
-                     numbers::NumberTraits<scalar>::real_type> *const,
+      const Function<deal_II_space_dimension, scalar> *const,
       std::vector<unsigned int>);
 #endif
   }
@@ -201,14 +189,14 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
       const Quadrature<deal_II_dimension> &    q,
       SparseMatrix<double> &                   matrix,
       const Function<deal_II_dimension> *const coefficient,
-      const ConstraintMatrix &                 constraints);
+      const AffineConstraints<double> &        constraints);
     template void MatrixCreator::create_laplace_matrix<deal_II_dimension>(
       const Mapping<deal_II_dimension> &       mapping,
       const DoFHandler<deal_II_dimension> &    dof,
       const Quadrature<deal_II_dimension> &    q,
       SparseMatrix<double> &                   matrix,
       const Function<deal_II_dimension> *const coefficient,
-      const ConstraintMatrix &                 constraints);
+      const AffineConstraints<double> &        constraints);
     template void MatrixCreator::create_laplace_matrix<deal_II_dimension>(
       const Mapping<deal_II_dimension> &       mapping,
       const DoFHandler<deal_II_dimension> &    dof,
@@ -217,7 +205,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
       const Function<deal_II_dimension> &      rhs,
       Vector<double> &                         rhs_vector,
       const Function<deal_II_dimension> *const coefficient,
-      const ConstraintMatrix &                 constraints);
+      const AffineConstraints<double> &        constraints);
     template void MatrixCreator::create_laplace_matrix<deal_II_dimension>(
       const DoFHandler<deal_II_dimension> &    dof,
       const Quadrature<deal_II_dimension> &    q,
@@ -225,7 +213,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
       const Function<deal_II_dimension> &      rhs,
       Vector<double> &                         rhs_vector,
       const Function<deal_II_dimension> *const coefficient,
-      const ConstraintMatrix &                 constraints);
+      const AffineConstraints<double> &        constraints);
 
     // hp versions of create_laplace_matrix
     template void MatrixCreator::create_laplace_matrix<deal_II_dimension>(
@@ -233,14 +221,14 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
       const hp::QCollection<deal_II_dimension> &q,
       SparseMatrix<double> &                    matrix,
       const Function<deal_II_dimension> *const  coefficient,
-      const ConstraintMatrix &                  constraints);
+      const AffineConstraints<double> &         constraints);
     template void MatrixCreator::create_laplace_matrix<deal_II_dimension>(
       const hp::MappingCollection<deal_II_dimension> &mapping,
       const hp::DoFHandler<deal_II_dimension> &       dof,
       const hp::QCollection<deal_II_dimension> &      q,
       SparseMatrix<double> &                          matrix,
       const Function<deal_II_dimension> *const        coefficient,
-      const ConstraintMatrix &                        constraints);
+      const AffineConstraints<double> &               constraints);
     template void MatrixCreator::create_laplace_matrix<deal_II_dimension>(
       const hp::MappingCollection<deal_II_dimension> &mapping,
       const hp::DoFHandler<deal_II_dimension> &       dof,
@@ -249,7 +237,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
       const Function<deal_II_dimension> &             rhs,
       Vector<double> &                                rhs_vector,
       const Function<deal_II_dimension> *const        coefficient,
-      const ConstraintMatrix &                        constraints);
+      const AffineConstraints<double> &               constraints);
     template void MatrixCreator::create_laplace_matrix<deal_II_dimension>(
       const hp::DoFHandler<deal_II_dimension> & dof,
       const hp::QCollection<deal_II_dimension> &q,
@@ -257,7 +245,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
       const Function<deal_II_dimension> &       rhs,
       Vector<double> &                          rhs_vector,
       const Function<deal_II_dimension> *const  coefficient,
-      const ConstraintMatrix &                  constraints);
+      const AffineConstraints<double> &         constraints);
 
 #endif
   }
@@ -273,14 +261,14 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
       const Quadrature<deal_II_dimension> &                         q,
       SparseMatrix<double> &                                        matrix,
       const Function<deal_II_space_dimension, double> *const        coefficient,
-      const ConstraintMatrix &constraints);
+      const AffineConstraints<double> &constraints);
     template void MatrixCreator::create_laplace_matrix<deal_II_dimension,
                                                        deal_II_space_dimension>(
       const DoFHandler<deal_II_dimension, deal_II_space_dimension> &dof,
       const Quadrature<deal_II_dimension> &                         q,
       SparseMatrix<double> &                                        matrix,
       const Function<deal_II_space_dimension, double> *const        coefficient,
-      const ConstraintMatrix &constraints);
+      const AffineConstraints<double> &constraints);
     template void MatrixCreator::create_laplace_matrix<deal_II_dimension,
                                                        deal_II_space_dimension>(
       const Mapping<deal_II_dimension, deal_II_space_dimension> &   mapping,
@@ -290,7 +278,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
       const Function<deal_II_space_dimension, double> &             rhs,
       Vector<double> &                                              rhs_vector,
       const Function<deal_II_space_dimension, double> *const        coefficient,
-      const ConstraintMatrix &constraints);
+      const AffineConstraints<double> &constraints);
     template void MatrixCreator::create_laplace_matrix<deal_II_dimension,
                                                        deal_II_space_dimension>(
       const DoFHandler<deal_II_dimension, deal_II_space_dimension> &dof,
@@ -299,6 +287,6 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
       const Function<deal_II_space_dimension, double> &             rhs,
       Vector<double> &                                              rhs_vector,
       const Function<deal_II_space_dimension, double> *const        coefficient,
-      const ConstraintMatrix &constraints);
+      const AffineConstraints<double> &constraints);
 #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.