Page 1 of 1

elmergrid and gmsh format

Posted: 14 Dec 2016, 20:29
by mark smith
Hi Elmer team
I am evaluating pointwise as a mesher for use with Elmer and there is a small bug which the pointwise gmsh mesh throws.
In the latest version of gmsh the mesh format allows the following (from section 9.1 of the Gmsh documentation)
"Any section with an unrecognized header is simply ignored: you can thus add comments in a .msh file by putting them e.g. inside a $Comments/$EndComments section."
Pointwise takes full advantage of this which causes no problems if the mesh is read into Gmsh but if you try to read it in with ElmerGrid you get an error if it appears before the expected first line of the Gmsh file i.e. $MeshFormat
The use of $Comments/$EndComments sections elsewhere in the file seems to cause no problems (limited checking done) see ElmerGrid output below

Code: Select all

>elmergrid 14 5 test.msh

Starting program Elmergrid
Elmergrid reading in-line arguments
Output will be saved to file test.

Elmergrid loading data:
-----------------------
Format chosen using the first line: $Comments
*****************************************************
The $MeshFormat was not given, assuming Gmsh 1 format
This version of Gmsh format is no longer supported
Please use Gsmh 2 version for output
*****************************************************
Loading mesh in Gmsh format 1.0 from file test.msh
Allocating for 0 knots and 0 elements.
Allocation impossible in dmatrix: 1 0 0 -1
It is easy to cut the offending header off the mesh file manually then all works as expected, I'll need to automate this if I want to run a series of simulations from the command line;-(

Regards
Mark

Re: elmergrid and gmsh format

Posted: 15 Dec 2016, 16:31
by raback
Hi Mark

This is now relaxed so that there can be arbitrary lines.

-Peter

Re: elmergrid and gmsh format

Posted: 16 Dec 2016, 14:40
by mark smith
Hi Peter,
Thanks, when will this be available in the windows nightly build?
Best regards
Mark

Re: elmergrid and gmsh format

Posted: 16 Dec 2016, 15:15
by raback
Three days ago ;-)