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

Jean-Francois Remacle jean-francois.remacle at uclouvain.be
Fri Apr 17 12:30:41 CEST 2009


Le 17-avr.-09 à 12:14, Bastien Gorissen a écrit :

> 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" :
>

try

gmsh foo.geo -saveall

jfr

> $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};
>
>
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh

----------------
Prof. Jean-Francois Remacle
Universite catholique de Louvain (UCL)
Tel : +32-10-472082 -- Mobile : +32-473-909930