Skip to content

Commit

Permalink
Fix face permutations with respect to reference frames.
Browse files Browse the repository at this point in the history
Signed-off-by: Jed Brown <jed@59A2.org>
  • Loading branch information
jedbrown committed Nov 7, 2008
1 parent d530805 commit 1aaaa83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/fs/tests/ex1.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static dErr verifyAdjacencies(dMesh mesh)
0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
0,0,1,1,0, 0,0,0,1,0, 0,1,0,0,0, 0,0,1,1,0,
1,1,0,0,0, 1,0,0,1,0, 1,1,1,1,1, 1,0,1,0,0,
1,1,1,0,0, 0,0,7,4,1, 7,5,2,2,4, 0};
1,1,1,0,0, 0,0,5,4,1, 5,7,2,2,4, 0};
struct dMeshAdjacency ma;
dInt i;
dErr err;
Expand Down
4 changes: 2 additions & 2 deletions src/jacobi/impls/tensor/tensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ static dErr dJacobiAddConstraints_Tensor(dJacobi dUNUSED jac,dInt nx,const dInt
{{0,2,1},{5,0,0}}, {{1,2,1},{5,1,0}}, {{2,2,1},{5,2,0}}, {{3,2,1},{5,3,0}}, /* top */
{{0,3,1},{3,1,0}}, {{0,1,0},{1,3,1}}, {{1,1,0},{2,3,1}}, {{2,1,0},{3,3,1}}}; /* vertical */
//const dInt fperm[8][4] = {{0,1,2,3},{1,2,3,0},{2,3,0,1},{3,0,1,2},{3,2,1,0},{0,3,2,1},{1,0,3,2},{0,3,2,1}};
const dInt iperm[8][4] = {{0,1,2,3},{3,0,1,2},{2,3,0,1},{1,2,3,0},{3,2,1,0},{0,3,2,1},{1,0,3,2},{0,3,2,1}};
const dInt iperm[8][4] = {{0,1,2,3},{3,0,1,2},{2,3,0,1},{1,2,3,0},{3,2,1,0},{0,3,2,1},{1,0,3,2},{2,1,0,3}};
const dInt ef0 = fe[i][0].f,ef1 = fe[i][1].f;
e[i] = aI[aO[f[ef0]] + iperm[fP[ef0]][fe[i][0].e]];
if (e[i] != aI[aO[f[ef1]] + iperm[fP[ef1]][fe[i][1].e]])
Expand Down Expand Up @@ -364,7 +364,7 @@ static dErr dJacobiAddConstraints_Tensor(dJacobi dUNUSED jac,dInt nx,const dInt
}
interp[0] = 1;
err = MatSetValues(C,nrow,irow,ncol,icol,interp,INSERT_VALUES);dCHK(err);
err = MatSetValues(C,nrow,irow,ncol,icol,interp,INSERT_VALUES);dCHK(err);
err = MatSetValues(Cp,nrow,irow,ncol,icol,interp,INSERT_VALUES);dCHK(err);
}
}
for (i=0; i<6; i++) { /* Faces */
Expand Down

0 comments on commit 1aaaa83

Please sign in to comment.