Skip to content
Snippets Groups Projects
Commit a0e443d8 authored by Samuel Melchior's avatar Samuel Melchior
Browse files

Bug closure 3D corrigé

parent f13dedb1
No related branches found
No related tags found
No related merge requests found
......@@ -675,8 +675,8 @@ static void getFaceClosure(int iFace, int iSign, int iRotate, std::vector<int> &
closure[0] = 0;
break;
default:
int face[4][3] = {{0, 1, 2}, {0, 4, -3}, {1, 5, -4}, {-2, 5, -3}};
int order1node[4][3] = {{0, 1, 2}, {0, 1, 3}, {1, 2, 3}, {0, 2, 3}};
int face[4][3] = {{-3, -2, -1}, {1, -6, 4}, {-4, 5, 3}, {6, 2, -5}};
int order1node[4][3] = {{0, 2, 1}, {0, 1, 3}, {0, 3, 2}, {3, 1, 2}};
// int facedofstmp[200];
// face 0 | 0 1 2
// face 1 | 0 4 -3
......@@ -687,19 +687,19 @@ static void getFaceClosure(int iFace, int iSign, int iRotate, std::vector<int> &
// edge 2 | 4+2*(order-1)-> 4+ 3*(order-1)-1
// edge k | 4+k*(order-1) -> 4+(k+1)*(order-1)-1
for (int i = 0; i < 3; ++i){
int k = (3 + (iSign * i) + iRotate) % 3;
int k = (3 + (iSign * i) + iRotate) % 3; //- iSign * iRotate
closure[i] = order1node[iFace][k];
}
for (int i = 0;i < 3; ++i){
int edgenumber = iSign *
face[iFace][(6 + i * iSign + (-1 + iSign) / 2 + iRotate) % 3];
face[iFace][(6 + i * iSign + (-1 + iSign) / 2 + iRotate) % 3]; //- iSign * iRotate
for (int k = 0; k < (order - 1); k++){
if (edgenumber > 0 || ((edgenumber == 0) && (iSign > 0)))
if (edgenumber > 0)
closure[3 + i * (order - 1) + k] =
4 + edgenumber * (order - 1) + k;
4 + (edgenumber - 1) * (order - 1) + k;
else
closure[3 + i * (order - 1) + k] =
4 + (1 - edgenumber) * (order - 1) - 1 - k;
4 + (-edgenumber) * (order - 1) - 1 - k;
}
}
int fi = 3 + 3 * (order - 1);
......@@ -710,13 +710,13 @@ static void getFaceClosure(int iFace, int iSign, int iRotate, std::vector<int> &
int orderint = order - 3 - k * 3;
if (orderint > 0){
for (int ci = 0; ci < 3 ; ci++){
int shift = (3 + iSign * ci + iRotate) % 3;
int shift = (3 + iSign * ci + iRotate) % 3; //- iSign * iRotate
closure[fi + ci] = ti + shift;
}
fi = fi + 3; ti = ti + 3;
for (int l = 0; l < orderint - 1; l++){
for (int ei = 0; ei < 3; ei++){
int edgenumber = (6 + ei * iSign + (-1 + iSign) / 2 + iRotate) % 3;
int edgenumber = (6 + ei * iSign + (-1 + iSign) / 2 + iRotate) % 3; //- iSign * iRotate
if (iSign > 0)
closure[fi + ei * (orderint - 1) + l] =
ti + edgenumber * (orderint - 1) + l;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment