]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Gradients were computed wrong way round
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 30 May 2005 15:10:59 +0000 (15:10 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 30 May 2005 15:10:59 +0000 (15:10 +0000)
git-svn-id: https://svn.dealii.org/trunk@10779 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/polynomials_raviart_thomas.cc

index 3b16c0c4212c6acdd7b57c7f63cfd4e6e6e22e3a..ea7dd0f2d00b28f3b8854bf897d8824b5a805e14 100644 (file)
@@ -85,16 +85,15 @@ PolynomialsRaviartThomas<dim>::compute (const Point<dim>            &unit_point,
       for (unsigned int i=0;i<p_values.size();++i)
          values[i+d*n_sub][d] = p_values[i];
       
-                                      // Let's hope this is not the transpose
       for (unsigned int i=0;i<p_grads.size();++i)
        for (unsigned int d1=0;d1<dim;++d1)
-         grads[i+d*n_sub][d][d1] = p_grads[i][(d1+d)%dim];
+         grads[i+d*n_sub][d][(d1+d)%dim] = p_grads[i][d1];
       
-                                      // Let's hope this is not the transpose
       for (unsigned int i=0;i<p_grad_grads.size();++i)
        for (unsigned int d1=0;d1<dim;++d1)
          for (unsigned int d2=0;d2<dim;++d2)
-           grad_grads[i+d*n_sub][d][d1][d2] = p_grad_grads[i][(d1+d)%dim][(d2+d)%dim];
+           grad_grads[i+d*n_sub][d][(d1+d)%dim][(d2+d)%dim]
+             = p_grad_grads[i][d1][d2];
     }
 }
 

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.