Commit 34e0d83d authored by Axel Modave's avatar Axel Modave

pp (only TAB to space)

parent c795979b
Pipeline #1863 passed with stage
in 48 seconds
......@@ -387,11 +387,11 @@ void Fill_PostElement(struct Geo_Element * GE, List_T * PE_L,
switch(GE->Type){
case POINT :
PE = Create_PostElement(Index, POINT, 1, 1) ; /* node 1 */
PE->NumNodes[0] = GE->NumNodes[0] ;
PE->u[0] = 0. ; PE->v[0] = 0. ; PE->w[0] = 0. ;
POS_CUT_FILL ;
break ;
PE = Create_PostElement(Index, POINT, 1, 1) ; /* node 1 */
PE->NumNodes[0] = GE->NumNodes[0] ;
PE->u[0] = 0. ; PE->v[0] = 0. ; PE->w[0] = 0. ;
POS_CUT_FILL ;
break ;
case LINE_2 :
Type = (HighOrder) ? LINE_2 : LINE;
......@@ -399,7 +399,7 @@ void Fill_PostElement(struct Geo_Element * GE, List_T * PE_L,
PE = Create_PostElement(Index, Type, NbrNodes, 1) ;
for(int i=0; i<NbrNodes; i++){
PE->NumNodes[i] = GE->NumNodes[i] ;
PE->u[i] = Nodes_Line_2[i][0] ;
PE->u[i] = Nodes_Line_2[i][0] ;
PE->v[i] = Nodes_Line_2[i][1] ;
PE->w[i] = Nodes_Line_2[i][2] ;
}
......@@ -407,13 +407,13 @@ void Fill_PostElement(struct Geo_Element * GE, List_T * PE_L,
break ;
case LINE :
PE = Create_PostElement(Index, LINE, 2, 1) ; /* nodes 1 2 */
PE->NumNodes[0] = GE->NumNodes[0] ;
PE->NumNodes[1] = GE->NumNodes[1] ;
PE->u[0] =-1. ; PE->v[0] = 0. ; PE->w[0] = 0. ;
PE->u[1] = 1. ; PE->v[1] = 0. ; PE->w[1] = 0. ;
POS_CUT_FILL ;
break ;
PE = Create_PostElement(Index, LINE, 2, 1) ; /* nodes 1 2 */
PE->NumNodes[0] = GE->NumNodes[0] ;
PE->NumNodes[1] = GE->NumNodes[1] ;
PE->u[0] =-1. ; PE->v[0] = 0. ; PE->w[0] = 0. ;
PE->u[1] = 1. ; PE->v[1] = 0. ; PE->w[1] = 0. ;
POS_CUT_FILL ;
break ;
case TRIANGLE_2 :
Type = (HighOrder) ? TRIANGLE_2 : TRIANGLE;
......@@ -421,7 +421,7 @@ void Fill_PostElement(struct Geo_Element * GE, List_T * PE_L,
PE = Create_PostElement(Index, Type, NbrNodes, 1) ;
for(int i=0; i<NbrNodes; i++){
PE->NumNodes[i] = GE->NumNodes[i] ;
PE->u[i] = Nodes_Triangle_2[i][0] ;
PE->u[i] = Nodes_Triangle_2[i][0] ;
PE->v[i] = Nodes_Triangle_2[i][1] ;
PE->w[i] = Nodes_Triangle_2[i][2] ;
}
......@@ -429,61 +429,62 @@ void Fill_PostElement(struct Geo_Element * GE, List_T * PE_L,
break ;
case TRIANGLE :
PE = Create_PostElement(Index, TRIANGLE, 3, 1) ; /* nodes 1 2 3 */
PE->NumNodes[0] = GE->NumNodes[0] ;
PE->NumNodes[1] = GE->NumNodes[1] ;
PE->NumNodes[2] = GE->NumNodes[2] ;
PE->u[0] = 0. ; PE->v[0] = 0. ; PE->w[0] = 0. ;
PE->u[1] = 1. ; PE->v[1] = 0. ; PE->w[1] = 0. ;
PE->u[2] = 0. ; PE->v[2] = 1. ; PE->w[2] = 0. ;
POS_CUT_FILL ;
break ;
PE = Create_PostElement(Index, TRIANGLE, 3, 1) ; /* nodes 1 2 3 */
PE->NumNodes[0] = GE->NumNodes[0] ;
PE->NumNodes[1] = GE->NumNodes[1] ;
PE->NumNodes[2] = GE->NumNodes[2] ;
PE->u[0] = 0. ; PE->v[0] = 0. ; PE->w[0] = 0. ;
PE->u[1] = 1. ; PE->v[1] = 0. ; PE->w[1] = 0. ;
PE->u[2] = 0. ; PE->v[2] = 1. ; PE->w[2] = 0. ;
POS_CUT_FILL ;
break ;
case QUADRANGLE :
case QUADRANGLE_2 :
case QUADRANGLE_2_8N:
if(DecomposeInSimplex){
PE = Create_PostElement(Index, TRIANGLE, 3, 1); /* nodes 1 2 4 */
PE->NumNodes[0] = GE->NumNodes[0] ;
PE->NumNodes[1] = GE->NumNodes[1] ;
PE->NumNodes[2] = GE->NumNodes[3] ;
PE->u[0] =-1. ; PE->v[0] =-1. ; PE->w[0] = 0. ;
PE->u[1] = 1. ; PE->v[1] =-1. ; PE->w[1] = 0. ;
PE->u[2] =-1. ; PE->v[2] = 1. ; PE->w[2] = 0. ;
POS_CUT_FILL;
PE = Create_PostElement(Index, TRIANGLE, 3, 1); /* nodes 2 3 4 */
PE->NumNodes[0] = GE->NumNodes[1] ;
PE->NumNodes[1] = GE->NumNodes[2] ;
PE->NumNodes[2] = GE->NumNodes[3] ;
PE->u[0] = 1. ; PE->v[0] =-1. ; PE->w[0] = 0. ;
PE->u[1] = 1. ; PE->v[1] = 1. ; PE->w[1] = 0. ;
PE->u[2] =-1. ; PE->v[2] = 1. ; PE->w[2] = 0. ;
POS_CUT_FILL;
}
else{
if (!EvaluationPoints_L) {
PE = Create_PostElement(Index, QUADRANGLE, 4, 1) ; /* nodes 1 2 3 4 */
PE->NumNodes[0] = GE->NumNodes[0] ;
PE->NumNodes[1] = GE->NumNodes[1] ;
PE->NumNodes[2] = GE->NumNodes[2] ;
PE->NumNodes[3] = GE->NumNodes[3] ;
PE->u[0] = -1. ; PE->v[0] = -1. ; PE->w[0] = 0. ;
PE->u[1] = 1. ; PE->v[1] = -1. ; PE->w[1] = 0. ;
PE->u[2] = 1. ; PE->v[2] = 1. ; PE->w[2] = 0. ;
PE->u[3] = -1. ; PE->v[3] = 1. ; PE->w[3] = 0. ;
}
else { /* Only for Quadrangles now, to be extended... */
Nbr_EP = List_Nbr(EvaluationPoints_L)/3;
PE = Create_PostElement(Index, QUADRANGLE, Nbr_EP, 1) ;
for (i_EP=0 ; i_EP<Nbr_EP ; i_EP++) {
List_Read(EvaluationPoints_L, i_EP*3+0, &PE->u[i_EP]);
List_Read(EvaluationPoints_L, i_EP*3+1, &PE->v[i_EP]);
List_Read(EvaluationPoints_L, i_EP*3+2, &PE->w[i_EP]);
}
}
POS_CUT_FILL ;
}
break ;
if(DecomposeInSimplex){
PE = Create_PostElement(Index, TRIANGLE, 3, 1); /* nodes 1 2 4 */
PE->NumNodes[0] = GE->NumNodes[0] ;
PE->NumNodes[1] = GE->NumNodes[1] ;
PE->NumNodes[2] = GE->NumNodes[3] ;
PE->u[0] =-1. ; PE->v[0] =-1. ; PE->w[0] = 0. ;
PE->u[1] = 1. ; PE->v[1] =-1. ; PE->w[1] = 0. ;
PE->u[2] =-1. ; PE->v[2] = 1. ; PE->w[2] = 0. ;
POS_CUT_FILL;
PE = Create_PostElement(Index, TRIANGLE, 3, 1); /* nodes 2 3 4 */
PE->NumNodes[0] = GE->NumNodes[1] ;
PE->NumNodes[1] = GE->NumNodes[2] ;
PE->NumNodes[2] = GE->NumNodes[3] ;
PE->u[0] = 1. ; PE->v[0] =-1. ; PE->w[0] = 0. ;
PE->u[1] = 1. ; PE->v[1] = 1. ; PE->w[1] = 0. ;
PE->u[2] =-1. ; PE->v[2] = 1. ; PE->w[2] = 0. ;
POS_CUT_FILL;
}
else{
if (!EvaluationPoints_L) {
PE = Create_PostElement(Index, QUADRANGLE, 4, 1) ; /* nodes 1 2 3 4 */
PE->NumNodes[0] = GE->NumNodes[0] ;
PE->NumNodes[1] = GE->NumNodes[1] ;
PE->NumNodes[2] = GE->NumNodes[2] ;
PE->NumNodes[3] = GE->NumNodes[3] ;
PE->u[0] = -1. ; PE->v[0] = -1. ; PE->w[0] = 0. ;
PE->u[1] = 1. ; PE->v[1] = -1. ; PE->w[1] = 0. ;
PE->u[2] = 1. ; PE->v[2] = 1. ; PE->w[2] = 0. ;
PE->u[3] = -1. ; PE->v[3] = 1. ; PE->w[3] = 0. ;
}
else { /* Only for Quadrangles now, to be extended... */
Nbr_EP = List_Nbr(EvaluationPoints_L)/3;
PE = Create_PostElement(Index, QUADRANGLE, Nbr_EP, 1) ;
for (i_EP=0 ; i_EP<Nbr_EP ; i_EP++) {
List_Read(EvaluationPoints_L, i_EP*3+0, &PE->u[i_EP]);
List_Read(EvaluationPoints_L, i_EP*3+1, &PE->v[i_EP]);
List_Read(EvaluationPoints_L, i_EP*3+2, &PE->w[i_EP]);
}
}
POS_CUT_FILL ;
}
break ;
case TETRAHEDRON_2 :
Type = (HighOrder) ? TETRAHEDRON_2 : TETRAHEDRON;
......@@ -491,7 +492,7 @@ void Fill_PostElement(struct Geo_Element * GE, List_T * PE_L,
PE = Create_PostElement(Index, Type, NbrNodes, 1) ;
for(int i=0; i<NbrNodes; i++){
PE->NumNodes[i] = GE->NumNodes[i] ;
PE->u[i] = Nodes_Tetrahedron_2[i][0] ;
PE->u[i] = Nodes_Tetrahedron_2[i][0] ;
PE->v[i] = Nodes_Tetrahedron_2[i][1] ;
PE->w[i] = Nodes_Tetrahedron_2[i][2] ;
}
......@@ -499,17 +500,17 @@ void Fill_PostElement(struct Geo_Element * GE, List_T * PE_L,
break ;
case TETRAHEDRON :
PE = Create_PostElement(Index, TETRAHEDRON, 4, 1) ; /* nodes 1 2 3 4 */
PE->NumNodes[0] = GE->NumNodes[0] ;
PE->NumNodes[1] = GE->NumNodes[1] ;
PE->NumNodes[2] = GE->NumNodes[2] ;
PE->NumNodes[3] = GE->NumNodes[3] ;
PE->u[0] = 0. ; PE->v[0] = 0. ; PE->w[0] = 0. ;
PE->u[1] = 1. ; PE->v[1] = 0. ; PE->w[1] = 0. ;
PE->u[2] = 0. ; PE->v[2] = 1. ; PE->w[2] = 0. ;
PE->u[3] = 0. ; PE->v[3] = 0. ; PE->w[3] = 1. ;
POS_CUT_FILL;
break ;
PE = Create_PostElement(Index, TETRAHEDRON, 4, 1) ; /* nodes 1 2 3 4 */
PE->NumNodes[0] = GE->NumNodes[0] ;
PE->NumNodes[1] = GE->NumNodes[1] ;
PE->NumNodes[2] = GE->NumNodes[2] ;
PE->NumNodes[3] = GE->NumNodes[3] ;
PE->u[0] = 0. ; PE->v[0] = 0. ; PE->w[0] = 0. ;
PE->u[1] = 1. ; PE->v[1] = 0. ; PE->w[1] = 0. ;
PE->u[2] = 0. ; PE->v[2] = 1. ; PE->w[2] = 0. ;
PE->u[3] = 0. ; PE->v[3] = 0. ; PE->w[3] = 1. ;
POS_CUT_FILL;
break ;
case HEXAHEDRON :
if(DecomposeInSimplex){
......
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