]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify an assignment 14967/head
authorMartin Kronbichler <martin.kronbichler@uni-a.de>
Fri, 24 Mar 2023 09:41:44 +0000 (10:41 +0100)
committerMartin Kronbichler <martin.kronbichler@uni-a.de>
Fri, 24 Mar 2023 09:42:02 +0000 (10:42 +0100)
include/deal.II/lac/affine_constraints.templates.h

index 750c1f28cc208a5d28c95473b664414a442414be..506503b0c38d463a827e819dd60d9fe335101671 100644 (file)
@@ -278,11 +278,9 @@ namespace internal
           if (constraints_in.is_inhomogeneously_constrained(index))
             entry.inhomogeneity = constraints_in.get_inhomogeneity(index);
 
-          const auto constraints = constraints_in.get_constraint_entries(index);
-
-          if (constraints)
-            for (const auto &i : *constraints)
-              entry.entries.push_back(i);
+          if (const auto constraints =
+                constraints_in.get_constraint_entries(index))
+            entry.entries = *constraints;
 
           if (constrained_indices_owners[i] == my_rank)
             locally_relevant_constraints.push_back(entry);

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.