Skip to content

Commit

Permalink
Merge pull request #98 from arcaneframework/unitmesh
Browse files Browse the repository at this point in the history
Unitmesh
  • Loading branch information
mohd-afeef-badri authored Jan 23, 2024
2 parents e481b16 + 29dec17 commit 55a76d9
Show file tree
Hide file tree
Showing 8 changed files with 482 additions and 0 deletions.
71 changes: 71 additions & 0 deletions meshes/msh/unitHexa.geo
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
//------------------------------------
// GMSH geo file to create a single
// hexahedral mesh element
//
// NOTE: mesh will be msh41 format
//------------------------------------

lc = 2.0;

Point(1) = {0.0 , 0.0 , 0.0 , lc};
Point(2) = {1.0 , 0.0 , 0.0 , lc};
Point(3) = {0.0 , 1.0 , 0.0 , lc};
Point(4) = {1.0 , 1.0 , 0.0 , lc};
Point(5) = {0.0 , 0.0 , 1.0 , lc};
Point(6) = {1.0 , 0.0 , 1.0 , lc};
Point(7) = {0.0 , 1.0 , 1.0 , lc};
Point(8) = {1.0 , 1.0 , 1.0 , lc};


Line(1) = {1, 5};
Line(2) = {5, 7};
Line(3) = {7, 3};
Line(4) = {3, 1};
Line(5) = {5, 6};
Line(6) = {6, 8};
Line(7) = {8, 7};
Line(8) = {8, 4};
Line(9) = {4, 3};
Line(10) = {4, 2};
Line(11) = {2, 6};
Line(12) = {2, 1};

Curve Loop(1) = {4, 1, 2, 3};
Plane Surface(1) = {1};

Curve Loop(2) = {4, -12, -10, 9};
Plane Surface(2) = {2};

Curve Loop(3) = {10, 11, 6, 8};
Plane Surface(3) = {3};

Curve Loop(4) = {2, -7, -6, -5};
Plane Surface(4) = {4};

Curve Loop(5) = {12, 1, 5, -11};
Plane Surface(5) = {5};

Curve Loop(6) = {3, -9, -8, 7};
Plane Surface(6) = {6};

Surface Loop(1) = {1, 2, 5, 4, 6, 3};
Volume(1) = {1};

Transfinite Line "*" = 2 Using Bump 0.5;
Transfinite Surface "*";
Recombine Surface "*";
Transfinite Volume "*";

Physical Surface("left", 13) = {2};
Physical Surface("right", 14) = {4};
Physical Surface("top", 15) = {3};
Physical Surface("bot", 16) = {1};
Physical Surface("side", 17) = {5, 6};

Physical Volume("vol", 18) = {1};

Physical Point("left", 19) = {1, 2, 3, 4};
Physical Point("right", 20) = {6, 5, 7, 8};

Mesh.MshFileVersion = 4.1;
Mesh 2;
111 changes: 111 additions & 0 deletions meshes/msh/unitHexa.msh
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
$MeshFormat
4.1 0 8
$EndMeshFormat
$PhysicalNames
8
0 19 "left"
0 20 "right"
2 13 "left"
2 14 "right"
2 15 "top"
2 16 "bot"
2 17 "side"
3 18 "vol"
$EndPhysicalNames
$Entities
8 12 6 1
1 0 0 0 1 19
2 1 0 0 1 19
3 0 1 0 1 19
4 1 1 0 1 19
5 0 0 1 1 20
6 1 0 1 1 20
7 0 1 1 1 20
8 1 1 1 1 20
1 0 0 0 0 0 1 0 2 1 -5
2 0 0 1 0 1 1 0 2 5 -7
3 0 1 0 0 1 1 0 2 7 -3
4 0 0 0 0 1 0 0 2 3 -1
5 0 0 1 1 0 1 0 2 5 -6
6 1 0 1 1 1 1 0 2 6 -8
7 0 1 1 1 1 1 0 2 8 -7
8 1 1 0 1 1 1 0 2 8 -4
9 0 1 0 1 1 0 0 2 4 -3
10 1 0 0 1 1 0 0 2 4 -2
11 1 0 0 1 0 1 0 2 2 -6
12 0 0 0 1 0 0 0 2 2 -1
1 0 0 0 0 1 1 1 16 4 4 1 2 3
2 0 0 0 1 1 0 1 13 4 4 -12 -10 9
3 1 0 0 1 1 1 1 15 4 10 11 6 8
4 0 0 1 1 1 1 1 14 4 2 -7 -6 -5
5 0 0 0 1 0 1 1 17 4 12 1 5 -11
6 0 1 0 1 1 1 1 17 4 3 -9 -8 7
1 0 0 0 1 1 1 1 18 6 1 2 5 4 6 3
$EndEntities
$Nodes
15 8 1 8
0 1 0 1
1
0 0 0
0 2 0 1
2
1 0 0
0 3 0 1
3
0 1 0
0 4 0 1
4
1 1 0
0 5 0 1
5
0 0 1
0 6 0 1
6
1 0 1
0 7 0 1
7
0 1 1
0 8 0 1
8
1 1 1
2 1 0 0
2 2 0 0
2 3 0 0
2 4 0 0
2 5 0 0
2 6 0 0
3 1 0 0
$EndNodes
$Elements
15 15 1 15
0 1 15 1
1 1
0 2 15 1
2 2
0 3 15 1
3 3
0 4 15 1
4 4
0 5 15 1
5 5
0 6 15 1
6 6
0 7 15 1
7 7
0 8 15 1
8 8
2 1 3 1
9 3 1 5 7
2 2 3 1
10 3 1 2 4
2 3 3 1
11 4 2 6 8
2 4 3 1
12 5 7 8 6
2 5 3 1
13 2 1 5 6
2 6 3 1
14 7 3 4 8
3 1 5 1
15 5 1 3 7 6 2 4 8
$EndElements
30 changes: 30 additions & 0 deletions meshes/msh/unitQuad.geo
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//------------------------------------
// GMSH geo file to create a single
// Quadrangular mesh element
//
// NOTE: mesh will be msh41 format
//------------------------------------

lc = 2.0;

Point(1) = {0.0 , 0.0 , 0.0 , lc};
Point(2) = {1.0 , 0.0 , 0.0 , lc};
Point(3) = {0.0 , 1.0 , 0.0 , lc};
Point(4) = {1.0 , 1.0 , 0.0 , lc};


Line(1) = {1, 2};
Line(2) = {2, 4};
Line(3) = {4, 3};
Line(4) = {3, 1};

Curve Loop(1) = {4, 1, 2, 3};
Plane Surface(1) = {1};

Physical Curve("bot", 5) = {1};
Physical Curve("right", 6) = {2};
Physical Curve("top", 7) = {3};
Physical Curve("left", 8) = {4};
Physical Surface("surface", 9) = {1};
Physical Point("left", 10) = {1, 3};
Physical Point("right", 11) = {2, 4};
66 changes: 66 additions & 0 deletions meshes/msh/unitQuad.msh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
$MeshFormat
4.1 0 8
$EndMeshFormat
$PhysicalNames
7
0 10 "left"
0 11 "right"
1 5 "bot"
1 6 "right"
1 7 "top"
1 8 "left"
2 9 "surface"
$EndPhysicalNames
$Entities
4 4 1 0
1 0 0 0 1 10
2 1 0 0 1 11
3 0 1 0 1 10
4 1 1 0 1 11
1 0 0 0 1 0 0 1 5 2 1 -2
2 1 0 0 1 1 0 1 6 2 2 -4
3 0 1 0 1 1 0 1 7 2 4 -3
4 0 0 0 0 1 0 1 8 2 3 -1
1 0 0 0 1 1 0 1 9 4 4 1 2 3
$EndEntities
$Nodes
9 4 1 4
0 1 0 1
1
0 0 0
0 2 0 1
2
1 0 0
0 3 0 1
3
0 1 0
0 4 0 1
4
1 1 0
1 1 0 0
1 2 0 0
1 3 0 0
1 4 0 0
2 1 0 0
$EndNodes
$Elements
9 9 1 9
0 1 15 1
1 1
0 2 15 1
2 2
0 3 15 1
3 3
0 4 15 1
4 4
1 1 1 1
5 1 2
1 2 1 1
6 2 4
1 3 1 1
7 4 3
1 4 1 1
8 3 1
2 1 3 1
9 1 2 4 3
$EndElements
49 changes: 49 additions & 0 deletions meshes/msh/unitTetra.geo
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
//------------------------------------
// GMSH geo file to create a single
// tetrahedral mesh element
//
// NOTE: mesh will be msh41 format
//------------------------------------

lc = 2.0;

Point(1) = {0.0 , 0.0 , 0.0 , lc};
Point(2) = {1.0 , 0.0 , 0.0 , lc};
Point(3) = {0.0 , 1.0 , 0.0 , lc};
Point(4) = {0.0 , 0.0 , 1.0 , lc};

Line(1) = {1, 4};
Line(2) = {4, 3};
Line(3) = {3, 1};
Line(4) = {4, 2};
Line(5) = {2, 1};
Line(6) = {2, 3};


Curve Loop(1) = {3, 1, 2};
Plane Surface(1) = {1};

Curve Loop(2) = {2, -6, -4};
Plane Surface(2) = {2};

Curve Loop(3) = {3, -5, 6};
Plane Surface(3) = {3};

Curve Loop(4) = {1, 4, 5};
Plane Surface(4) = {4};

Surface Loop(1) = {3, 1, 4, 2};
Volume(1) = {1};

Physical Surface("xy", 7) = {3};
Physical Surface("xz", 8) = {4};
Physical Surface("yz", 9) = {1};
Physical Surface("other", 10) = {2};

Physical Point("left", 11) = {3, 2, 1};
Physical Point("right", 12) = {4};

Physical Volume("vol", 13) = {1};

Mesh.MshFileVersion = 4.1;
Mesh 2;
Loading

0 comments on commit 55a76d9

Please sign in to comment.