[Gmsh] Prescribed mesh size at vertices - strange treatment

Simone GREMMO [531257] Simone.GREMMO at umons.ac.be
Mon Mar 23 23:28:25 CET 2015


Thanks for the quick reply, but why this hack is applied if size is 1e22 and not for example if it is 1e21? The difference between the two values can be practically neglected considering that the domain bounding box diagonal may be about 1e1 or 1e2.

I am insisting in this as I am including Gmsh as library in a c++ program and have had unexpected behaviour because of this "hack" : when defining size 1e22 or 1e21 the resulting mesh was not the same. 
After your explanation I think that i have one possibility: to define this size arbitrary large but smaller than this "reference" value of 1e22, so that Gmsh does not try to set this "10 elements in the domain". Just to be clearer, when generating the mesh with Gmsh I have the constraint that no vertex should be added on the edges.

Regards,
Simone
________________________________________
De : Christophe Geuzaine [cgeuzaine at ulg.ac.be]
Envoyé : lundi 23 mars 2015 22.20
À : Simone GREMMO [531257]
Cc : gmsh at geuz.org
Objet : Re: [Gmsh] Prescribed mesh size at vertices - strange treatment

> 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







More information about the gmsh mailing list