Hi,
since the mesh inspection capabilities of Elmer are, well, somewhat limited, I thought it could be practical to be able to view the mesh generated by Elmergrid with gmsh, e.g. to find out how bodies and boundaries (and nodes) have been renumbered.
In the Elmergrid manual it says that there are some undocumented export formats.
Question: Is gmsh .msh (or a format that gmsh understands) among those?
Thank you,
Matthias
Elmergrid to gmsh?
-
- Site Admin
- Posts: 4812
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Elmergrid to gmsh?
Sorry, no.
Re: Elmergrid to gmsh?
OK.
I have seen that the commandline-ElmerGrid produces some output where the renumbered bodies and boundaries are listed. Better than nothing...
Matthias
I have seen that the commandline-ElmerGrid produces some output where the renumbered bodies and boundaries are listed. Better than nothing...
Matthias
-
- Site Admin
- Posts: 4812
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Elmergrid to gmsh?
Hi
-Peter
There is now a preliminary version of Gmsh output format (with magic number 4). It only handles the $Nodes and $Elements fields. Comments are welcome.mzenker wrote:Question: Is gmsh .msh (or a format that gmsh understands) among those?
-Peter
Re: Elmergrid to gmsh?
Hi,
I have just tested the gmsh export from ElmerGrid for the first time with a 3D mesh. It is a very practical way to find out which body/boundary has which number (using Tools->Visibility in gmsh for selective display), while waiting for a similar feature in ElmerGUI.
There is a small quirk, however: The numbering of the bodies I see in gmsh corresponds to what I see in Elmer, but the numbering of the surfaces (boundaries) doesn't. Would it be possible to change that?
Thanks,
Matthias
I have just tested the gmsh export from ElmerGrid for the first time with a 3D mesh. It is a very practical way to find out which body/boundary has which number (using Tools->Visibility in gmsh for selective display), while waiting for a similar feature in ElmerGUI.
There is a small quirk, however: The numbering of the bodies I see in gmsh corresponds to what I see in Elmer, but the numbering of the surfaces (boundaries) doesn't. Would it be possible to change that?
Thanks,
Matthias
-
- Site Admin
- Posts: 4812
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Elmergrid to gmsh?
Hi Matthias
Ok, I altered the numbering because I thought that gmsh does not like different entities having the same number. But perhaps this is just a convention of the geometric entities therein - not a limitation. Can you confirm that a body and a boundary could have the same index number.
-Peter
Ok, I altered the numbering because I thought that gmsh does not like different entities having the same number. But perhaps this is just a convention of the geometric entities therein - not a limitation. Can you confirm that a body and a boundary could have the same index number.
-Peter
Re: Elmergrid to gmsh?
Hi Peter,
yes, gmsh tolerates the same number for surfaces and volumes. I just checked that by modifying the msh file exported by ElmerGrid so that there was a Volume 1 and a Surface 1. It loaded in gmsh without problem.
Matthias
yes, gmsh tolerates the same number for surfaces and volumes. I just checked that by modifying the msh file exported by ElmerGrid so that there was a Volume 1 and a Surface 1. It loaded in gmsh without problem.
Matthias
-
- Site Admin
- Posts: 4812
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Elmergrid to gmsh?
Hi Matthias
I removed the offset for the BC in svn version 5834.
-Peter
I removed the offset for the BC in svn version 5834.
-Peter
Re: Elmergrid to gmsh?
Hi Peter,
the removed offset works fine, thank you - now body and boundary numbers correspond to what is seen in Elmer. That is almost perfect!
However, the exported mesh has holes which are not there in the Elmer mesh files. I attach a small mesh file as test case so that you can have a look.
Matthias
P.S.: The test file has been generated with the current binary (Rev. 5817) to make sure that it's not a problem of my self-compiled binary.
the removed offset works fine, thank you - now body and boundary numbers correspond to what is seen in Elmer. That is almost perfect!
However, the exported mesh has holes which are not there in the Elmer mesh files. I attach a small mesh file as test case so that you can have a look.
Matthias
P.S.: The test file has been generated with the current binary (Rev. 5817) to make sure that it's not a problem of my self-compiled binary.
- Attachments
-
- test_elmer.msh
- the result of elmergrid 14 2 and elmergrid 2 4
- (8.93 KiB) Downloaded 394 times
-
- test_gmsh.msh
- mesh file as generated by gmsh
- (9.46 KiB) Downloaded 405 times
-
- Site Admin
- Posts: 4812
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Elmergrid to gmsh?
Hi Matthias
Ok, didn't find it visually but looking directly at the output there was a stupid problem. It is now fixed in svn version 5843.
Just go to directory $ELMERSRC/elmergrid
and say 'make' and 'make install'.
-Peter
Ok, didn't find it visually but looking directly at the output there was a stupid problem. It is now fixed in svn version 5843.
Just go to directory $ELMERSRC/elmergrid
and say 'make' and 'make install'.
-Peter