]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix cases where we can't currently use a semicolon without additional braces 16037/head
authorDaniel Arndt <arndtd@ornl.gov>
Fri, 22 Sep 2023 16:27:36 +0000 (12:27 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Sun, 24 Sep 2023 23:39:10 +0000 (19:39 -0400)
include/deal.II/lac/block_matrix_base.h
include/deal.II/lac/full_matrix.templates.h
tests/matrix_free/stokes_computation.cc
tests/mpi/trilinos_sparse_matrix_03.cc
tests/multigrid-global-coarsening/stokes_computation.cc
tests/numerics/no_flux_18.cc

index 77e72087be53eee06311dfa3ef37f046e7fcfd7d..0d38ae90a49d9aacc1a4757101e83bc4a8e6c02a 100644 (file)
@@ -1937,9 +1937,11 @@ BlockMatrixBase<MatrixType>::add(const size_type  row,
       size_type before = col_indices[0];
       for (size_type i = 1; i < n_cols; ++i)
         if (col_indices[i] <= before)
-          Assert(false,
-                 ExcMessage("Flag col_indices_are_sorted is set, but "
-                            "indices appear to not be sorted."));
+          {
+            Assert(false,
+                   ExcMessage("Flag col_indices_are_sorted is set, but "
+                              "indices appear to not be sorted."));
+          }
         else
           before = col_indices[i];
 #  endif
index f9544a31cdcb6b9016805f6c004d4919081e2eec..515ed92362e05af6c0455db4143ea40f0f0b7a65 100644 (file)
@@ -1614,7 +1614,9 @@ FullMatrix<number>::left_invert(const FullMatrix<number2> &A)
   A_t.Tadd(A, 1);
   A_t.mmult(A_t_times_A, A);
   if (number(A_t_times_A.determinant()) == number(0))
-    Assert(false, ExcSingular());
+    {
+      Assert(false, ExcSingular());
+    }
   else
     {
       A_t_times_A_inv.invert(A_t_times_A);
@@ -1653,7 +1655,9 @@ FullMatrix<number>::right_invert(const FullMatrix<number2> &A)
   A_t.Tadd(A, 1);
   A.mmult(A_times_A_t, A_t);
   if (number(A_times_A_t.determinant()) == number(0))
-    Assert(false, ExcSingular());
+    {
+      Assert(false, ExcSingular());
+    }
   else
     {
       A_times_A_t_inv.invert(A_times_A_t);
index edca6c9a6e6903264f155e0d536b5e5605b2dae3..d7a53ba9fe762bce9d14ff65e5e340461d05feb1 100644 (file)
@@ -240,15 +240,17 @@ namespace StokesClass
           {
             if (Utilities::MPI::this_mpi_process(
                   src.block(0).get_mpi_communicator()) == 0)
-              AssertThrow(
-                false,
-                ExcMessage(
-                  std::string(
-                    "The iterative (bottom right) solver in BlockSchurPreconditioner::vmult "
-                    "did not converge to a tolerance of " +
-                    Utilities::to_string(solver_control.tolerance()) +
-                    ". It reported the following error:\n\n") +
-                  exc.what()));
+              {
+                AssertThrow(
+                  false,
+                  ExcMessage(
+                    std::string(
+                      "The iterative (bottom right) solver in BlockSchurPreconditioner::vmult "
+                      "did not converge to a tolerance of " +
+                      Utilities::to_string(solver_control.tolerance()) +
+                      ". It reported the following error:\n\n") +
+                    exc.what()));
+              }
             else
               throw QuietException();
           }
index 6d59272d0557a71b5bb120c351ab5fb8aba1d840..3fa26883c4d697ef0c7ccde8b394790a0229224d 100644 (file)
@@ -105,13 +105,19 @@ test()
         {
           AssertThrow(p->row() == 0, ExcInternalError());
           if (p->column() == 0)
-            AssertThrow(p->value() == 0.1, ExcInternalError());
+            {
+              AssertThrow(p->value() == 0.1, ExcInternalError());
+            }
           else if (p->column() == 2)
-            AssertThrow(p->value() == 0.2, ExcInternalError());
+            {
+              AssertThrow(p->value() == 0.2, ExcInternalError());
+            }
           else
-            // well, we didn't write here, so the only thing that
-            // should be in there is a zero
-            AssertThrow(p->value() == 0.0, ExcInternalError());
+            {
+              // well, we didn't write here, so the only thing that
+              // should be in there is a zero
+              AssertThrow(p->value() == 0.0, ExcInternalError());
+            }
         }
     }
   else
@@ -122,11 +128,15 @@ test()
         {
           AssertThrow(p->row() == 2, ExcInternalError());
           if (p->column() == 3)
-            AssertThrow(p->value() == 0.3, ExcInternalError());
+            {
+              AssertThrow(p->value() == 0.3, ExcInternalError());
+            }
           else
-            // well, we didn't write here, so the only thing that
-            // should be in there is a zero
-            AssertThrow(p->value() == 0.0, ExcInternalError());
+            {
+              // well, we didn't write here, so the only thing that
+              // should be in there is a zero
+              AssertThrow(p->value() == 0.0, ExcInternalError());
+            }
         }
     }
 
@@ -143,13 +153,19 @@ test()
         {
           AssertThrow(p->row() == 0, ExcInternalError());
           if (p->column() == 0)
-            AssertThrow(p->value() == 0.1, ExcInternalError());
+            {
+              AssertThrow(p->value() == 0.1, ExcInternalError());
+            }
           else if (p->column() == 2)
-            AssertThrow(p->value() == 0.2, ExcInternalError());
+            {
+              AssertThrow(p->value() == 0.2, ExcInternalError());
+            }
           else
-            // well, we didn't write here, so the only thing that
-            // should be in there is a zero
-            AssertThrow(p->value() == 0.0, ExcInternalError());
+            {
+              // well, we didn't write here, so the only thing that
+              // should be in there is a zero
+              AssertThrow(p->value() == 0.0, ExcInternalError());
+            }
         }
     }
   else
@@ -161,11 +177,15 @@ test()
         {
           AssertThrow(p->row() == 2, ExcInternalError());
           if (p->column() == 3)
-            AssertThrow(p->value() == 0.3, ExcInternalError());
+            {
+              AssertThrow(p->value() == 0.3, ExcInternalError());
+            }
           else
-            // well, we didn't write here, so the only thing that
-            // should be in there is a zero
-            AssertThrow(p->value() == 0.0, ExcInternalError());
+            {
+              // well, we didn't write here, so the only thing that
+              // should be in there is a zero
+              AssertThrow(p->value() == 0.0, ExcInternalError());
+            }
         }
     }
 
@@ -179,13 +199,19 @@ test()
         {
           AssertThrow(p->row() == 0, ExcInternalError());
           if (p->column() == 0)
-            AssertThrow(p->value() == 108, ExcInternalError());
+            {
+              AssertThrow(p->value() == 108, ExcInternalError());
+            }
           else if (p->column() == 2)
-            AssertThrow(p->value() == 0.2, ExcInternalError());
+            {
+              AssertThrow(p->value() == 0.2, ExcInternalError());
+            }
           else
-            // well, we didn't write here, so the only thing that
-            // should be in there is a zero
-            AssertThrow(p->value() == 0.0, ExcInternalError());
+            {
+              // well, we didn't write here, so the only thing that
+              // should be in there is a zero
+              AssertThrow(p->value() == 0.0, ExcInternalError());
+            }
         }
     }
   else
@@ -196,11 +222,15 @@ test()
         {
           AssertThrow(p->row() == 2, ExcInternalError());
           if (p->column() == 3)
-            AssertThrow(p->value() == 42, ExcInternalError());
+            {
+              AssertThrow(p->value() == 42, ExcInternalError());
+            }
           else
-            // well, we didn't write here, so the only thing that
-            // should be in there is a zero
-            AssertThrow(p->value() == 0.0, ExcInternalError());
+            {
+              // well, we didn't write here, so the only thing that
+              // should be in there is a zero
+              AssertThrow(p->value() == 0.0, ExcInternalError());
+            }
         }
     }
 
index 2edf3d4a8eb43884777fc2cafdb03166d1b24b66..5a2ce6abdd3d6c6e335dcc0274077250eb81503f 100644 (file)
@@ -240,15 +240,17 @@ namespace StokesClass
           {
             if (Utilities::MPI::this_mpi_process(
                   src.block(0).get_mpi_communicator()) == 0)
-              AssertThrow(
-                false,
-                ExcMessage(
-                  std::string(
-                    "The iterative (bottom right) solver in BlockSchurPreconditioner::vmult "
-                    "did not converge to a tolerance of " +
-                    Utilities::to_string(solver_control.tolerance()) +
-                    ". It reported the following error:\n\n") +
-                  exc.what()));
+              {
+                AssertThrow(
+                  false,
+                  ExcMessage(
+                    std::string(
+                      "The iterative (bottom right) solver in BlockSchurPreconditioner::vmult "
+                      "did not converge to a tolerance of " +
+                      Utilities::to_string(solver_control.tolerance()) +
+                      ". It reported the following error:\n\n") +
+                    exc.what()));
+              }
             else
               throw QuietException();
           }
index e4c972c1a744b68dafb6a64b523ffe53097d7007..9784b7a8fbc3af42f8b07e5d0cf3ecc2aba0a4ac 100644 (file)
@@ -241,15 +241,17 @@ namespace StokesClass
           {
             if (Utilities::MPI::this_mpi_process(
                   src.block(0).get_mpi_communicator()) == 0)
-              AssertThrow(
-                false,
-                ExcMessage(
-                  std::string(
-                    "The iterative (bottom right) solver in BlockSchurPreconditioner::vmult "
-                    "did not converge to a tolerance of " +
-                    Utilities::to_string(solver_control.tolerance()) +
-                    ". It reported the following error:\n\n") +
-                  exc.what()));
+              {
+                AssertThrow(
+                  false,
+                  ExcMessage(
+                    std::string(
+                      "The iterative (bottom right) solver in BlockSchurPreconditioner::vmult "
+                      "did not converge to a tolerance of " +
+                      Utilities::to_string(solver_control.tolerance()) +
+                      ". It reported the following error:\n\n") +
+                    exc.what()));
+              }
             else
               throw QuietException();
           }

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.