[Gmsh] simple question

Ju LIU luis.saturday at gmail.com
Fri Jun 30 03:06:50 CEST 2017


Hi Gmsh team:

I just strated using Gmsh for my work. I have a very simple question. I am
trying to mesh a 2D square with the following input:

lc = 5e-2;

Point(1) = {0, 0, 0, lc};
Point(2) = {.1, 0, 0, lc};
Point(3) = {.1, .1, 0, lc};
Point(4) = {0, .1, 0, lc};

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

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

Plane Surface(2) = {1};

Physical Surface(2001) = {1} ;

After running gmsh e1.geo -2, I get .msh file like the following.

$MeshFormat
2.2 0 8
$EndMeshFormat
$Nodes
13
1 0 0 0
2 0.1 0 0
3 0.1 0.1 0
4 0 0.1 0
5 0.04999999999986842 0 0
6 0.1 0.04999999999986842 0
7 0.05000000000013695 0.1 0
8 0 0.05000000000013695 0
9 0.05000000000000001 0.05000000000000001 0
10 0.02500000000006846 0.07500000000006848 0
11 0.07500000000003423 0.07499999999996711 0
12 0.07499999999994619 0.0249999999999462 0
13 0.02499999999993154 0.02500000000006847 0
$EndNodes
$Elements
28
1 15 2 0 1 1
2 15 2 0 2 2
3 15 2 0 3 3
4 15 2 0 4 4
5 1 2 0 1 1 5
6 1 2 0 1 5 2
7 1 2 0 2 2 6
8 1 2 0 2 6 3
9 1 2 0 3 3 7
10 1 2 0 3 7 4
11 1 2 0 4 4 8
12 1 2 0 4 8 1
13 2 2 0 2 13 10 8
14 2 2 0 2 9 10 13
15 2 2 0 2 4 10 7
16 2 2 0 2 1 13 8
17 2 2 0 2 3 11 6
18 2 2 0 2 2 12 5
19 2 2 0 2 7 10 9
20 2 2 0 2 7 9 11
21 2 2 0 2 6 11 9
22 2 2 0 2 5 9 13
23 2 2 0 2 5 12 9
24 2 2 0 2 6 9 12
25 2 2 0 2 1 5 13
26 2 2 0 2 2 6 12
27 2 2 0 2 4 8 10
28 2 2 0 2 3 7 11
$EndElements

I am not sure where is the physical tag 2001 for the surface in the output
msh file.

Thanks,

Luis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20170629/6edc56a2/attachment-0001.html>


More information about the gmsh mailing list