Commit df41ef5e by Axel Modave

TETRAHEDRON_2: fix node position (like in Gmsh)

parent a1c8e14f
Pipeline #1145 passed with stage
in 52 seconds
......@@ -166,11 +166,11 @@ void BF_Node(struct Element * Element, int NumNode,
case 3 : *s = v*(2.*v-1.) ; break ;
case 4 : *s = w*(2.*w-1.) ; break ;
case 5 : *s = 4.*r*u ; break ;
case 6 : *s = 4.*r*v ; break ;
case 7 : *s = 4.*r*w ; break ;
case 8 : *s = 4.*u*v ; break ;
case 9 : *s = 4.*u*w ; break ;
case 10 : *s = 4.*v*w ; break ;
case 6 : *s = 4.*u*v ; break ;
case 7 : *s = 4.*r*v ; break ;
case 8 : *s = 4.*r*w ; break ;
case 9 : *s = 4.*v*w ; break ;
case 10 : *s = 4.*u*w ; break ;
default : WrongNumNode ;
}
break ;
......@@ -397,11 +397,11 @@ void BF_GradNode(struct Element * Element, int NumNode,
case 3 : s[0] = 0 ; s[1] = (4.*v-1) ; s[2] = 0 ; break ;
case 4 : s[0] = 0 ; s[1] = 0 ; s[2] = (4.*w-1) ; break ;
case 5 : s[0] = 4.*(r-u) ; s[1] = -4.*u ; s[2] = -4.*u ; break ;
case 6 : s[0] = -4.*v ; s[1] = 4.*(r-v) ; s[2] = -4.*v ; break ;
case 7 : s[0] = -4.*w ; s[1] = -4.*w ; s[2] = 4.*(r-w) ; break ;
case 8 : s[0] = 4.*v ; s[1] = 4.*u ; s[2] = 0 ; break ;
case 9 : s[0] = 4.*w ; s[1] = 0 ; s[2] = 4.*u ; break ;
case 10 : s[0] = 0 ; s[1] = 4.*w ; s[2] = 4.*v ; break ;
case 6 : s[0] = 4.*v ; s[1] = 4.*u ; s[2] = 0 ; break ;
case 7 : s[0] = -4.*v ; s[1] = 4.*(r-v) ; s[2] = -4.*v ; break ;
case 8 : s[0] = -4.*w ; s[1] = -4.*w ; s[2] = 4.*(r-w) ; break ;
case 9 : s[0] = 0 ; s[1] = 4.*w ; s[2] = 4.*v ; break ;
case 10 : s[0] = 4.*w ; s[1] = 0 ; s[2] = 4.*u ; break ;
default : WrongNumNode ;
}
break ;
......
......@@ -330,20 +330,20 @@ static int Dfn_Tetrahedron [] [NBR_MAX_SUBENTITIES_IN_ELEMENT]
= { { 1, 2, 4, 0}, { 1, 3, 2, 0},
{ 1, 4, 3, 0}, { 2, 3, 4, 0} } ;
/* ------------------------------------------------------------------------
TETRAHEDRON_2 edge 1: nodes 1 -> 2
v 2: 1 -> 3
| 3: 1 -> 4
| 4: 2 -> 3
| 5: 2 -> 4
3 6: 3 -> 4
|\
| \ facet 1: edges 1 -3 5 nodes 1 2 4
|__\2_____u 2: -1 2 -4 1 3 2
1\ / 3: -2 3 -6 1 4 3
\4 4: 4 -5 6 2 3 4
\
w
/* ------------------------------------------------------------------------ *
TETRAHEDRON_2 edge 1: nodes 1 -> 2
3 2: 1 -> 3
,/|`\ 3: 1 -> 4
,/ | `\ 4: 2 -> 3
,7 '. `6 5: 2 -> 4
,/ 9 `\ 6: 3 -> 4
,/ | `\
1--------5--'.--------2 facet 1: edges 1 -3 5 nodes 1 2 4
`\. | ,/ 2: -1 2 -4 1 3 2
`\. | ,10 3: -2 3 -6 1 4 3
`8. '. ,/ 4: 4 -5 6 2 3 4
`\. |/
`4
------------------------------------------------------------------------ */
static int NbrNodes_Tetrahedron_2 = 10 ;
......@@ -352,9 +352,14 @@ static int NbrFacets_Tetrahedron_2 = 4 ;
static double Nodes_Tetrahedron_2 [][3]
= { {0., 0., 0.}, {1., 0., 0.}, {0., 1., 0.}, {0., 0., 1.},
{0.5, 0., 0.}, {0.5, 0.5, 0.}, {0., 0.5, 0.},
{0., 0., 0.5}, {0., 0.5, 0.5}, {0.5, 0., 0.5} } ;
/*
static double Nodes_Tetrahedron_2 [][3]
= { {0., 0., 0.}, {1., 0., 0.}, {0., 1., 0.}, {0., 0., 1.},
{0.5, 0., 0.}, {0., 0.5, 0.}, {0., 0., 0.5},
{0.5, 0.5, 0.}, {0.5, 0., 0.5}, {0., 0.5, 0.5} } ;
*/
static int Den_Tetrahedron_2 [] [NBR_MAX_SUBENTITIES_IN_ELEMENT]
= { { 1, -2, 0}, { 1, -3, 0}, { 1, -4, 0},
{ 2, -3, 0}, { 2, -4, 0}, { 3, -4, 0} } ;
......
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