From 3a6fef74c25dee90ee453334321c782c31c24333 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Sat, 3 Feb 2018 11:41:45 +0100 Subject: [PATCH] Remove some unnecessary calls to copy constructors. --- source/fe/fe_values.cc | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/source/fe/fe_values.cc b/source/fe/fe_values.cc index 8d73901763..43eb4df4d9 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -528,8 +528,7 @@ namespace FEValuesViews const dealii::Tensor *shape_derivative_ptr = &shape_derivatives[shape_function_data[shape_function].row_index][0]; for (unsigned int q_point=0; q_point(*shape_derivative_ptr++); + derivatives[q_point] += value * (*shape_derivative_ptr++); } } @@ -665,8 +664,7 @@ namespace FEValuesViews const dealii::Tensor *shape_derivative_ptr = &shape_derivatives[snc][0]; for (unsigned int q_point=0; q_point(*shape_derivative_ptr++); + derivatives[q_point][comp] += value * (*shape_derivative_ptr++); } else for (unsigned int d=0; d(*shape_derivative_ptr++); + derivatives[q_point][d] += value * (*shape_derivative_ptr++); } } } @@ -2891,8 +2888,7 @@ namespace internal const Tensor *shape_derivative_ptr = &shape_derivatives[shape_func][0]; for (unsigned int point=0; point(*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(*shape_derivative_ptr++); + derivatives[comp][point] += value * (*shape_derivative_ptr++); else for (unsigned int point=0; point(*shape_derivative_ptr++); + derivatives[point][comp] += value * (*shape_derivative_ptr++); } else for (unsigned int c=0; c(*shape_derivative_ptr++); + derivatives[comp][point] += value * (*shape_derivative_ptr++); else for (unsigned int point=0; point(*shape_derivative_ptr++); + derivatives[point][comp] += value * (*shape_derivative_ptr++); } } } -- 2.39.5