[Gmsh] Meshing 1-d element

LUK ShunTim lukshuntim at gmail.com
Fri Jul 3 11:58:40 CEST 2009


Hi,

I tried using 1-d elements to mesh a simple portal frame. Here's the
.geo file.

<geo-file>
// Portal frame example .geo file

lc = 1.0;

Point(1) = {0, 0, 0, lc};
Point(2) = {0.0, 10.0, 0.0, lc};
Point(3) = {8.0, 13.0, 0.0, lc};
Point(4) = {12.0, 13.0, 0.0, lc};
Point(5) = {20.0, 10.0, 0.0, lc};
Point(6) = {20.0, 5.0, 0.0, lc};

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

Physical Point("Left support") = {1};
Physical Point("Right support") = {6};
</geo-file>

Here's the .msh file that I got by doing "Mesh |1 D"
<msh-file>
$MeshFormat
2 0 8
$EndMeshFormat
$PhysicalNames
2
1 "Left support"
2 "Right support"
$EndPhysicalNames
$Nodes
2
1 0 0 0
2 20 5 0
$EndNodes
$Elements
2
1 15 3 1 1 0 1
2 15 3 2 6 0 2
$EndElements
</msh-file>

I'd expected the .msh file will have the same 5 1-d line elements as in
the geometry file but no. :-(

And if I removed the all Line() commands (that's in fact what I stared
with) I still get the same mesh file. I guess I don't quite understand
the commands and would be grateful for any help.

Regards,
ST
--