Mesh Converted from UNV using ElmerGrid Crashes ElmerGUI

Clearly defined bug reports and their fixes
Post Reply
crobar
Posts: 49
Joined: 30 Mar 2014, 14:50
Antispam: Yes

Mesh Converted from UNV using ElmerGrid Crashes ElmerGUI

Post by crobar »

I am coming back to try and learn to use Elmer to do 3D magnetostatics (I come back and have a go every 6 months or so because it would be the only free and open source 3D magnetics solver out there).

This time I tried to create a partitioned mesh to import. I created the mesh in salome (actually in salome-meca http://www.code-aster.org/V2/spip.php?article303), and exported it to unv. I then attempted to convert this to the ElmerGUI format using ElmerGrid, which seemed to work fine. When I import the resulting mesh, ElmerGUI segfaults. I've attached various things that might allow you to reproduce and debug the problem. I'm using the version from the official release ppa on Mint Linux (which is based on Ubuntu).

This mesh is intended to be a mesh of a cylinder inside a box. The intention would be for this to be a magnet in a surrounding box of air.

Here is the output from ElmerGrid and ElmerGUI during all this:

Code: Select all

$ ElmerGrid 8 2 cylinder_mag.unv 

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

Elmergrid loading data:
-----------------------
Reading mesh from universal mesh file cylinder_mag.unv.
First round for allocating data
Units dataset content is currently omitted!
Part UID = 1
Part name = SMESH_Mesh
Coord system name = Global
There are 868 nodes in the mesh
Element type range in mesh [202,504]
Reordering 5532 elements with indexes up to 5532
Allocating mesh with 868 nodes and 5532 4-node elements in 3 dims.
Physical index interval is [2,2]
Group index interval is [1,2]
Using offset 1 for physical indexes
Second round for reading data
Reading Coordinate system information
Reading node coordinates
Reading element topologies
Reading element groups in mode 2467
Reading 1:th group with index 1 with 2429 entities: Solid_1
Element type range in group is [504 504]
Reading 2:th group with index 2 with 1903 entities: Solid_2
Element type range in group is [504 504]
Moving bulk elements to boundary elements
Leading bulk elementtype is 504
Trailing bulk elementtype is 202
There are 1200 (out of 5532) lower dimensional elements.
Node 524 belongs to maximum of 76 elements
Found 658 side elements that have two parents.
Found correctly 1200 side elements.
Parent elements were reordered up to indx 4332.
Moved 4332 elements (out of 5532) to new positions
The Universal mesh was loaded from file cylinder_mag.unv.


Elmergrid creating and manipulating meshes:
-------------------------------------------

Elmergrid saving data with method 2:
-------------------------------------
Saving mesh in ElmerSolver format to directory cylinder_mag.
Reusing an existing directory
Saving 868 coordinates to mesh.nodes.
Saving 4332 element topologies to mesh.elements.
Saving boundary elements to mesh.boundary.
Saving header info to mesh.header.
Saving names info to mesh.names.

Thank you for using Elmergrid!
Send bug reports and feature wishes to elmeradm@csc.fi
 
$ ElmerGUI
Load /usr/bin/../share/ElmerGUI/edf/egini.xml... done
Load tetgen plugin... not found
Tetgen functionality unavailable
Constructing ElmergridAPI... done
Load /usr/bin/../share/ElmerGUI/edf/edf.xml... done
Load /usr/bin/../share/ElmerGUI/edf/meshdeform.xml... done
Load /usr/bin/../share/ElmerGUI/edf/heatequation.xml... done
Load /usr/bin/../share/ElmerGUI/edf/linearelasticity.xml... done
Load /usr/bin/../share/ElmerGUI/edf/navier-stokes.xml... done
Load /usr/bin/../share/ElmerGUI/edf/helmholtz.xml... done
Load /usr/bin/../share/ElmerGUI/edf/electrostatics.xml... done
Load /usr/bin/../share/ElmerGUI/edf/resultoutput.xml... done
"sni-qt/17140" WARN  22:33:55.789 void StatusNotifierItemFactory::connectToSnw() Invalid interface to SNW_SERVICE 
Initialize GL
Vendor: Intel Open Source Technology Center
Renderer: Mesa DRI Intel(R) Haswell Mobile 
Version: 3.0 Mesa 10.1.3
Loading from directory<snip>/cylinder_mag
Loading elmer mesh files
Summary:
Nodes: 868
Point elements: 0
Edge elements: 122
Surface elements: 1078
Volume elements: 4332
Found 1617 edges on boundary
Segmentation fault
Attachments
cyl_and_cube.step
The actual geometry I want to mesh in a step file, I exported this from FreeCAD
(21.13 KiB) Downloaded 375 times
cylinder_mag.hdf.zip
Salome (actually salome meca) study file. I've had to zip this as the hdf file extension wasn't allowed
(90.79 KiB) Downloaded 392 times
cylinder_mag.unv
UNV mesh file exported from salome prject.
(813.13 KiB) Downloaded 427 times
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Mesh Converted from UNV using ElmerGrid Crashes ElmerGUI

Post by annier »

Hi Crobar,
Did you use the -autoclean command when converting the cylinder_mag.unv file to Elmer mesh formats?
I used the following command and opened it with ElmerGUI.

Code: Select all

 ElmerGrid 8 2 cylinder_mag.unv -autoclean 
picture_shown_above_is_of_mesh_file_as_opened_by_ElmerGUI
picture_shown_above_is_of_mesh_file_as_opened_by_ElmerGUI
Mesh_in_the_ElmerGUI_picture.png (96.73 KiB) Viewed 5339 times


Yours Sincerely
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
crobar
Posts: 49
Joined: 30 Mar 2014, 14:50
Antispam: Yes

Re: Mesh Converted from UNV using ElmerGrid Crashes ElmerGUI

Post by crobar »

annier wrote:Hi Crobar,
Did you use the -autoclean command when converting the cylinder_mag.unv file to Elmer mesh formats?
No, I didn't and I can confirm this works for me too. Thanks very much for the help. Any reason to not always use -autoclean? i.e. why it isn't the default?

I do think that any mesh loading causing a segfault is a bug though.
Post Reply