]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
handle quadrature_points_fastest correctly
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 12 May 2005 09:16:31 +0000 (09:16 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 12 May 2005 09:16:31 +0000 (09:16 +0000)
git-svn-id: https://svn.dealii.org/trunk@10666 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/fe/fe_values.cc

index 477e360bc38de05f7d5aef5956286ea862142a2e..1eda80854d0fcd37bb2afb82aaaf7bf5f52371e0 100644 (file)
@@ -849,26 +849,26 @@ void FEValuesBase<dim>::get_function_grads (
       for (unsigned int point=0; point<n_quadrature_points; ++point)
        for (unsigned int shape_func=0; shape_func<dofs_per_cell; ++shape_func)
          if (fe->is_primitive(shape_func))
-           values[point][fe->system_to_component_index(shape_func).first
-                         +mc * n_components]
+           values[fe->system_to_component_index(shape_func).first
+                  +mc * n_components][point]
              += fe_function(indices[shape_func+mc*dofs_per_cell])
              * shape_grad(shape_func, point);
          else
            for (unsigned int c=0; c<n_components; ++c)
-             values[point][c] += (fe_function(indices[shape_func]) *
+             values[c][point] += (fe_function(indices[shape_func]) *
                                   shape_grad_component(shape_func, point, c));
   else
     for (unsigned int mc = 0; mc < component_multiple; ++mc)
       for (unsigned int point=0; point<n_quadrature_points; ++point)
        for (unsigned int shape_func=0; shape_func<dofs_per_cell; ++shape_func)
          if (fe->is_primitive(shape_func))
-           values[fe->system_to_component_index(shape_func).first
-                  +mc * n_components][point]
+           values[point][fe->system_to_component_index(shape_func).first
+                         +mc * n_components]
              += fe_function(indices[shape_func+mc*dofs_per_cell])
              * shape_grad(shape_func, point);
          else
            for (unsigned int c=0; c<n_components; ++c)
-             values[c][point] += (fe_function(indices[shape_func]) *
+             values[point][c] += (fe_function(indices[shape_func]) *
                                   shape_grad_component(shape_func, point, c));
 }
 
@@ -952,7 +952,7 @@ get_function_2nd_derivatives (const InputVector                         &fe_func
          {
            Tensor<2,dim> tmp(shape_2nd_derivative(shape_func,point));
            tmp *= dof_values(shape_func);
-           second_derivs[point][fe->system_to_component_index(shape_func).first]
+           second_derivs[fe->system_to_component_index(shape_func).first][point]
              += tmp;
          }
        else
@@ -960,7 +960,7 @@ get_function_2nd_derivatives (const InputVector                         &fe_func
            {
              Tensor<2,dim> tmp = this->shape_2nd_derivative_component(shape_func,point,c);
              tmp *= dof_values(shape_func);
-             second_derivs[point][c] += tmp;
+             second_derivs[c][point] += tmp;
            }
   else
     for (unsigned int point=0; point<n_quadrature_points; ++point)
@@ -969,7 +969,7 @@ get_function_2nd_derivatives (const InputVector                         &fe_func
          {
            Tensor<2,dim> tmp(shape_2nd_derivative(shape_func,point));
            tmp *= dof_values(shape_func);
-           second_derivs[fe->system_to_component_index(shape_func).first][point]
+           second_derivs[point][fe->system_to_component_index(shape_func).first]
              += tmp;
          }
        else
@@ -977,7 +977,7 @@ get_function_2nd_derivatives (const InputVector                         &fe_func
            {
              Tensor<2,dim> tmp = this->shape_2nd_derivative_component(shape_func,point,c);
              tmp *= dof_values(shape_func);
-             second_derivs[c][point] += tmp;
+             second_derivs[point][c] += tmp;
            }
 }
 

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.