ElmerGrid Gmsh import bug?
Posted: 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
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