]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
order of indices fixed
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 15 May 2005 00:57:04 +0000 (00:57 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 15 May 2005 00:57:04 +0000 (00:57 +0000)
git-svn-id: https://svn.dealii.org/trunk@10679 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 1eda80854d0fcd37bb2afb82aaaf7bf5f52371e0..38b94030789582c6569eab26cb6a49ef4d7043e1 100644 (file)
@@ -736,7 +736,7 @@ FEValuesBase<dim>::
 get_function_grads (const InputVector                         &fe_function,
                    std::vector<std::vector<Tensor<1,dim> > > &gradients) const
 {
-  Assert (n_quadrature_points == gradients.size(),
+  Assert (gradients.size() == n_quadrature_points,
          ExcDimensionMismatch(gradients.size(), n_quadrature_points));
 
   const unsigned int n_components = fe->n_components();
@@ -769,7 +769,7 @@ get_function_grads (const InputVector                         &fe_function,
        {
          Tensor<1,dim> tmp = this->shape_grad(shape_func,point);
          tmp *= dof_values(shape_func);
-         gradients[fe->system_to_component_index(shape_func).first][point]
+         gradients[point][fe->system_to_component_index(shape_func).first]
            += tmp;
        }
       else
@@ -777,7 +777,7 @@ get_function_grads (const InputVector                         &fe_function,
          {
            Tensor<1,dim> tmp = this->shape_grad_component(shape_func,point,c);
            tmp *= dof_values(shape_func);
-           gradients[c][point] += tmp;
+           gradients[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.