]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Undo the previous change: it actually proved counter productive: Compilers are better...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 11 Dec 2008 22:17:36 +0000 (22:17 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 11 Dec 2008 22:17:36 +0000 (22:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@17920 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/fe_values.h

index 13424847108c608fbd1ccb4fd87f3650936fe816..4fc65ba2c192b4266967196ea6056bfc835dee28 100644 (file)
@@ -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<dim; ++d)    
-         if (this_shape_function.is_nonzero_shape_function_component[d])
+         if (shape_function_data[shape_function].is_nonzero_shape_function_component[d])
            return_value[d]
-             = fe_values.shape_values(this_shape_function.row_index[d],
-                                      q_point);
+             = fe_values.shape_values(shape_function_data[shape_function].row_index[d],q_point);
        
        return return_value;
       }
@@ -3580,15 +3573,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 gradient_type();
     else if (snc != -1)
       {
        gradient_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_gradients[snc][q_point];
        return return_value;
       }
@@ -3596,9 +3587,9 @@ namespace FEValuesViews
       {
        gradient_type return_value;
        for (unsigned int d=0; d<dim; ++d)    
-         if (this_shape_function.is_nonzero_shape_function_component[d])
+         if (shape_function_data[shape_function].is_nonzero_shape_function_component[d])
            return_value[d]
-             = fe_values.shape_gradients[this_shape_function.row_index[d]][q_point];
+             = fe_values.shape_gradients[shape_function_data[shape_function].row_index[d]][q_point];
 
        return return_value;
       }
@@ -3622,21 +3613,19 @@ 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 divergence_type();
     else if (snc != -1)
       return
-       fe_values.shape_gradients[snc][q_point][this_shape_function.single_nonzero_component_index];
+       fe_values.shape_gradients[snc][q_point][shape_function_data[shape_function].single_nonzero_component_index];
     else
       {
        divergence_type return_value = 0;
        for (unsigned int d=0; d<dim; ++d)    
-         if (this_shape_function.is_nonzero_shape_function_component[d])
+         if (shape_function_data[shape_function].is_nonzero_shape_function_component[d])
            return_value
-             += fe_values.shape_gradients[this_shape_function.row_index[d]][q_point][d];
+             += fe_values.shape_gradients[shape_function_data[shape_function].row_index[d]][q_point][d];
 
        return return_value;
       }
@@ -3660,15 +3649,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 hessian_type();
     else if (snc != -1)
       {
        hessian_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_hessians[snc][q_point];
        return return_value;
       }
@@ -3676,9 +3663,9 @@ namespace FEValuesViews
       {
        hessian_type return_value;
        for (unsigned int d=0; d<dim; ++d)    
-         if (this_shape_function.is_nonzero_shape_function_component[d])
+         if (shape_function_data[shape_function].is_nonzero_shape_function_component[d])
            return_value[d]
-             = fe_values.shape_hessians[this_shape_function.row_index[d]][q_point];
+             = fe_values.shape_hessians[shape_function_data[shape_function].row_index[d]][q_point];
 
        return return_value;
       }
@@ -3699,15 +3686,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 symmetric_gradient_type();
     else if (snc != -1)
       {
        gradient_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_gradients[snc][q_point];
        return symmetrize(return_value);
       }
@@ -3715,9 +3700,9 @@ namespace FEValuesViews
       {
        gradient_type return_value;
        for (unsigned int d=0; d<dim; ++d)    
-         if (this_shape_function.is_nonzero_shape_function_component[d])
+         if (shape_function_data[shape_function].is_nonzero_shape_function_component[d])
            return_value[d]
-             = fe_values.shape_gradients[this_shape_function.row_index[d]][q_point];
+             = fe_values.shape_gradients[shape_function_data[shape_function].row_index[d]][q_point];
 
        return symmetrize(return_value);
       }

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.