Commit 8f55ab9c authored by akbib's avatar akbib Committed by akbib@FU-BERLIN.DE
Browse files

bugfix: indices were computed wrong

[[Imported from SVN: r11298]]
parent 51b53c8b
...@@ -210,7 +210,7 @@ private: ...@@ -210,7 +210,7 @@ private:
// the resulting matrix is skew symmetric with entries <cross,degGrad[i]> // the resulting matrix is skew symmetric with entries <cross,degGrad[i]>
for (int i=0; i<dim; i++) for (int i=0; i<dim; i++)
for (int j=i+1; j<dim; j++) { for (int j=i+1; j<dim; j++) {
int k= (-(i+j))%dim; int k= (dim-(i+j))%dim;
res[i][j] = (cross*defGrad[k])*std::pow(-1,k); res[i][j] = (cross*defGrad[k])*std::pow(-1,k);
res[j][i] = -res[i][j]; res[j][i] = -res[i][j];
} }
......
...@@ -134,8 +134,8 @@ namespace Dune { ...@@ -134,8 +134,8 @@ namespace Dune {
linDet = 0; linDet = 0;
for (int i=0; i<2; i++) for (int i=0; i<2; i++)
for (int j=(i+1)%3; j<3; j++) { for (int j=i+1; j<3; j++) {
int k=(-(i+j))%3; int k=(3-(i+j))%3;
linDet[i][j] = u[j][k]*u[k][i] - u[j][i]*(1+u[k][k]); linDet[i][j] = u[j][k]*u[k][i] - u[j][i]*(1+u[k][k]);
linDet[j][i] = u[k][j]*u[i][k] - u[i][j]*(1+u[k][k]); linDet[j][i] = u[k][j]*u[i][k] - u[i][j]*(1+u[k][k]);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment