[Gmsh] refine existing mesh

Juan E. Sanchez juan.e.sanchez at gmail.com
Sat Feb 10 22:06:42 CET 2018


Hello,

I have an existing msh file, and a pos file containing a background 
mesh.  Is there a script example showing how to use these files to 
create a refined mesh using the background field?

Using

gmsh -3 test.msh -bgm test.pos

results in a mesh where there is the same number of nodes and elements, 
but it appears that the physical entity number is lost:

last element in original file:

36210 4 3 15 15 0 5786 5791 5792 5800

last element in new file:

36210 4 2 0 15 2603 5822 2604 2605

Now all of the mesh elements belong to the same physical entity, 0.

If I perform a "refine by splitting" in the gui, the physical entity 
information is maintained:

266256 4 2 15 15 42825 10009 41452 9710

The file is a 3d tetrahedral mesh, and it also contains triangular 
surfaces to impose boundary conditions.

Regards,

Juan




More information about the gmsh mailing list