From: Matthias Maier Date: Tue, 10 Dec 2024 02:47:56 +0000 (-0600) Subject: MatrixFree/TensorProductPointKernels: fix compilation with Number = float X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F17920%2Fhead;p=dealii.git MatrixFree/TensorProductPointKernels: fix compilation with Number = float --- diff --git a/include/deal.II/matrix_free/tensor_product_point_kernels.h b/include/deal.II/matrix_free/tensor_product_point_kernels.h index cff17b6216..18651140cd 100644 --- a/include/deal.II/matrix_free/tensor_product_point_kernels.h +++ b/include/deal.II/matrix_free/tensor_product_point_kernels.h @@ -1503,7 +1503,7 @@ namespace internal } else if (dim == 1) { - const auto x0 = 1. - p[0], x1 = p[0]; + const auto x0 = Number(1.) - p[0], x1 = p[0]; if (add) { @@ -1518,7 +1518,8 @@ namespace internal } else if (dim == 2) { - const auto x0 = 1. - p[0], x1 = p[0], y0 = 1. - p[1], y1 = p[1]; + const auto x0 = Number(1.) - p[0], x1 = p[0], y0 = Number(1.) - p[1], + y1 = p[1]; const auto test_value_y0 = value * y0; const auto test_value_y1 = value * y1; @@ -1540,8 +1541,8 @@ namespace internal } else if (dim == 3) { - const auto x0 = 1. - p[0], x1 = p[0], y0 = 1. - p[1], y1 = p[1], - z0 = 1. - p[2], z1 = p[2]; + const auto x0 = Number(1.) - p[0], x1 = p[0], y0 = Number(1.) - p[1], + y1 = p[1], z0 = Number(1.) - p[2], z1 = p[2]; const auto test_value_z0 = value * z0; const auto test_value_z1 = value * z1;