From: Marc Fehling Date: Thu, 20 Jun 2024 16:39:31 +0000 (+0200) Subject: Minor cleanup in AffineConstraints::make_consistent_in_parallel(). X-Git-Tag: v9.6.0-rc1~164^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F17150%2Fhead;p=dealii.git Minor cleanup in AffineConstraints::make_consistent_in_parallel(). --- diff --git a/include/deal.II/lac/affine_constraints.templates.h b/include/deal.II/lac/affine_constraints.templates.h index 06172a6da3..902ea9ad83 100644 --- a/include/deal.II/lac/affine_constraints.templates.h +++ b/include/deal.II/lac/affine_constraints.templates.h @@ -321,25 +321,22 @@ namespace internal Utilities::MPI::this_mpi_process(mpi_communicator); // helper function - const auto sort_and_make_unique = [](std::vector - &constraints) { - std::sort( - constraints.begin(), - constraints.end(), - [](const typename dealii::AffineConstraints::ConstraintLine &l1, - const typename dealii::AffineConstraints::ConstraintLine - &l2) { return l1.index < l2.index; }); - - constraints.erase( - std::unique( - constraints.begin(), - constraints.end(), - [](const typename dealii::AffineConstraints::ConstraintLine - &l1, - const typename dealii::AffineConstraints::ConstraintLine - &l2) { return l1.index == l2.index; }), - constraints.end()); - }; + const auto sort_and_make_unique = + [](std::vector &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());