[Gmsh] How to do nodes reordering in gmsh

Christophe Geuzaine cgeuzaine at ulg.ac.be
Tue May 26 18:31:07 CEST 2015


> On 25 May 2015, at 09:55, xiang daopu <xiangdaopu at gmail.com> wrote:
> 
> Hi all gmsh users,
> 
> When I do 1D mesh in gmsh and then refine by splitting, 
> the segment nodes is wrong.

By default Gmsh reorders the nodes and elements (in MSH file format 2). My guess is that you compare the file with the mesh on screen before saving it? Just open the mesh file with Gmsh to check the numbering, and everything should be ok.

> 
> <test.jpg>
> ​Here is the msh file:
> $MeshFormat
> 2.2 0 8
> $EndMeshFormat
> $Nodes
> 5
> 1 0 0 0
> 2 1 0 0
> 3 0.2499999999994083 0 0
> 4 0.4999999999986718 0 0
> 5 0.7499999999993359 0 0
> $EndNodes
> $Elements
> 6
> 1 15 2 0 1 1
> 2 15 2 0 2 2
> 3 1 2 0 1 1 3
> 4 1 2 0 1 3 4
> 5 1 2 0 1 4 5
> 6 1 2 0 1 5 2
> $EndElements
> 
> From the elements section we can see the segment nodes is wrong.
> My question is: how to do nodes reordering in gmsh?
> 
> Thanks in advance!
> Best regards!
> Daopu
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine