]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Mark a number of input arguments as 'const'. 11275/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 30 Nov 2020 05:18:44 +0000 (22:18 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 30 Nov 2020 05:18:44 +0000 (22:18 -0700)
include/deal.II/lac/affine_constraints.h
include/deal.II/lac/affine_constraints.templates.h

index 4be3e09e879c6c41d483a415146aa87ae17e5fea..9bf858cdb6093c962669f9e7197ce66d93eb2d67 100644 (file)
@@ -1877,8 +1877,8 @@ private:
                              const std::vector<size_type> &local_dof_indices,
                              MatrixType &                  global_matrix,
                              VectorType &                  global_vector,
-                             bool use_inhomogeneities_for_rhs,
-                             std::integral_constant<bool, false>) const;
+                             const bool use_inhomogeneities_for_rhs,
+                             const std::integral_constant<bool, false>) const;
 
   /**
    * This function actually implements the local_to_global function for block
@@ -1891,8 +1891,8 @@ private:
                              const std::vector<size_type> &local_dof_indices,
                              MatrixType &                  global_matrix,
                              VectorType &                  global_vector,
-                             bool use_inhomogeneities_for_rhs,
-                             std::integral_constant<bool, true>) const;
+                             const bool use_inhomogeneities_for_rhs,
+                             const std::integral_constant<bool, true>) const;
 
   /**
    * This function actually implements the local_to_global function for
@@ -1904,7 +1904,7 @@ private:
                               SparsityPatternType &         sparsity_pattern,
                               const bool            keep_constrained_entries,
                               const Table<2, bool> &dof_mask,
-                              std::integral_constant<bool, false>) const;
+                              const std::integral_constant<bool, false>) const;
 
   /**
    * This function actually implements the local_to_global function for block
@@ -1916,7 +1916,7 @@ private:
                               SparsityPatternType &         sparsity_pattern,
                               const bool            keep_constrained_entries,
                               const Table<2, bool> &dof_mask,
-                              std::integral_constant<bool, true>) const;
+                              const std::integral_constant<bool, true>) const;
 
   /**
    * Internal helper function for distribute_local_to_global function.
index 65f3002a979766a5551f4d8a02ba94cf063ed2f1..4d0c728c8cd26d0a9d8942e6baadf37140a0a29a 100644 (file)
@@ -3361,6 +3361,8 @@ namespace internal
   } // end of namespace AffineConstraints
 } // end of namespace internal
 
+
+
 // Basic idea of setting up a list of
 // all global dofs: first find all rows and columns
 // that we are going to write touch,
@@ -3428,6 +3430,8 @@ AffineConstraints<number>::make_sorted_row_list(
     }
 }
 
+
+
 // Same function as before, but now do only extract the global indices that
 // come from the local ones without storing their origin. Used for sparsity
 // pattern generation.
@@ -3482,6 +3486,8 @@ AffineConstraints<number>::make_sorted_row_list(
     }
 }
 
+
+
 // Resolve the constraints from the vector and apply inhomogeneities.
 template <typename number>
 template <typename MatrixScalar, typename VectorScalar>
@@ -3526,6 +3532,8 @@ AffineConstraints<number>::resolve_vector_entry(
   return val;
 }
 
+
+
 // internal implementation for distribute_local_to_global for standard
 // (non-block) matrices
 template <typename number>
@@ -3537,8 +3545,8 @@ AffineConstraints<number>::distribute_local_to_global(
   const std::vector<size_type> &local_dof_indices,
   MatrixType &                  global_matrix,
   VectorType &                  global_vector,
-  bool                          use_inhomogeneities_for_rhs,
-  std::integral_constant<bool, false>) const
+  const bool                    use_inhomogeneities_for_rhs,
+  const std::integral_constant<bool, false>) const
 {
   // FIXME: static_assert MatrixType::value_type == number
 
@@ -3681,6 +3689,8 @@ AffineConstraints<number>::distribute_local_to_global(
     use_inhomogeneities_for_rhs);
 }
 
+
+
 // similar function as above, but now specialized for block matrices. See the
 // other function for additional comments.
 template <typename number>
@@ -3692,8 +3702,8 @@ AffineConstraints<number>::distribute_local_to_global(
   const std::vector<size_type> &local_dof_indices,
   MatrixType &                  global_matrix,
   VectorType &                  global_vector,
-  bool                          use_inhomogeneities_for_rhs,
-  std::integral_constant<bool, true>) const
+  const bool                    use_inhomogeneities_for_rhs,
+  const std::integral_constant<bool, true>) const
 {
   const bool use_vectors =
     (local_vector.size() == 0 && global_vector.size() == 0) ? false : true;
@@ -3818,6 +3828,7 @@ AffineConstraints<number>::distribute_local_to_global(
 }
 
 
+
 template <typename number>
 template <typename MatrixType>
 void
@@ -3832,6 +3843,7 @@ AffineConstraints<number>::distribute_local_to_global(
 }
 
 
+
 template <typename number>
 template <typename MatrixType>
 void
@@ -3895,6 +3907,8 @@ AffineConstraints<number>::distribute_local_to_global(
     }
 }
 
+
+
 template <typename number>
 template <typename SparsityPatternType>
 void
@@ -3903,7 +3917,7 @@ AffineConstraints<number>::add_entries_local_to_global(
   SparsityPatternType &         sparsity_pattern,
   const bool                    keep_constrained_entries,
   const Table<2, bool> &        dof_mask,
-  std::integral_constant<bool, false>) const
+  const std::integral_constant<bool, false>) const
 {
   Assert(sparsity_pattern.n_rows() == sparsity_pattern.n_cols(),
          ExcNotQuadratic());
@@ -3990,6 +4004,8 @@ AffineConstraints<number>::add_entries_local_to_global(
                                                       sparsity_pattern);
 }
 
+
+
 template <typename number>
 template <typename SparsityPatternType>
 void
@@ -4045,6 +4061,8 @@ AffineConstraints<number>::add_entries_local_to_global(
   Assert(false, ExcNotImplemented());
 }
 
+
+
 template <typename number>
 template <typename SparsityPatternType>
 void
@@ -4053,7 +4071,7 @@ AffineConstraints<number>::add_entries_local_to_global(
   SparsityPatternType &         sparsity_pattern,
   const bool                    keep_constrained_entries,
   const Table<2, bool> &        dof_mask,
-  std::integral_constant<bool, true>) const
+  const std::integral_constant<bool, true>) const
 {
   // just as the other add_entries_local_to_global function, but now
   // specialized for block matrices.

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.