ElmerGrid Gmsh import bug?

Mesh generators, CAD programs, and other tools
Post Reply
hazelsct
Posts: 153
Joined: 05 Oct 2009, 17:02
Location: Boston, MA, USA
Contact:

ElmerGrid Gmsh import bug?

Post by hazelsct » 09 Oct 2009, 14:08

Greetings,

There seems to be a bug in ElmerGrid import of some Gmsh files. When I load a trivial rectangle geometry mesh, it displays fine in the window, but Save Project and then Generite SIF it gives the error:

SifGenerator: Body index out of bounds

(At revision 4214, this crashed ElmerGUI, but that crash has been fixed between 4214 and 4256, thanks! On the other hand, the display of the mesh went from filling 2/3 of the main window width to 1/4 of it, so it's harder to see.)

The mesh.geo file is as follows:
Point (1) = {0, 0, 0, 0.002};
Point (2) = {0.08, 0, 0, 0.002};
Point (3) = {0.08, 0.015, 0, 0.002};
Point (4) = {0, 0.015, 0, 0.002};
Line (1) = {1, 2};
Line (2) = {2, 3};
Line (3) = {3, 4};
Line (4) = {4, 1};
Line Loop (6) = {1, 2, 3, 4};
Plane Surface (6) = {6};

[I can't figure out how to attach mesh.msh, the Forum software refuses to attach anything with extension .geo, .msh, or even .txt. Does that feature of the Forum work?]

The mesh.header file has:

363 632 92
2
202 92
303 632

I can't find the file format online, but is the correct number of nodes, number of triangles, number of edges, then the "2" could be... number of bodies? If so, it's clearly a bug.

I wonder if the problem is the "6" index for the Line Loop and Plane Surface in the .geo file, which carries over to the .msh file index, for example:
97 2 3 0 6 0 119 177 179
There's no entity with index "5".

This is no longer a big problem now that the crash is gone, and a simulation runs fine. But it does seem to be a minor bug.

Thanks,
Adam

raback
Site Admin
Posts: 3264
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: ElmerGrid Gmsh import bug?

Post by raback » 10 Oct 2009, 22:37

By default the numbering of entities in .msh files should be saved only for the physical entities. If no physical entities are defined then the geometric entities are used and they should be renumbered by default as they otherwise would often be in range of thousands.

The "2" is number of elementtypes.

I modified the list of allowed attachments (which was actually empty) and you could perhaps now try to attach your sample file (.msh).

-Peter

hazelsct
Posts: 153
Joined: 05 Oct 2009, 17:02
Location: Boston, MA, USA
Contact:

Re: ElmerGrid Gmsh import bug?

Post by hazelsct » 11 Oct 2009, 00:39

Great, I'm attaching the .msh file. This crashed rev 4214 when generating the .sif file, not sure if the error message still indicates a problem, or if it's fixed now.
Attachments
mesh.msh
(32.01 KiB) Downloaded 141 times

raback
Site Admin
Posts: 3264
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: ElmerGrid Gmsh import bug?

Post by raback » 11 Oct 2009, 21:09

I tried the test case and for me it seemed ok. The body number was 1 and boundary numbering [1,4]. No error message appeared so I hope the problems are in the history.

-Peter

Freebau
Posts: 2
Joined: 05 Oct 2011, 14:53
Antispam: Yes

Re: ElmerGrid Gmsh import bug?

Post by Freebau » 28 Oct 2011, 11:43

For me too. No further bugs or problems. I'm glad i found the answer so quick.

Post Reply