[Gmsh] Control mesh size through API

Bin Wen dracifer at gmail.com
Thu Dec 11 17:00:20 CET 2014

I have figured out how to control mesh using background fields through API.
But have another question.

I am trying to mesh a complex shaped polygon (many edges) using triangle
elements. And I expect to have fine mesh close to the zigzag boundary but
coarse mesh in the middle of the domain. I am using the background field to
control the element size. All those methods in t10 (Attractor+Threshold,
MathEval, Box) work well on the rectangle domain that I used for test.
However, they do not give me expected results on the real shape. All
methods generate very dense mesh through out the domain (the element size
in the middle is a little bit larger than the boundary, but they are too
small comparing with what I specified).

One reason I could guess is that the boundary of the polygon is composed of
a set of short segments. Therefore, they make the initial element small.
But I suppose that should only make the elements near the boundary to be
small. I expect the mesh in the middle of the domain to be very coarse. I
have disabled CharacteristicLengthExtendFromBoundary option.

I really appreciated if you could shed any light on this. Many thanks.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20141211/0b722f8b/attachment.html>