]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove some unnecessary calls to copy constructors. 5848/head
authorJean-Paul Pelteret <jppelteret@gmail.com>
Sat, 3 Feb 2018 10:41:45 +0000 (11:41 +0100)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Sat, 3 Feb 2018 18:13:46 +0000 (19:13 +0100)
source/fe/fe_values.cc

index 8d73901763e6cd30ab56f6fc2394c16b9fb91a4d..43eb4df4d9fbf47ba22f01577e06f84bfa8d9128 100644 (file)
@@ -528,8 +528,7 @@ namespace FEValuesViews
             const dealii::Tensor<order,spacedim> *shape_derivative_ptr =
               &shape_derivatives[shape_function_data[shape_function].row_index][0];
             for (unsigned int q_point=0; q_point<n_quadrature_points; ++q_point)
-              derivatives[q_point] += value *
-                                      dealii::Tensor<order,spacedim>(*shape_derivative_ptr++);
+              derivatives[q_point] += value * (*shape_derivative_ptr++);
           }
     }
 
@@ -665,8 +664,7 @@ namespace FEValuesViews
               const dealii::Tensor<order,spacedim> *shape_derivative_ptr =
                 &shape_derivatives[snc][0];
               for (unsigned int q_point=0; q_point<n_quadrature_points; ++q_point)
-                derivatives[q_point][comp] += value *
-                                              dealii::Tensor<order,spacedim>(*shape_derivative_ptr++);
+                derivatives[q_point][comp] += value * (*shape_derivative_ptr++);
             }
           else
             for (unsigned int d=0; d<spacedim; ++d)
@@ -676,8 +674,7 @@ namespace FEValuesViews
                     &shape_derivatives[shape_function_data[shape_function].
                                        row_index[d]][0];
                   for (unsigned int q_point=0; q_point<n_quadrature_points; ++q_point)
-                    derivatives[q_point][d] += value *
-                                               dealii::Tensor<order,spacedim>(*shape_derivative_ptr++);
+                    derivatives[q_point][d] += value * (*shape_derivative_ptr++);
                 }
         }
     }
@@ -2891,8 +2888,7 @@ namespace internal
         const Tensor<order,spacedim> *shape_derivative_ptr
           = &shape_derivatives[shape_func][0];
         for (unsigned int point=0; point<n_quadrature_points; ++point)
-          derivatives[point] += value *
-                                dealii::Tensor<order,spacedim>(*shape_derivative_ptr++);
+          derivatives[point] += value * (*shape_derivative_ptr++);
       }
   }
 
@@ -2964,12 +2960,10 @@ namespace internal
 
               if (quadrature_points_fastest)
                 for (unsigned int point=0; point<n_quadrature_points; ++point)
-                  derivatives[comp][point] += value *
-                                              dealii::Tensor<order,spacedim>(*shape_derivative_ptr++);
+                  derivatives[comp][point] += value * (*shape_derivative_ptr++);
               else
                 for (unsigned int point=0; point<n_quadrature_points; ++point)
-                  derivatives[point][comp] += value *
-                                              dealii::Tensor<order,spacedim>(*shape_derivative_ptr++);
+                  derivatives[point][comp] += value * (*shape_derivative_ptr++);
             }
           else
             for (unsigned int c=0; c<n_components; ++c)
@@ -2986,12 +2980,10 @@ namespace internal
 
                 if (quadrature_points_fastest)
                   for (unsigned int point=0; point<n_quadrature_points; ++point)
-                    derivatives[comp][point] += value *
-                                                dealii::Tensor<order,spacedim>(*shape_derivative_ptr++);
+                    derivatives[comp][point] += value * (*shape_derivative_ptr++);
                 else
                   for (unsigned int point=0; point<n_quadrature_points; ++point)
-                    derivatives[point][comp] += value *
-                                                dealii::Tensor<order,spacedim>(*shape_derivative_ptr++);
+                    derivatives[point][comp] += value * (*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.