[Gmsh] Mesh elements overlapping each other

phillip mobley phillipmobley2 at gmail.com
Sat Dec 2 17:36:57 CET 2017

Hello all,

I have been quite successful in integrating gmsh into my application. I was
able to mostly isolate the 2D mesher algorithm into a simulator that I am
creating. There are still a few rough edges here and there. I am able to
take a simple geometry, convert it into a gmsh geometry (in code), define a
specific mesh size for the face(s), and create a 2D mesh of the geometry.

I am am currently working on integrating the GMSH Mesh settings into my
program so that a user can directly edit the GMSH mesh settings.

Lately, I have been comparing the meshes that my program creates to the
meshes that GMSH GUI creates and I am noticing some odd differences.
Mainly, I have been observing mesh elements overlapping each other in my
program. The mesh that I create is not as smooth as the mesh in GMSH GUI.

I feel that this is mainly a setting issue and I was wondering if anyone
out there would be able to help me to identify the main cause of this?

I am attaching 2 PDFs. One being the mesh that my program created (I saved
the mesh as a vtk file, opened in visit, and printed as a pdf) and the
other being the mesh that the GMSH GUI created. Both are the exact same
shape (a simple square) with the exact same end point locations. These were
not created with Transfinite geometries.

I also made sure to use the same mesh settings between the two programs:

Mesh 2D Algorithm: Automatic

2D Recombination Algorthim: Blossom

Remeshing Algorithm: No Split

Remeshing Parameterization: Harmonic

Smoothing Steps: 1

min/max element size: 0 / 1e22

Element size factor: 0.3 (in my program, I am directly setting the mesh
size for the face, it to is 0.3. In my program, I have the mesh size factor
to be 1)

Element Order: 1

Lloyd smoothing steps: 5

Subdivision algorthim: All Quads

Recombine all triangular meshes

-- The settings that I have set in my program are as follows (These maybe
different then the settings within GMSH GUI)

recombinationTestNewStrat = 0

nProc = 0

nbProc = 0

lc = 1

secondOrderIncomplete = 0

lcExtendFromBoundary = 0

Any assistance will be greatly appreciated. Thank you all for your time
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20171202/cbfcc829/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: weirdMesh.pdf
Type: application/pdf
Size: 46008 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20171202/cbfcc829/attachment-0001.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: correct mesh
Type: application/octet-stream
Size: 30822 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20171202/cbfcc829/attachment-0001.obj>

More information about the gmsh mailing list