]> https://gitweb.dealii.org/ - dealii.git/commitdiff
MatrixFree/TensorProductPointKernels: fix compilation with Number = float 17924/head
authorMatthias Maier <tamiko@43-1.org>
Tue, 10 Dec 2024 02:47:56 +0000 (20:47 -0600)
committerMatthias Maier <tamiko@43-1.org>
Wed, 11 Dec 2024 15:57:13 +0000 (09:57 -0600)
include/deal.II/matrix_free/tensor_product_point_kernels.h

index cff17b6216096dfbfe2ebee9109cc3b943eb5abd..18651140cdce7b098627b7a4e5de23fef312cce4 100644 (file)
@@ -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;

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.