]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make a condition easier to read. 17625/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 28 Aug 2024 02:48:41 +0000 (20:48 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 28 Aug 2024 02:50:08 +0000 (20:50 -0600)
include/deal.II/lac/affine_constraints.templates.h

index 2f311b9e56cfef9c39be59352bc32d6cec968be2..2e369db41ff80a585459536c86dc10b29df0af9a 100644 (file)
@@ -659,11 +659,11 @@ AffineConstraints<number>::make_consistent_in_parallel(
         this->add_constraint(line.index, line.entries, line.inhomogeneity);
 
       // 4) Stop loop if converged.
-      const auto constraints_converged =
-        Utilities::MPI::min(static_cast<unsigned int>(
-                              constraints_to_make_consistent ==
-                              constraints_made_consistent),
-                            mpi_communicator);
+      const bool constraints_converged =
+        (Utilities::MPI::min(
+           (constraints_to_make_consistent == constraints_made_consistent ? 1 :
+                                                                            0),
+           mpi_communicator) == 1);
       if (constraints_converged)
         break;
     }

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.