[Gmsh] Strange behavior meshing / exporting
Geordie McBain
gdmcbain at freeshell.org
Tue May 3 01:26:14 CEST 2011
2011/5/2 Andreas Puettmann <a.puettmann at grs-sim.de>:
> Hi all!
>
> I have been experiencing weird problems with some GMSH generated tetra
> meshes. After some testing I was able to boil it down to the following
> strange behavior:
>
> I create a cylinder with a very simple .geo file. For meshing and exporting
> of the mesh in ASCII format via the GUI I tried different approaches:
>
> Meshing:
> First option: Click only the "3D" button
> Second option: Click "1D" "2D" "3D" successively
>
> Saving:
> First option: "File->Save Mesh"
> Second option: "File->Save as" + "save all (ignore physical groups)"
> activated
> Third option: "File->Save as" + "save all (ignore physical groups)" not
> activated
>
> The funny thing is that any of the 6 possible combinations produce a
> different .msh file, i.e. different numbers of nodes and elements. Is really
> neither of these 6 supposed to result in identical files?
>
> So, I would really appreciate some info on the differences between the
> different approaches. Especially:
> What exactly is the difference between the two meshing options? Doesn't
> clicking "3D" just do the same as 1D-2D-3D?
> And what is the difference between the first and the third saving option? I
> would think they should be just the same...
>
> I am attaching the .geo file, and the 6 mesh files. Their file names may be
> read as:
> _3D : meshing option 1
> _123: meshing option 2
>
> _SM: saving option 1 (save mesh)
> _SA_ig: saving option 2 (save as + ignore phys. gr.)
> _SA: saving option 3 (save as + do not ignore phys. gr.)
>
> Thanks for any help!
> Andreas
Hello. I believe Gmsh's meshing algorithms are random, so even
repeating identically the meshing and saving options might give you a
different mesh. It should be equivalent though, with roughly the same
number of elements; this seems to be the case for your examples,
they're all within about ten or twenty percent. Is this equivalence
sufficient for your application? Many meshing algorithms do involve a
random element; see, e.g., Persson, P.-O., & G. Strang (2004). A
simple mesh generator in MATLAB. SIAM Review 46 (2), 329-345.
<http://dx.doi.org/10.1137/S0036144503429121>
The second saving option is quite different though, not equivalent, if
you have defined physical groups.