]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove a template parameter specifying the number type of a tensor.
authorJean-Paul Pelteret <jppelteret@gmail.com>
Sat, 3 Feb 2018 08:24:19 +0000 (09:24 +0100)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Sat, 3 Feb 2018 18:13:46 +0000 (19:13 +0100)
This will prevent premature casting of one tensor type into another;
this operation is now taken up in the more general Tensor::operator*.

source/fe/fe_values.cc

index 686d6c35c98999aa8f745addd5bf550bef664292..8d73901763e6cd30ab56f6fc2394c16b9fb91a4d 100644 (file)
@@ -2892,7 +2892,7 @@ namespace internal
           = &shape_derivatives[shape_func][0];
         for (unsigned int point=0; point<n_quadrature_points; ++point)
           derivatives[point] += value *
-                                dealii::Tensor<order,spacedim,Number>(*shape_derivative_ptr++);
+                                dealii::Tensor<order,spacedim>(*shape_derivative_ptr++);
       }
   }
 
@@ -2965,11 +2965,11 @@ namespace internal
               if (quadrature_points_fastest)
                 for (unsigned int point=0; point<n_quadrature_points; ++point)
                   derivatives[comp][point] += value *
-                                              dealii::Tensor<order,spacedim,Number>(*shape_derivative_ptr++);
+                                              dealii::Tensor<order,spacedim>(*shape_derivative_ptr++);
               else
                 for (unsigned int point=0; point<n_quadrature_points; ++point)
                   derivatives[point][comp] += value *
-                                              dealii::Tensor<order,spacedim,Number>(*shape_derivative_ptr++);
+                                              dealii::Tensor<order,spacedim>(*shape_derivative_ptr++);
             }
           else
             for (unsigned int c=0; c<n_components; ++c)
@@ -2987,11 +2987,11 @@ namespace internal
                 if (quadrature_points_fastest)
                   for (unsigned int point=0; point<n_quadrature_points; ++point)
                     derivatives[comp][point] += value *
-                                                dealii::Tensor<order,spacedim,Number>(*shape_derivative_ptr++);
+                                                dealii::Tensor<order,spacedim>(*shape_derivative_ptr++);
                 else
                   for (unsigned int point=0; point<n_quadrature_points; ++point)
                     derivatives[point][comp] += value *
-                                                dealii::Tensor<order,spacedim,Number>(*shape_derivative_ptr++);
+                                                dealii::Tensor<order,spacedim>(*shape_derivative_ptr++);
               }
         }
   }

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.