]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Convert AffineConstraints::add_constraint() to take an ArrayView.
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 10 Oct 2023 15:19:14 +0000 (09:19 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 11 Oct 2023 15:13:21 +0000 (09:13 -0600)
include/deal.II/lac/affine_constraints.h

index 5f013060facc432354be8456f0c3fae002ef260b..470a405e91e9bc5f86be28d32d9a5208bbc7f5ea 100644 (file)
@@ -795,9 +795,10 @@ public:
    * @endcode
    */
   void
-  add_constraint(const size_type constrained_dof,
-                 const std::vector<std::pair<size_type, number>> &dependencies,
-                 const number inhomogeneity = 0);
+  add_constraint(
+    const size_type                                      constrained_dof,
+    const ArrayView<const std::pair<size_type, number>> &dependencies,
+    const number                                         inhomogeneity = 0);
 
   /**
    * Add a new line to the matrix. If the line already exists, then the
@@ -2296,9 +2297,9 @@ inline AffineConstraints<number>::AffineConstraints(
 template <typename number>
 inline void
 AffineConstraints<number>::add_constraint(
-  const size_type                                  constrained_dof,
-  const std::vector<std::pair<size_type, number>> &dependencies,
-  const number                                     inhomogeneity)
+  const size_type                                      constrained_dof,
+  const ArrayView<const std::pair<size_type, number>> &dependencies,
+  const number                                         inhomogeneity)
 {
   Assert(is_constrained(constrained_dof) == false,
          ExcMessage("You cannot add a constraint for a degree of freedom "

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.