[Gmsh] 0D and 1D elements not saved for some meshes.

Bastien Gorissen bastien.gorissen at cenaero.be
Fri Apr 17 12:14:11 CEST 2009


Hi,

I'm currently writing a "topology reconstruction" routine using the Gmsh
API, have found something strange in the process. I downloaded some .geo
files from the wiki (namely "box.geo" and "ext.geo") to use as test
cases, and it seems that Gmsh doesn't save mesh elements defined on
edges or vertices. For example, creating a 1D mesh for either of these
two geometries looks like it's working fine in gmsh, but the outputted
.msh files are "empty" :

$MeshFormat
2 0 8
$EndMeshFormat
$Nodes
0
$EndNodes
$Elements
0
$EndElements

On the other hand, everything works fine with the VERY simple geometry I
pasted below. Is this the intended behaviour ?

I'm using the 2.3.1 version of Gmsh under Linux, by the way. If I can
give anyone any other useful information, please tell me.

Bastien Gorissen

Very simple test case that works (a cube) :

Point(1) = {-1, -1, -1, 1e+22};
Point(2) = {-1, -1, 1, 1e+22};
Point(3) = {-1, 1, -1, 1e+22};
Point(4) = {-1, 1, 1, 1e+22};
Point(5) = {1, -1, -1, 1e+22};
Point(6) = {1, -1, 1, 1e+22};
Point(7) = {1, 1, -1, 1e+22};
Point(8) = {1, 1, 1, 1e+22};
Line(1) = {8, 4};
Line(2) = {4, 3};
Line(3) = {3, 7};
Line(4) = {7, 8};
Line(5) = {7, 5};
Line(6) = {5, 1};
Line(7) = {6, 5};
Line(8) = {2, 4};
Line(9) = {6, 2};
Line(10) = {8, 6};
Line(11) = {1, 2};
Line(12) = {3, 1};
Line Loop(14) = {1, 2, 3, 4};
Plane Surface(14) = {14};
Line Loop(16) = {8, 2, 12, 11};
Plane Surface(16) = {16};
Line Loop(18) = {6, 11, -9, 7};
Plane Surface(18) = {18};
Line Loop(20) = {10, 9, 8, -1};
Plane Surface(20) = {20};
Line Loop(22) = {6, -12, 3, 5};
Plane Surface(22) = {22};
Line Loop(24) = {4, 10, 7, -5};
Plane Surface(24) = {24};
Surface Loop(26) = {14, 20, 24, 18, 22, 16};
Volume(26) = {26};