[Gmsh] about attractors

Christophe Geuzaine cgeuzaine at ulg.ac.be
Fri Mar 21 18:32:53 CET 2008


quemere_patrick wrote:
> Hello,
> 
> I have successfully used gmsh to generate mesh fitted on hexagonal 
> shapes (see jpg), thanks to "attractors" defined in my case for each 
> hexagonal lines as :
> Attractor Line { c[indice] } = { 0., 0., 3.5 } ;  (and this, without 
> using anisotropic algorithm).
> You defined in a previous message the last coefficient (3.5) as the 
> decay factor (see http://www.geuz.org/pipermail/gmsh/2003/000789.html)
> But what is the real sense of it ??
> Could you please give me some more details in the aim I determine this 
> coefficient from my geometry (and not from several hazardous tests).

Hello Patrick - Don't use Attractors. Attractors are not documented, and 
they've actually been replaced by a much more general concept ("Fields") 
in recent nightly builds.

Fields will be documented in the next release. If you want to experiment 
with them, download one of tomorrow's nightly builds.

Here's an example with some attractor fields associated with points and 
lines, combined with a function field.


lc = .15;
Point(1) = {0.0,0.0,0,lc};
Point(2) = {1,0.0,0,lc};
Point(3) = {1,1,0,lc};
Point(4) = {0,1,0,lc};
Line(1) = {3,2};
Line(2) = {2,1};
Line(3) = {1,4};
Line(4) = {4,3};
Point(55) = {0.2,.5,0,lc};
Line Loop(5) = {1,2,3,4};
Plane Surface(6) = {5};

// Attractors field on points 1 and 55, and on line 1
Field[1] = Attractor;
Field[1].NNodesByEdge = 100; // #attractors on the edges
Field[1].NodesList = {1,55};
Field[1].EdgesList = {1};

// Threshold field defined on the attractors
Field[2] = Threshold;
Field[2].IField = 1;
Field[2].LcMin = lc/20; // char length inside DistMin
Field[2].LcMax = lc; // char length outside DistMax
Field[2].DistMin = 0.15;
Field[2].DistMax = 0.5;

// Function field
Field[3] = MathEval;
Field[3].F = "Cos(4*3.14*x) * Sin(4*3.14*y) / 10 + 0.101";

// Define minimum of threshold and function field
Field[4] = Min;
Field[4].FieldsList = {2, 3};

// Use the min as the background field
Background Field = 4;






> 
> Thanks.
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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