[Gmsh] meshing differences between version 1.65.0 and 2.0.4

David Colignon David.Colignon at ulg.ac.be
Tue Mar 20 18:09:34 CET 2007


Hi Daniel,

yes, there are some differences in the default treatment of the characteristic lengths ( lc ) between version 1.65 and 2.04.

In version 2 we added the ability to import iges or step files and in this case there is no characteristic length associated to the points, so we have to choose an arbitrary default value. The choice is difficult because we have to be able to mesh very small as well as very big objects, and also be able to merge step files (no lc) with .geo files (imposed lc). And there is also the problem of imposed background meshes and of attractor points.
We are still looking for he best compromise ...
We end up with a value for lc that can not be greater than 1/10 of the largest dimension of the bounding box (to be able to mesh step files).

If you want the same kind of behavior in version 2.04 as in version 1.65, in _your_ case, you have to modify line 194 in Mesh/BackgroundMesh.cpp : 

 double l3 = CTX.lc / 10.;

becomes

 double l3 = CTX.lc / 1.;

and recompile.

Cheers,

Dave

-- 
David Colignon, Ph.D.
ELAP - Service d'Electricité Appliquée
Institut Montefiore B28
Université de Liège
4000 Liège - BELGIQUE
Tél: +32 (0)4 366 37 32
Fax: +32 (0)4 366 29 10
http://elap.montefiore.ulg.ac.be



Daniel Wheeler wrote:
> Hi,
> 
> I have been updating a computer code to use the new gmsh 2.0 file 
> format. In the process I noticed that
> the new version of gmsh seems to a produce different mesh when given the 
> same .gmsh input file. The code to create the mesh is:
> 
>         cellsize = 0.0952380952381 ;
>         height = 2.0 ;
>         spacing = 1.0 ;
>         Point(1) = {0  , 0, 0, cellsize } ; 
>         Point(2) = {spacing, 0, 0, cellsize } ;
>         Point(3) = {0  , height , 0, spacing } ;
>         Point(4) = {spacing, height, 0, spacing } ;
>         Line(5) = {1, 2} ;
>         Line(6) = {2, 4} ;
>         Line(7) = {4, 3} ;
>         Line(8) = {3, 1} ;
>         Line Loop(9) = {5, 6, 7, 8} ;
>         Plane Surface(10) = {9} ; 
> 
> This is basically a box that forms 2D triangles when meshed.
> 
> Using version 1.65.0, the mesh produced by doing
> 
>       $ gmsh box.gmsh -2
> 
> where box.gmsh contains the commands above,
> produces a mesh with 33 nodes and 75 elements. When version 2.0.4 is 
> used, the mesh has 87 vertices and 172 elements.
> Should the default meshing be different between these two versions?
> 
> Thanks.
> 
> --
> 
> Daniel Wheeler
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh