-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* handle geo files * allow for `simplexgrid("my.msh")` and `simplexgrid("my.geo")` * allow for `write("my.msh",grid) * file handling with gmsh initializes and finalizes
- Loading branch information
Showing
6 changed files
with
205 additions
and
74 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
// | ||
// Copied and distributed with permission from | ||
// https://www.math.univ-paris13.fr/~cuvelier/software/gmshgeo.html | ||
// | ||
|
||
DefineConstant[ | ||
N = {10, Name "Input/1Points "} | ||
]; | ||
L=1; | ||
h=L/N; | ||
|
||
Point (1) = {0, 0, 0, h}; | ||
Point (2) = {L, 0, 0, h}; | ||
Point (3) = {L, L, 0, h}; | ||
Point (4) = {0, L, 0, h}; | ||
Point (5) = {0, 0, L, h}; | ||
Point (6) = {L, 0, L, h}; | ||
Point (7) = {L, L, L, h}; | ||
Point (8) = {0, L, L, h}; | ||
Line (1) = {1, 2}; | ||
Line (2) = {2, 3}; | ||
Line (3) = {3, 4}; | ||
Line (4) = {4, 1}; | ||
Line (5) = {5, 6}; | ||
Line (6) = {6, 7}; | ||
Line (7) = {7, 8}; | ||
Line (8) = {8, 5}; | ||
Line (9) = {1, 5}; | ||
Line (10) = {2, 6}; | ||
Line (11) = {3, 7}; | ||
Line (12) = {4, 8}; | ||
|
||
Line Loop(13) = {3, 12, -7, -11}; | ||
Plane Surface(4) = {13}; | ||
Line Loop(15) = {4, 9, -8, -12}; | ||
Plane Surface(1) = {15}; | ||
Line Loop(17) = {5, -10, -1, 9}; | ||
Plane Surface(3) = {17}; | ||
Line Loop(19) = {3, 4, 1, 2}; | ||
Plane Surface(5) = {19}; | ||
Line Loop(21) = {11, -6, -10, 2}; | ||
Plane Surface(2) = {21}; | ||
Line Loop(23) = {7, 8, 5, 6}; | ||
Plane Surface(6) = {23}; | ||
Surface Loop(25) = {4, 5, 1, 3, 6, 2}; | ||
Volume(1) = {25}; | ||
|
||
Physical Line(1) = {1}; | ||
Physical Line(2) = {2}; | ||
Physical Line(3) = {3}; | ||
Physical Line(4) = {4}; | ||
Physical Line(5) = {5}; | ||
Physical Line(6) = {6}; | ||
Physical Line(7) = {7}; | ||
Physical Line(8) = {8}; | ||
Physical Line(9) = {9}; | ||
Physical Line(10) = {10}; | ||
Physical Line(11) = {11}; | ||
Physical Line(12) = {12}; | ||
Physical Surface(1) = {1}; | ||
Physical Surface(4) = {4}; | ||
Physical Surface(5) = {5}; | ||
Physical Surface(2) = {2}; | ||
Physical Surface(6) = {6}; | ||
Physical Surface(3) = {3}; | ||
Physical Volume(1) = {1}; | ||
Physical Point(101) = {1}; | ||
Physical Point(102) = {2}; | ||
Physical Point(103) = {3}; | ||
Physical Point(104) = {4}; | ||
Physical Point(201) = {5}; | ||
Physical Point(202) = {6}; | ||
Physical Point(203) = {7}; | ||
Physical Point(204) = {8}; |
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,34 @@ | ||
// | ||
// Copied and distributed with permission from | ||
// https://www.math.univ-paris13.fr/~cuvelier/software/gmshgeo.html | ||
// | ||
|
||
N=20; | ||
h = 1/N; | ||
R=1.; | ||
r=0.45; | ||
// Center Points of big circle | ||
Point(1) = {0, 0, 0, h}; | ||
Point(2) = {R, 0, 0, h}; | ||
Point(3) = {-R, 0, 0, h/2}; | ||
Point(4) = {0,R, 0, h}; | ||
Point(5) = {0,-R, 0, h}; | ||
|
||
Point(6) = {-r, 0, 0, h}; // center | ||
Point(7) = {-r, r, 0, h}; | ||
Point(8) = {-r, -r, 0, h}; | ||
Point(9) = {-2*r, 0, 0, h/2}; | ||
Circle(1) = {2, 1, 4}; | ||
Circle(2) = {4, 1, 3}; | ||
Circle(3) = {3, 1, 5}; | ||
Circle(4) = {5, 1, 2}; | ||
Circle(5) = {1, 6, 7}; | ||
Circle(6) = {7, 6, 9}; | ||
Circle(7) = {9, 6, 8}; | ||
Circle(8) = {8, 6, 1}; | ||
Line Loop(9) = {1, 2, 3, 4}; | ||
Line Loop(10) = {5, 6, 7, 8}; | ||
Plane Surface(11) = {9, 10}; | ||
Physical Line(1) = {1, 2, 3, 4}; | ||
Physical Line(2) = {5, 6, 7, 8}; | ||
Physical Surface(1) = {11}; |
Oops, something went wrong.