From dc6c87e99b4d021fd87906cf7ec922ac2d1c85d7 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Mon, 9 Dec 2024 20:47:56 -0600 Subject: [PATCH] MatrixFree/TensorProductPointKernels: fix compilation with Number = float --- .../deal.II/matrix_free/tensor_product_point_kernels.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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; -- 2.39.5