[Gmsh] Non constant element sizes on a BSpline

Dorian Depriester dorian.dep at gmail.com
Wed Feb 7 09:42:02 CET 2018


Hello dear Gmsh users,
  I would like to mesh a BSpline using non constant element sizes. Here is
a MWE:

Point(1) = {0  , 0  , 0, 0.2};
Point(2) = {-0.1, 0.5, 0, 0.2};
Point(3) = {-0.1, 0.8, 0, 0.1};
Point(4) = {0  , 1  , 0, 0.1};
Point(5) = {1  , 1  , 0, 0.2};
Point(6) = {1  , 0  , 0, 0.2};
BSpline(1) = {1, 2, 3, 4, 5, 6};

Line(2) = {6, 1};
Line Loop(1) = {1, 2};
Plane Surface(1) = {1};
Mesh 2;

With the aforementioned code, Gmsh just linearly interpolates from 0.2 to
0.2 between Point 1 and Point 6, resulting in constant size along the
BSpline. Yet, I would like to get an element size of 0.1 near points 2 and
3.

Any help would be highly appreciated!



Note: actually, I would like to control the mesh size depending on the
local curvature (Mesh.CharacteristicLengthFromCurvature). Alas, it
appears this option does not work (yet?) on BSplines (Gmsh crashes
when I try to mesh using this option).
Thus, I have computed the local curvature by my own (using Matlab),
but I am stuck on the above issue.


Best regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20180207/898c3016/attachment.html>


More information about the gmsh mailing list