[Gmsh] Renumber mesh and save it without gui

Christophe Bovet christophe.bovet at gmail.com
Fri Sep 27 09:58:02 CEST 2013


Hello everyone,

First, congratulations for your works. I have used Gmsh  since my 
undergraduate studies and I still use it in Phd.

My problem is the following:

I had to remove with  duplicates vertex in an .msh mesh. The command, 
"gmsh -check mesh.msh" was able to find duplicates vertex but "Coherence 
Mesh;" does not delete them.

Anyway, I wrote a python script which find and delete them using the 
output of "gmsh -check mesh.msh".

Then, my mesh does not have any duplicates vertex but the node numbering 
is discontinuous.

The command "gmsh -renumber mesh_without_duplicates.msh"  is able to 
renumber nodes but it launches gui and to save the renumbered mesh, I 
have to click to "Save Mesh".

I would like to find a way to save the renumbered mesh without launching 
Gmsh gui.  In order to be totally executable from prompt.

I already tried:

-  "gmsh -renumber mesh_without_duplicates.msh -2 -order 2 -o 
renumbered.msh"

It works but the mesh vertex are altered due to mesh regeneration and it 
leads to unacceptable modification of the mesh.

I also tried some :

"gmsh -renumber mesh_without_duplicates.msh -string 'Save 
"renumbered_mesh.msh";'

But It saves an empty mesh. In fact, specificity of my problem (and 
source of complication) is that I had to work with .msh file directly 
and not .geo file.

However, I think that to have a command line -save_mesh renumbered.msh 
available after -merge, -renumber, -coherence actions can be very 
interesting. I searched in documentation but I did not find any command 
like this.

Thank you again.

Christophe




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20130927/0c9b13b2/attachment.html>