From: David Wells Date: Mon, 21 Aug 2023 01:26:45 +0000 (-0400) Subject: Improve aliasing by explicitly copying a value. X-Git-Tag: relicensing~577^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39c7255f2e54a56479f4cffbcaddaeed6ffd69e0;p=dealii.git Improve aliasing by explicitly copying a value. --- diff --git a/source/fe/fe_values_views_internal.cc b/source/fe/fe_values_views_internal.cc index 4a038e2122..ab6abb8a6e 100644 --- a/source/fe/fe_values_views_internal.cc +++ b/source/fe/fe_values_views_internal.cc @@ -81,7 +81,7 @@ namespace FEValuesViews if (shape_function_data[shape_function] .is_nonzero_shape_function_component) { - const Number &value = dof_values[shape_function]; + const Number value = dof_values[shape_function]; // For auto-differentiable numbers, the fact that a DoF value is // zero does not imply that its derivatives are zero as well. So we // can't filter by value for these number types. @@ -122,7 +122,7 @@ namespace FEValuesViews if (shape_function_data[shape_function] .is_nonzero_shape_function_component) { - const Number &value = dof_values[shape_function]; + const Number value = dof_values[shape_function]; // For auto-differentiable numbers, the fact that a DoF value is // zero does not imply that its derivatives are zero as well. So we // can't filter by value for these number types. @@ -164,7 +164,7 @@ namespace FEValuesViews if (shape_function_data[shape_function] .is_nonzero_shape_function_component) { - const Number &value = dof_values[shape_function]; + const Number value = dof_values[shape_function]; // For auto-differentiable numbers, the fact that a DoF value is // zero does not imply that its derivatives are zero as well. So we // can't filter by value for these number types. @@ -212,7 +212,7 @@ namespace FEValuesViews // shape function is zero for the selected components continue; - const Number &value = dof_values[shape_function]; + const Number value = dof_values[shape_function]; // For auto-differentiable numbers, the fact that a DoF value is zero // does not imply that its derivatives are zero as well. So we // can't filter by value for these number types. @@ -274,7 +274,7 @@ namespace FEValuesViews // shape function is zero for the selected components continue; - const Number &value = dof_values[shape_function]; + const Number value = dof_values[shape_function]; // For auto-differentiable numbers, the fact that a DoF value is zero // does not imply that its derivatives are zero as well. So we // can't filter by value for these number types. @@ -340,7 +340,7 @@ namespace FEValuesViews // shape function is zero for the selected components continue; - const Number &value = dof_values[shape_function]; + const Number value = dof_values[shape_function]; // For auto-differentiable numbers, the fact that a DoF value is zero // does not imply that its derivatives are zero as well. So we // can't filter by value for these number types. @@ -408,7 +408,7 @@ namespace FEValuesViews // shape function is zero for the selected components continue; - const Number &value = dof_values[shape_function]; + const Number value = dof_values[shape_function]; // For auto-differentiable numbers, the fact that a DoF value is zero // does not imply that its derivatives are zero as well. So we // can't filter by value for these number types. @@ -485,7 +485,7 @@ namespace FEValuesViews // shape function is zero for the selected components continue; - const Number &value = dof_values[shape_function]; + const Number value = dof_values[shape_function]; // For auto-differentiable numbers, the fact that a DoF value // is zero does not imply that its derivatives are zero as // well. So we can't filter by value for these number types. @@ -568,7 +568,7 @@ namespace FEValuesViews // shape function is zero for the selected components continue; - const Number &value = dof_values[shape_function]; + const Number value = dof_values[shape_function]; // For auto-differentiable numbers, the fact that a DoF value // is zero does not imply that its derivatives are zero as // well. So we can't filter by value for these number types. @@ -731,7 +731,7 @@ namespace FEValuesViews // shape function is zero for the selected components continue; - const Number &value = dof_values[shape_function]; + const Number value = dof_values[shape_function]; // For auto-differentiable numbers, the fact that a DoF value is zero // does not imply that its derivatives are zero as well. So we // can't filter by value for these number types. @@ -801,7 +801,7 @@ namespace FEValuesViews // shape function is zero for the selected components continue; - const Number &value = dof_values[shape_function]; + const Number value = dof_values[shape_function]; // For auto-differentiable numbers, the fact that a DoF value is zero // does not imply that its derivatives are zero as well. So we // can't filter by value for these number types. @@ -870,7 +870,7 @@ namespace FEValuesViews // shape function is zero for the selected components continue; - const Number &value = dof_values[shape_function]; + const Number value = dof_values[shape_function]; // For auto-differentiable numbers, the fact that a DoF value is zero // does not imply that its derivatives are zero as well. So we // can't filter by value for these number types. @@ -977,7 +977,7 @@ namespace FEValuesViews // shape function is zero for the selected components continue; - const Number &value = dof_values[shape_function]; + const Number value = dof_values[shape_function]; // For auto-differentiable numbers, the fact that a DoF value is zero // does not imply that its derivatives are zero as well. So we // can't filter by value for these number types. @@ -1047,7 +1047,7 @@ namespace FEValuesViews // shape function is zero for the selected components continue; - const Number &value = dof_values[shape_function]; + const Number value = dof_values[shape_function]; // For auto-differentiable numbers, the fact that a DoF value is zero // does not imply that its derivatives are zero as well. So we // can't filter by value for these number types. @@ -1117,7 +1117,7 @@ namespace FEValuesViews // shape function is zero for the selected components continue; - const Number &value = dof_values[shape_function]; + const Number value = dof_values[shape_function]; // For auto-differentiable numbers, the fact that a DoF value is zero // does not imply that its derivatives are zero as well. So we // can't filter by value for these number types.