[Gmsh] Gmsh file format version 2.0/2.1 confusions as saved by Save As...?

Christophe Geuzaine cgeuzaine at ulg.ac.be
Tue Nov 24 07:38:23 CET 2009


On 23/11/09 15:38, Fabio Sacconi wrote:
> Hi,
> I think this is a little bug:

indeed--it should be fixed in today's build

thanks for the report,
Ch


> since the mesh format is changed from previous versions, even if the
> change is just the dimension info in $PhysicalNames, I think it would be
> better to change the MeshFormat in the .msh file too, to 2.1.
> This would help a lot in the parsing of the mesh file for reading into
> an external code.
>
> Thank you in advance.
>
> Bye
>
> Fabio
>
>
>
>
>
>
>
>
>> Hi,
>>
>> When I do with versions 2.4.2 and 2.4.3-svn as of today
>>
>> 1. start gmsh, load any .geo file, create mesh
>> 2. File -> Save As..
>> 3. choose Gmsh mesh (*.msh), enter file name, OK
>> 4. choose Version 2.0 ASCII, OK
>>
>> Then the created .msh file does have the version 2.0 identifier in the
>> $MeshFormat section but has extra dimension information that should be
>> a new extension in 2.1 format in the $PhysicalNames section
>>
>> $MeshFormat
>> 2 0 8
>> $EndMeshFormat
>> $PhysicalNames
>> 2
>> 2 1 "Surfaces"
>> 3 2 "Volume"
>> $EndPhysicalNames
>>
>> . Furthermore, if I choose Version 2.0 Binary instead, gmsh writes
>>
>> $MeshFormat
>> 2.1 0 8
>> $EndMeshFormat
>> $PhysicalNames
>> 2
>> 2 1 "Surfaces"
>> 3 2 "Volume"
>> $EndPhysicalNames
>>
>> which seems valid this time, but contradicts with the "Version 2.0"
>> menu item description.
>>
>> I see the behavior not only with the .geo files but with imported mesh
>> files (at least) in MED format. Is this intended?
>>
>> Thanks,
>> Takuya
>>
>> Takuya OSHIMA, Ph.D.
>> Faculty of Engineering, Niigata University
>> 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
>>
>> _______________________________________________
>> 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
http://www.montefiore.ulg.ac.be/~geuzaine