From 4c4c08715ec5b2e466033568cb7f8e26868f0d2e Mon Sep 17 00:00:00 2001 From: bangerth Date: Thu, 11 Dec 2008 22:17:36 +0000 Subject: [PATCH] Undo the previous change: it actually proved counter productive: Compilers are better at CSE than one can apparently do in source code... git-svn-id: https://svn.dealii.org/trunk@17920 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/fe/fe_values.h | 71 ++++++++++---------------- 1 file changed, 28 insertions(+), 43 deletions(-) diff --git a/deal.II/deal.II/include/fe/fe_values.h b/deal.II/deal.II/include/fe/fe_values.h index 1342484710..4fc65ba2c1 100644 --- a/deal.II/deal.II/include/fe/fe_values.h +++ b/deal.II/deal.II/include/fe/fe_values.h @@ -3457,10 +3457,9 @@ namespace FEValuesViews // component as fixed and we have // pre-computed and cached a bunch of // information. see the comments there - const ShapeFunctionData &this_shape_function - = shape_function_data[shape_function]; - if (this_shape_function.is_nonzero_shape_function_component) - return fe_values.shape_values(this_shape_function.row_index, + if (shape_function_data[shape_function].is_nonzero_shape_function_component) + return fe_values.shape_values(shape_function_data[shape_function] + .row_index, q_point); else return 0; @@ -3487,10 +3486,9 @@ namespace FEValuesViews // component as fixed and we have // pre-computed and cached a bunch of // information. see the comments there - const ShapeFunctionData &this_shape_function - = shape_function_data[shape_function]; - if (this_shape_function.is_nonzero_shape_function_component) - return fe_values.shape_gradients[this_shape_function.row_index][q_point]; + if (shape_function_data[shape_function].is_nonzero_shape_function_component) + return fe_values.shape_gradients[shape_function_data[shape_function] + .row_index][q_point]; else return gradient_type(); } @@ -3515,10 +3513,8 @@ namespace FEValuesViews // component as fixed and we have // pre-computed and cached a bunch of // information. see the comments there - const ShapeFunctionData &this_shape_function - = shape_function_data[shape_function]; - if (this_shape_function.is_nonzero_shape_function_component) - return fe_values.shape_hessians[this_shape_function.row_index][q_point]; + if (shape_function_data[shape_function].is_nonzero_shape_function_component) + return fe_values.shape_hessians[shape_function_data[shape_function].row_index][q_point]; else return hessian_type(); } @@ -3539,15 +3535,13 @@ namespace FEValuesViews // same as for the scalar case except // that we have one more index - const ShapeFunctionData &this_shape_function - = shape_function_data[shape_function]; - const int snc = this_shape_function.single_nonzero_component; + const int snc = shape_function_data[shape_function].single_nonzero_component; if (snc == -2) return value_type(); else if (snc != -1) { value_type return_value; - return_value[this_shape_function.single_nonzero_component_index] + return_value[shape_function_data[shape_function].single_nonzero_component_index] = fe_values.shape_values(snc,q_point); return return_value; } @@ -3555,10 +3549,9 @@ namespace FEValuesViews { value_type return_value; for (unsigned int d=0; d