This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Problem with dolfin-convert

0 votes

Hi,

I am trying to convert a .msh mesh generated by gmsh using dolfin-convert but it gives the following error:

> dolfin-convert myTest.msh myTest.xml
Converting from Gmsh format (.msh, .gmsh) to DOLFIN XML format
*** Missing data, unable to convert
*** \ Did you use version 2.0 of the gmsh file format?

When I check my .msh file, the version seems correct:

$MeshFormat
2.2 0 8
$EndMeshFormat 
$Nodes
31
... # a bunch of lines to describe the nodes and elements

And my original .geo file is the simplest possible so the mistake doesn't come from there either.

I saw that this problem have already been asked (here) but I do not see how to "enforce Gmsh to save in file type format 2.0"

Would anyone have any idea how to fix this?

Thanks a lot!
Vincent

asked Sep 5, 2014 by V_L FEniCS User (4,440 points)

1 Answer

+2 votes
 
Best answer

Hello Vincent!

do you use graphical interface of GMSH? In my GMSH 2.8.3, when I click on Save Mesh menu item, the mesh is saved automatically and it doesn't ask for the format. However, when I say Save As... and change the file extension to .msh, I am able to choose the format.

Also, some time ago, I got a .msh file generated in GMSH on Windows and was getting some similar kind of error because of line endings mismatch (I think that dolfin-convert implicitly assumes Linux endings). There is a dos2unix utility available in Ubuntu repositories that I use on such GMSH files...

answered Sep 5, 2014 by mhanus FEniCS Novice (930 points)
selected Sep 8, 2014 by V_L

Yes you're right, if I generate it from Windows, I get an error and it seems to work better with Linux!

Thanks a lot!!

...