[Gmsh] Medit file format

Geordie McBain gdmcbain at freeshell.org
Wed May 5 01:03:20 CEST 2010


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?
   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.