diff --git a/src/serac/numerics/functional/domain_integral_kernels.hpp b/src/serac/numerics/functional/domain_integral_kernels.hpp index 69eec6309..6a58e02c3 100644 --- a/src/serac/numerics/functional/domain_integral_kernels.hpp +++ b/src/serac/numerics/functional/domain_integral_kernels.hpp @@ -268,14 +268,14 @@ void action_of_gradient_kernel(const double* dU, double* dR, derivatives_type* q using test_element = finite_element; using trial_element = finite_element; - const bool is_QOI = (test::family == Family::QOI); - const int num_qpts = num_quadrature_points(g, Q); + constexpr bool is_QOI = (test::family == Family::QOI); + constexpr int num_qpts = num_quadrature_points(g, Q); // mfem provides this information in 1D arrays, so we reshape it // into strided multidimensional arrays before using auto du = reinterpret_cast(dU); auto dr = reinterpret_cast(dR); - const TensorProductQuadratureRule rule{}; + constexpr TensorProductQuadratureRule rule{}; // for each element in the domain for (uint32_t e = 0; e < num_elements; e++) { diff --git a/src/serac/physics/heat_transfer.hpp b/src/serac/physics/heat_transfer.hpp index 9d0503f7f..d8563ed72 100644 --- a/src/serac/physics/heat_transfer.hpp +++ b/src/serac/physics/heat_transfer.hpp @@ -298,10 +298,9 @@ class HeatTransfer, std::integer_sequ */ ThermalMaterialIntegrand(MaterialType material) : material_(material) {} - // Due to nvcc's lack of support for generic lambdas (i.e. functions of the form - // auto lambda = [](auto) {}; ), this cannot be allowed. In order for this code - // to be portable to CUDA platforms, the asserts below prevent serac from compiling - // if such a lambda is supplied. + // Due to nvcc's lack of support for extended generic lambdas (i.e. functions of the form + // auto lambda = [] __host__ __device__ (auto) {}; ), MaterialType cannot be an extended + // generic lambda. The static asserts below check this. private: class DummyArgumentType { };