From: Daniel Arndt Date: Fri, 31 Mar 2023 16:21:28 +0000 (+0000) Subject: Work around nvcc compiler bug X-Git-Tag: v9.5.0-rc1~384^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15011%2Fhead;p=dealii.git Work around nvcc compiler bug --- diff --git a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h index 2f9fc9ec04..5cec4ffa6a 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h @@ -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(); // p-MG: bisection + { + constexpr unsigned int degree_coarse_used = std::max(deg / 2u, 1u); + fu.template run(); // p-MG: bisection + } else if ((degree_fine == deg) && (degree_coarse == deg)) fu.template run(); // identity (nothing to do) else if ((degree_fine == deg) && (degree_coarse == std::max(deg - 1, 1u))) - fu.template run(); // p-MG: -- + { + constexpr unsigned int degree_coarse_used = std::max(deg - 1u, 1u); + fu.template run(); // p-MG: -- + } else if ((degree_fine == deg) && (degree_coarse == 1)) fu.template run(); // p-MG: jump to 1 else if (deg < max_degree)