[Gmsh] Background field Threshold unexpected behavior

Tian Xia tianxia.ui at gmail.com
Sun May 31 11:05:13 CEST 2020


Hi Gmsh developers,

I would like to create nonuniform mesh on some geometry. I tested a simple
case with the script below and found threshold field work unexpectedly.

Basically, I created a rectangle and wish to have a mesh with high density
near the edges. I expect to see the mesh as shown by the color. But
instead I got uniform mesh. Is it expected? Thanks you!

[image: image.png]


SetFactory("OpenCASCADE");
Rectangle(1) = {-0.9, -0, 0, 1, 0.5, 0};

Field[1] = Distance;
Field[1].EdgesList = {1, 2, 3, 4};

Field[2] = Threshold;
Field[2].DistMax = 0.2;
Field[2].DistMin = 0.1;
Field[2].IField = 1;
Field[2].LcMax = 0.5;
Field[2].LcMin = 0.01;
Background Field = 2;


-- 
Tian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20200531/90916e8b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 468554 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20200531/90916e8b/attachment-0001.png>


More information about the gmsh mailing list