Moritz Nadler wrote:
Christophe Geuzaine wrote:

Hi Moritz - You take the minimum of all fields with Field[5]. So you will never see the 0.1 max char length from Field[4] (since you impose a smaller one, 0.005, outside Field[2].DistMax).

Just change

Field[2].LcMax = 0.005;

into

Field[2].LcMax = 0.1;

Thanks for your answer.

I tried the modification you told me already for myself (of course I tried it again after your email) but it does not give the the result I want. I produces a mesh density that looks like this:


Mesh density
^
| ----------------|
|                 |
|                 |
|                 |
|                 --------------
|                               \
|                                \
|                                 \
|                                  -------------
|
|                 ^ DistMin 1
|                     ^ DistMax 1
|                               ^ DistMin 2
|                                  ^ DistMax 2
_________________________________________________> Distance from attractor


But what I want is this:


Mesh density
^
| ----------------
|                 \
|                  \
|                   \
|                    -----------
|                               \
|                                \
|                                 \
|                                  -------------
|
|                 ^ DistMin 1
|                     ^ DistMax 1
|                               ^ DistMin 2
|                                  ^ DistMax 2
_________________________________________________> Distance from attractor




Indeed. I've added an option to the Threshold field so we can get this behaviour: cf. attached file.







Description of drawings:
DistMin 1 and DistMax 1 corresponds to Field[2].DistMin and Field[2].DistMax and DistMin 2 and DistMax 2 correponds to Field[4].DistMin and Field[2].DistMax in my example file attached to this email.



After changing
Field[2].LcMax = 0.005;
to
Field[2].LcMax = 0.1;
the
Field[2].DistMax = 0.2;
command is ignored. Instead of a slow mesh density gradient from DistMin of Field 2 to DistMax of Field 2 the mesh density almost instantly changes from LcMin of Field 2 to LcMin of Field 4 at DistMin of Field 2.


I only used the MinField because I want both threshold fields to be used. If I use one of the threshold fields as a backround field the other one will be totally ignored. I do not want that some mimimum values of something are taken.
All the values the 2 threshold fields should be taken as I stated them.

Does anybody know how I could produce my desired mesh?


------------------------------------------------------------------------

_______________________________________________
gmsh mailing list
[email protected]
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
Mesh.Algorithm=6; // test frontal algo
General.ExpertMode=1;

//begin "my example"
lowPr =   0.1;

Point(1) = {0,0,0,lowPr};
Point(2) = {1,0,0,lowPr};
Point(3) = {1,1,0,lowPr};
Point(4) = {0,1,0,lowPr};
Point(5) = {0.5,0.5,0,0};

// points to see where the DistMax and DistMin are
Point(6) = {0.05+0.5,0.5,0,lowPr};
Point(7) = {0.2+0.5,0.5,0,lowPr};
Point(8) = {0.3+0.5,0.5,0,lowPr};
Point(9) = {0.5+0.5,0.5,0,lowPr};

Line(1) = {1,2};
Line(2) = {2,3};
Line(3) = {3,4};
Line(4) = {4,1};

Line Loop(5) = {1,2,3,4};
Plane Surface(6) = {5};

Field[1] = Attractor;
Field[1].NodesList = {5};

Field[2] = Threshold;
Field[2].IField = 1;
Field[2].LcMin = 0.001;
Field[2].LcMax = 0.005;
Field[2].DistMin = 0.05;
Field[2].DistMax = 0.2;
Field[2].StopAtDistMax = 1; // don't impose element size outside DistMax
//Field[2].Sigmoid = 1; // use sigmoid instead of linear interpol

Field[3] = Attractor;
Field[3].NodesList = {5};

Field[4] = Threshold;
Field[4].IField = 3;
Field[4].LcMin = 0.005;
Field[4].LcMax = 0.1;
Field[4].DistMin = 0.3;
Field[4].DistMax = 0.5;

Field[5] = Min;
Field[5].FieldsList = {2,4};

Background Field = 5;

_______________________________________________
gmsh mailing list
[email protected]
http://www.geuz.org/mailman/listinfo/gmsh

Reply via email to