]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify test case 17366/head
authorMartin Kronbichler <martin.kronbichler@rub.de>
Tue, 23 Jul 2024 17:08:13 +0000 (19:08 +0200)
committerMartin Kronbichler <martin.kronbichler@rub.de>
Tue, 23 Jul 2024 17:08:13 +0000 (19:08 +0200)
tests/multigrid-global-coarsening/multigrid_util.h

index 6f292c07bbbbdea8c2550ae88901320feeccf55b..888e088f797a59282fc72301f4314111f1bd91d0 100644 (file)
@@ -206,22 +206,14 @@ public:
             phi.reinit(cell);
             for (unsigned int q = 0; q < phi.n_q_points; ++q)
               {
-                if constexpr (n_components == 1)
+                Tensor<1, n_components, VectorizedArray<Number>> temp;
+                for (unsigned int v = 0; v < VectorizedArray<Number>::size();
+                     ++v)
                   {
-                    phi.submit_value(1.0, q);
-                  }
-                else
-                  {
-                    Tensor<1, n_components, VectorizedArray<Number>> temp;
-                    for (unsigned int v = 0;
-                         v < VectorizedArray<Number>::size();
-                         ++v)
-                      {
-                        for (unsigned int i = 0; i < n_components; i++)
-                          temp[i][v] = 1.;
-                      }
-                    phi.submit_value(temp, q);
+                    for (unsigned int i = 0; i < n_components; i++)
+                      temp[i][v] = 1.;
                   }
+                phi.submit_value(temp, q);
               }
 
             phi.integrate_scatter(EvaluationFlags::values, dst);

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.