Skip to content

Commit 29dec17

Browse files
unit Hexa mesh
1 parent 44f34a8 commit 29dec17

File tree

2 files changed

+182
-0
lines changed

2 files changed

+182
-0
lines changed

meshes/msh/unitHexa.geo

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
//------------------------------------
2+
// GMSH geo file to create a single
3+
// hexahedral mesh element
4+
//
5+
// NOTE: mesh will be msh41 format
6+
//------------------------------------
7+
8+
lc = 2.0;
9+
10+
Point(1) = {0.0 , 0.0 , 0.0 , lc};
11+
Point(2) = {1.0 , 0.0 , 0.0 , lc};
12+
Point(3) = {0.0 , 1.0 , 0.0 , lc};
13+
Point(4) = {1.0 , 1.0 , 0.0 , lc};
14+
Point(5) = {0.0 , 0.0 , 1.0 , lc};
15+
Point(6) = {1.0 , 0.0 , 1.0 , lc};
16+
Point(7) = {0.0 , 1.0 , 1.0 , lc};
17+
Point(8) = {1.0 , 1.0 , 1.0 , lc};
18+
19+
20+
Line(1) = {1, 5};
21+
Line(2) = {5, 7};
22+
Line(3) = {7, 3};
23+
Line(4) = {3, 1};
24+
Line(5) = {5, 6};
25+
Line(6) = {6, 8};
26+
Line(7) = {8, 7};
27+
Line(8) = {8, 4};
28+
Line(9) = {4, 3};
29+
Line(10) = {4, 2};
30+
Line(11) = {2, 6};
31+
Line(12) = {2, 1};
32+
33+
Curve Loop(1) = {4, 1, 2, 3};
34+
Plane Surface(1) = {1};
35+
36+
Curve Loop(2) = {4, -12, -10, 9};
37+
Plane Surface(2) = {2};
38+
39+
Curve Loop(3) = {10, 11, 6, 8};
40+
Plane Surface(3) = {3};
41+
42+
Curve Loop(4) = {2, -7, -6, -5};
43+
Plane Surface(4) = {4};
44+
45+
Curve Loop(5) = {12, 1, 5, -11};
46+
Plane Surface(5) = {5};
47+
48+
Curve Loop(6) = {3, -9, -8, 7};
49+
Plane Surface(6) = {6};
50+
51+
Surface Loop(1) = {1, 2, 5, 4, 6, 3};
52+
Volume(1) = {1};
53+
54+
Transfinite Line "*" = 2 Using Bump 0.5;
55+
Transfinite Surface "*";
56+
Recombine Surface "*";
57+
Transfinite Volume "*";
58+
59+
Physical Surface("left", 13) = {2};
60+
Physical Surface("right", 14) = {4};
61+
Physical Surface("top", 15) = {3};
62+
Physical Surface("bot", 16) = {1};
63+
Physical Surface("side", 17) = {5, 6};
64+
65+
Physical Volume("vol", 18) = {1};
66+
67+
Physical Point("left", 19) = {1, 2, 3, 4};
68+
Physical Point("right", 20) = {6, 5, 7, 8};
69+
70+
Mesh.MshFileVersion = 4.1;
71+
Mesh 2;

meshes/msh/unitHexa.msh

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
$MeshFormat
2+
4.1 0 8
3+
$EndMeshFormat
4+
$PhysicalNames
5+
8
6+
0 19 "left"
7+
0 20 "right"
8+
2 13 "left"
9+
2 14 "right"
10+
2 15 "top"
11+
2 16 "bot"
12+
2 17 "side"
13+
3 18 "vol"
14+
$EndPhysicalNames
15+
$Entities
16+
8 12 6 1
17+
1 0 0 0 1 19
18+
2 1 0 0 1 19
19+
3 0 1 0 1 19
20+
4 1 1 0 1 19
21+
5 0 0 1 1 20
22+
6 1 0 1 1 20
23+
7 0 1 1 1 20
24+
8 1 1 1 1 20
25+
1 0 0 0 0 0 1 0 2 1 -5
26+
2 0 0 1 0 1 1 0 2 5 -7
27+
3 0 1 0 0 1 1 0 2 7 -3
28+
4 0 0 0 0 1 0 0 2 3 -1
29+
5 0 0 1 1 0 1 0 2 5 -6
30+
6 1 0 1 1 1 1 0 2 6 -8
31+
7 0 1 1 1 1 1 0 2 8 -7
32+
8 1 1 0 1 1 1 0 2 8 -4
33+
9 0 1 0 1 1 0 0 2 4 -3
34+
10 1 0 0 1 1 0 0 2 4 -2
35+
11 1 0 0 1 0 1 0 2 2 -6
36+
12 0 0 0 1 0 0 0 2 2 -1
37+
1 0 0 0 0 1 1 1 16 4 4 1 2 3
38+
2 0 0 0 1 1 0 1 13 4 4 -12 -10 9
39+
3 1 0 0 1 1 1 1 15 4 10 11 6 8
40+
4 0 0 1 1 1 1 1 14 4 2 -7 -6 -5
41+
5 0 0 0 1 0 1 1 17 4 12 1 5 -11
42+
6 0 1 0 1 1 1 1 17 4 3 -9 -8 7
43+
1 0 0 0 1 1 1 1 18 6 1 2 5 4 6 3
44+
$EndEntities
45+
$Nodes
46+
15 8 1 8
47+
0 1 0 1
48+
1
49+
0 0 0
50+
0 2 0 1
51+
2
52+
1 0 0
53+
0 3 0 1
54+
3
55+
0 1 0
56+
0 4 0 1
57+
4
58+
1 1 0
59+
0 5 0 1
60+
5
61+
0 0 1
62+
0 6 0 1
63+
6
64+
1 0 1
65+
0 7 0 1
66+
7
67+
0 1 1
68+
0 8 0 1
69+
8
70+
1 1 1
71+
2 1 0 0
72+
2 2 0 0
73+
2 3 0 0
74+
2 4 0 0
75+
2 5 0 0
76+
2 6 0 0
77+
3 1 0 0
78+
$EndNodes
79+
$Elements
80+
15 15 1 15
81+
0 1 15 1
82+
1 1
83+
0 2 15 1
84+
2 2
85+
0 3 15 1
86+
3 3
87+
0 4 15 1
88+
4 4
89+
0 5 15 1
90+
5 5
91+
0 6 15 1
92+
6 6
93+
0 7 15 1
94+
7 7
95+
0 8 15 1
96+
8 8
97+
2 1 3 1
98+
9 3 1 5 7
99+
2 2 3 1
100+
10 3 1 2 4
101+
2 3 3 1
102+
11 4 2 6 8
103+
2 4 3 1
104+
12 5 7 8 6
105+
2 5 3 1
106+
13 2 1 5 6
107+
2 6 3 1
108+
14 7 3 4 8
109+
3 1 5 1
110+
15 5 1 3 7 6 2 4 8
111+
$EndElements

0 commit comments

Comments
 (0)