]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Work around nvcc compiler bug 15011/head
authorDaniel Arndt <arndtd@ornl.gov>
Fri, 31 Mar 2023 16:21:28 +0000 (16:21 +0000)
committerDaniel Arndt <arndtd@ornl.gov>
Fri, 31 Mar 2023 16:26:11 +0000 (16:26 +0000)
include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h

index 2f9fc9ec04660c3f3b7f53d453f6bee25729abe2..5cec4ffa6a1caa3128f45ca3a89a1139644b8897 100644 (file)
@@ -76,11 +76,17 @@ namespace
       else if ((degree_fine == (2 * deg + 1)) && (degree_coarse == deg))
         fu.template run<2 * deg + 1, deg>(); // h-MG
       else if ((degree_fine == deg) && (degree_coarse == std::max(deg / 2, 1u)))
-        fu.template run<deg, std::max(deg / 2u, 1u)>(); // p-MG: bisection
+        {
+          constexpr unsigned int degree_coarse_used = std::max(deg / 2u, 1u);
+          fu.template run<deg, degree_coarse_used>(); // p-MG: bisection
+        }
       else if ((degree_fine == deg) && (degree_coarse == deg))
         fu.template run<deg, deg>(); // identity (nothing to do)
       else if ((degree_fine == deg) && (degree_coarse == std::max(deg - 1, 1u)))
-        fu.template run<deg, std::max(deg - 1u, 1u)>(); // p-MG: --
+        {
+          constexpr unsigned int degree_coarse_used = std::max(deg - 1u, 1u);
+          fu.template run<deg, degree_coarse_used>(); // p-MG: --
+        }
       else if ((degree_fine == deg) && (degree_coarse == 1))
         fu.template run<deg, 1>(); // p-MG: jump to 1
       else if (deg < max_degree)

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.