Importing from gmsh

General discussion about Elmer
Post Reply
fvarela
Posts: 5
Joined: 06 Dec 2014, 19:06
Antispam: Yes

Importing from gmsh

Post by fvarela »

Dear users:

I use Gmsh to generate geometry and mesh, then I try to import msh file to elemer. When I try to import the *.msh file in elmerGui throung the "open" command, nothing is imported. I am using Mac OS X.

When I do it in Windows platform, I have the same problem the first time I try to do this, but after that, when saving the mesh in Gmsh, *.msh file saves automatically in user/appdata/roaming folder and since that moment everything works OK.

Any idea of what I'm doing wrong?

Thanks in advance.
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Importing from gmsh

Post by annier »

Hi fvarela,
the basic command in linux to convert gmsh output to elmer format is

Code: Select all

$ElmerGrid 14 2 meshname.msh -autoclean
where,
14 is the gmsh format(.msh) and it represents the input file format
2 represents the ElmerSolver format (.mesh.*) and it represents the output file format.

Also, ElmerGUI can read .grd format and it can be obtained as

Code: Select all

$ElmerGrid 14 1 meshname.msh -autoclean
where,
14 is the gmsh format(.msh) and it represents the input file format
1 represents the ElmerGrid format (..grd) and it represents the output file format.

I don't have any such ideas how such conversions are made in Mac OSX or windows.
Maybe some windows users or Mac OSX users might share their experience here.

Yours
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Importing from gmsh

Post by raback »

Hi

I wonder where the Mac version comes from and what svn version is it based on?

-Peter
fvarela
Posts: 5
Joined: 06 Dec 2014, 19:06
Antispam: Yes

Re: Importing from gmsh

Post by fvarela »

raback wrote:Hi

I wonder where the Mac version comes from and what svn version is it based on?

-Peter
I downloaded it from

http://www.trueflaw.com/pub/elmer/page3/page3.html
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Importing from gmsh

Post by raback »

Hi,

Unfortunately this is about 4000 commits old. Some of them has probably included stuff related to the Gmsh import as well.

Maybe somebody using Mac could invest time and try to get the cmake version compiled there.

-Peter
Post Reply