[Gmsh] Prescribed mesh size at vertices - strange treatment

Christophe Geuzaine cgeuzaine at ulg.ac.be
Mon Mar 23 22:20:21 CET 2015


> On 23 Mar 2015, at 21:40, Simone GREMMO [531257] <Simone.GREMMO at umons.ac.be> wrote:
> 
> Hello,
> I have a question about the way the prescribed mesh size is imposed when meshing an edge: in function LC_MVertex_PNTS(GEntity *ge, double U, double V) in file ./Mesh/BackgroundMesh.cpp that is used to set l2 (the characteristic length from points), it is said that if prescribed mesh size at the edge extremities is GREATER than 1e22, then lc=referenceLength / 10; where the referenceLength is the diagonal of the domain bounding box.
>  
> In the sources there is already a FIXME note (// FIXME we might want to remove this to make all lc treatment consistent), but I would like to understand from where this arbitrary size comes from. How to ensure that the results is always the expected one?
> I would not expect that the resulting mesh depends on the domain bounding-box size, or that using 1e22 or 1e21 influences the result .
>  

Indeed, this is a little bit of a "hack". If no characteristic mesh sizes are provided, the default size is 1e22 (it's arbitrary large; it should actually be something like MAX_FLOAT). In that case, in order to still get a mesh that is "reasonable", we set the target element size to "10 elements in the domain".



> Thanks for your explanations,
>  
> Regards,
> Simone
> _______________________________________________
> 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