]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Minor cleanup in AffineConstraints::make_consistent_in_parallel(). 17150/head
authorMarc Fehling <mafehling.git@gmail.com>
Thu, 20 Jun 2024 16:39:31 +0000 (18:39 +0200)
committerMarc Fehling <mafehling.git@gmail.com>
Thu, 20 Jun 2024 16:40:09 +0000 (18:40 +0200)
include/deal.II/lac/affine_constraints.templates.h

index 06172a6da3098a6ab92b487cb24dd22b9a9cb655..902ea9ad83c6ac73700a7698b6145bc96b6aba20 100644 (file)
@@ -321,25 +321,22 @@ namespace internal
       Utilities::MPI::this_mpi_process(mpi_communicator);
 
     // helper function
-    const auto sort_and_make_unique = [](std::vector<ConstraintType>
-                                           &constraints) {
-      std::sort(
-        constraints.begin(),
-        constraints.end(),
-        [](const typename dealii::AffineConstraints<number>::ConstraintLine &l1,
-           const typename dealii::AffineConstraints<number>::ConstraintLine
-             &l2) { return l1.index < l2.index; });
-
-      constraints.erase(
-        std::unique(
-          constraints.begin(),
-          constraints.end(),
-          [](const typename dealii::AffineConstraints<number>::ConstraintLine
-               &l1,
-             const typename dealii::AffineConstraints<number>::ConstraintLine
-               &l2) { return l1.index == l2.index; }),
-        constraints.end());
-    };
+    const auto sort_and_make_unique =
+      [](std::vector<ConstraintType> &constraints) {
+        std::sort(constraints.begin(),
+                  constraints.end(),
+                  [](const ConstraintType &l1, const ConstraintType &l2) {
+                    return l1.index < l2.index;
+                  });
+
+        constraints.erase(std::unique(constraints.begin(),
+                                      constraints.end(),
+                                      [](const ConstraintType &l1,
+                                         const ConstraintType &l2) {
+                                        return l1.index == l2.index;
+                                      }),
+                          constraints.end());
+      };
 
     // 0) collect constrained indices of the current object
     IndexSet constrained_indices(locally_owned_dofs.size());

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.