[Gmsh] Medit file format

Christophe Geuzaine cgeuzaine at ulg.ac.be
Wed May 5 11:35:04 CEST 2010

On 05/05/10 01:03, Geordie McBain wrote:
> 2010/5/4 Martin Vymazal<martin.vymazal at vki.ac.be>:
>> Hi Geordie,
>>   you're right, it works. In fact, I forgot to define some surface or volume
>> last time, that's why the cube was not meshed properly. I would have had the
>> same problem if I saved the output in any other file format supported by
>> gmsh.
>>   There's still a slight problem, though (I think). I force the faces of the
>> cube to have physical numbers 1,2 or 3. Hence I'd expect that the nodal
>> reference index in medit file format can be 1,2 or 3. However, in addition
>> to those numbers, I also have some weird values like 10 or 14 (the files are
>> attached).
> Thanks, Martin.  I'm recopying this to the list; hope that's O.K.
>     The option Mesh.SaveElementTagType=2 only works for element tags,
> not node tags.  I'm not sure whether there's way to influence the
> setting of the node tags, or where the values come from.  I don't use
> the MEDIT node tags myself; perhaps someone else on the list knows?

Hi - the tag saved for the nodes is the number of the elementary entity 
the vertex is classified on (if any). We could not save physical tags, 
as you can have more than one per entity.

>     There's a more serious problem too: your MEDIT mesh only has
> Vertices, Triangles, and Quadrilaterals; i.e. no volume elements.  The
> mesh I see in the Gmsh GUI has 512 Prisms, but these don't seem to be
> exported to the file.  I haven't encountered this problem myself, only
> ever using tetrahedral volume elements.  It looks like the function
> GModel::writeMESH in Geo/GModelIO_Mesh.cpp only does Vertices, Edges,
> Triangles, Quadrilaterals, and Tetrahedra.

Indeed, we do not read/write prisms or hexas in MEDIT format. If you 
know the correct vertex ordering in that format please let us know: 
we'll be happy to extend the routines to take thse kinds of elements 
into account.

> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh

Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science