-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #231 from mfem/mfem_47_dev
PyMFEM4.7
- Loading branch information
Showing
27 changed files
with
1,670 additions
and
700 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
SetFactory("OpenCASCADE"); | ||
|
||
order = 1; | ||
|
||
R = 1; | ||
r = 0.2; | ||
|
||
Point(1) = {0,0,0}; | ||
|
||
Point(2) = {r/Sqrt(2),r/Sqrt(2),0}; | ||
Point(3) = {-r/Sqrt(2),r/Sqrt(2),0}; | ||
Point(4) = {-r/Sqrt(2),-r/Sqrt(2),0}; | ||
Point(5) = {r/Sqrt(2),-r/Sqrt(2),0}; | ||
|
||
Point(6) = {R,0,0}; | ||
Point(7) = {R/Sqrt(2),R/Sqrt(2),0}; | ||
Point(8) = {0,R,0}; | ||
Point(9) = {-R/Sqrt(2),R/Sqrt(2),0}; | ||
Point(10) = {-R,0,0}; | ||
Point(11) = {-R/Sqrt(2),-R/Sqrt(2),0}; | ||
Point(12) = {0,-R,0}; | ||
Point(13) = {R/Sqrt(2),-R/Sqrt(2),0}; | ||
|
||
Line(1) = {1,2}; | ||
Line(2) = {1,3}; | ||
Line(3) = {1,4}; | ||
Line(4) = {1,5}; | ||
|
||
Line(5) = {1,6}; | ||
Line(6) = {1,8}; | ||
Line(7) = {1,10}; | ||
Line(8) = {1,12}; | ||
|
||
Line(9) = {2,6}; | ||
Line(10) = {2,8}; | ||
Line(11) = {3,8}; | ||
Line(12) = {3,10}; | ||
Line(13) = {4,10}; | ||
Line(14) = {4,12}; | ||
Line(15) = {5,12}; | ||
Line(16) = {5,6}; | ||
|
||
Line(17) = {6,7}; | ||
Line(18) = {7,8}; | ||
Line(19) = {8,9}; | ||
Line(20) = {9,10}; | ||
Line(21) = {10,11}; | ||
Line(22) = {11,12}; | ||
Line(23) = {12,13}; | ||
Line(24) = {13,6}; | ||
|
||
Transfinite Curve{1:24} = 2; | ||
|
||
Physical Curve("ENE") = {17}; | ||
Physical Curve("NNE") = {18}; | ||
Physical Curve("NNW") = {19}; | ||
Physical Curve("WNW") = {20}; | ||
Physical Curve("WSW") = {21}; | ||
Physical Curve("SSW") = {22}; | ||
Physical Curve("SSE") = {23}; | ||
Physical Curve("ESE") = {24}; | ||
|
||
Curve Loop(1) = {9,17,18,-10}; | ||
Curve Loop(2) = {11,19,20,-12}; | ||
Curve Loop(3) = {13,21,22,-14}; | ||
Curve Loop(4) = {15,23,24,-16}; | ||
|
||
Plane Surface(1) = {1}; | ||
Plane Surface(2) = {2}; | ||
Plane Surface(3) = {3}; | ||
Plane Surface(4) = {4}; | ||
|
||
Transfinite Surface{1} = {2,6,7,8}; | ||
Transfinite Surface{2} = {3,8,9,10}; | ||
Transfinite Surface{3} = {4,10,11,12}; | ||
Transfinite Surface{4} = {5,12,13,6}; | ||
Recombine Surface{1:4}; | ||
|
||
Physical Surface("Base") = {1,2,3,4}; | ||
|
||
Curve Loop(5) = {1,10,-6}; | ||
Plane Surface(5) = {5}; | ||
Physical Surface("N Even") = {5}; | ||
|
||
Curve Loop(6) = {6,-11,-2}; | ||
Plane Surface(6) = {6}; | ||
Physical Surface("N Odd") = {6}; | ||
|
||
Curve Loop(7) = {2,12,-7}; | ||
Plane Surface(7) = {7}; | ||
Physical Surface("W Even") = {7}; | ||
|
||
Curve Loop(8) = {7,-13,-3}; | ||
Plane Surface(8) = {8}; | ||
Physical Surface("W Odd") = {8}; | ||
|
||
Curve Loop(9) = {3,14,-8}; | ||
Plane Surface(9) = {9}; | ||
Physical Surface("S Even") = {9}; | ||
|
||
Curve Loop(10) = {8,-15,-4}; | ||
Plane Surface(10) = {10}; | ||
Physical Surface("S Odd") = {10}; | ||
|
||
Curve Loop(11) = {4,16,-5}; | ||
Plane Surface(11) = {11}; | ||
Physical Surface("E Even") = {11}; | ||
|
||
Curve Loop(12) = {5,-9,-1}; | ||
Plane Surface(12) = {12}; | ||
Physical Surface("E Odd") = {12}; | ||
|
||
// Generate 2D mesh | ||
Mesh 2; | ||
SetOrder order; | ||
Mesh.MshFileVersion = 2.2; | ||
|
||
Save "compass.msh"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
MFEM mesh v1.3 | ||
|
||
# | ||
# MFEM Geometry Types (see mesh/geom.hpp): | ||
# | ||
# POINT = 0 | ||
# SEGMENT = 1 | ||
# TRIANGLE = 2 | ||
# SQUARE = 3 | ||
# TETRAHEDRON = 4 | ||
# CUBE = 5 | ||
# PRISM = 6 | ||
# | ||
|
||
dimension | ||
2 | ||
|
||
elements | ||
12 | ||
10 2 7 0 1 | ||
11 2 0 7 2 | ||
12 2 9 0 2 | ||
13 2 0 9 3 | ||
14 2 11 0 3 | ||
15 2 0 11 4 | ||
16 2 5 0 4 | ||
17 2 0 5 1 | ||
9 3 1 5 6 7 | ||
9 3 2 7 8 9 | ||
9 3 3 9 10 11 | ||
9 3 4 11 12 5 | ||
|
||
attribute_sets | ||
16 | ||
"Base" 1 9 | ||
"E Even" 1 16 | ||
"E Odd" 1 17 | ||
"East" 2 16 17 | ||
"N Even" 1 10 | ||
"N Odd" 1 11 | ||
"North" 2 10 11 | ||
"Rose" 8 10 11 12 13 14 15 16 17 | ||
"Rose Even" 4 10 12 14 16 | ||
"Rose Odd" 4 11 13 15 17 | ||
"S Even" 1 14 | ||
"S Odd" 1 15 | ||
"South" 2 14 15 | ||
"W Even" 1 12 | ||
"W Odd" 1 13 | ||
"West" 2 12 13 | ||
|
||
boundary | ||
8 | ||
1 1 5 6 | ||
2 1 6 7 | ||
3 1 7 8 | ||
4 1 8 9 | ||
5 1 9 10 | ||
6 1 10 11 | ||
7 1 11 12 | ||
8 1 12 5 | ||
|
||
bdr_attribute_sets | ||
13 | ||
"Boundary" 8 1 2 3 4 5 6 7 8 | ||
"ENE" 1 1 | ||
"ESE" 1 8 | ||
"Eastern Boundary" 2 1 8 | ||
"NNE" 1 2 | ||
"NNW" 1 3 | ||
"Northern Boundary" 2 2 3 | ||
"SSE" 1 7 | ||
"SSW" 1 6 | ||
"Southern Boundary" 2 6 7 | ||
"WNW" 1 4 | ||
"WSW" 1 5 | ||
"Western Boundary" 2 4 5 | ||
|
||
vertices | ||
13 | ||
2 | ||
0 0 | ||
0.14142136 0.14142136 | ||
-0.14142136 0.14142136 | ||
-0.14142136 -0.14142136 | ||
0.14142136 -0.14142136 | ||
1 0 | ||
0.70710678 0.70710678 | ||
0 1 | ||
-0.70710678 0.70710678 | ||
-1 0 | ||
-0.70710678 -0.70710678 | ||
0 -1 | ||
0.70710678 -0.70710678 | ||
|
||
mfem_mesh_end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
$MeshFormat | ||
2.2 0 8 | ||
$EndMeshFormat | ||
$PhysicalNames | ||
17 | ||
1 1 "ENE" | ||
1 2 "NNE" | ||
1 3 "NNW" | ||
1 4 "WNW" | ||
1 5 "WSW" | ||
1 6 "SSW" | ||
1 7 "SSE" | ||
1 8 "ESE" | ||
2 9 "Base" | ||
2 10 "N Even" | ||
2 11 "N Odd" | ||
2 12 "W Even" | ||
2 13 "W Odd" | ||
2 14 "S Even" | ||
2 15 "S Odd" | ||
2 16 "E Even" | ||
2 17 "E Odd" | ||
$EndPhysicalNames | ||
$Nodes | ||
13 | ||
1 0 0 0 | ||
2 0.1414213562373095 0.1414213562373095 0 | ||
3 -0.1414213562373095 0.1414213562373095 0 | ||
4 -0.1414213562373095 -0.1414213562373095 0 | ||
5 0.1414213562373095 -0.1414213562373095 0 | ||
6 1 0 0 | ||
7 0.7071067811865475 0.7071067811865475 0 | ||
8 0 1 0 | ||
9 -0.7071067811865475 0.7071067811865475 0 | ||
10 -1 0 0 | ||
11 -0.7071067811865475 -0.7071067811865475 0 | ||
12 0 -1 0 | ||
13 0.7071067811865475 -0.7071067811865475 0 | ||
$EndNodes | ||
$Elements | ||
20 | ||
1 1 2 1 17 6 7 | ||
2 1 2 2 18 7 8 | ||
3 1 2 3 19 8 9 | ||
4 1 2 4 20 9 10 | ||
5 1 2 5 21 10 11 | ||
6 1 2 6 22 11 12 | ||
7 1 2 7 23 12 13 | ||
8 1 2 8 24 13 6 | ||
9 2 2 10 5 1 2 8 | ||
10 2 2 11 6 1 8 3 | ||
11 2 2 12 7 1 3 10 | ||
12 2 2 13 8 1 10 4 | ||
13 2 2 14 9 1 4 12 | ||
14 2 2 15 10 1 12 5 | ||
15 2 2 16 11 1 5 6 | ||
16 2 2 17 12 1 6 2 | ||
17 3 2 9 1 2 6 7 8 | ||
18 3 2 9 2 3 8 9 10 | ||
19 3 2 9 3 4 10 11 12 | ||
20 3 2 9 4 5 12 13 6 | ||
$EndElements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.