[Gmsh] Bump Equation

Christophe Geuzaine cgeuzaine at ulg.ac.be
Mon May 19 00:08:48 CEST 2008


Adam Zabriskie wrote:
> Hello,
> 
> I have been working on duplicating the transfinite bump using layers and 
> arrays.  I can't seem to figure out the equation or series used to 
> compute the location of each node on the line.  At first I thought it 
> was a power series like the transfinite progression is.  That didn't 
> work though.  Below are the two equations I thought would duplicate bump 
> using layers.  Both compare the layers with the actual transfinite line 
> to ensure there are the same number of nodes and the spacing is the same.
> 
> n=5; // Number of nodes
> p=2; // Progression equations
> a=(p-1)/(p^(n-1)-1);
> Point(5)={0,-1,0,2};
> Point(6)={10,-1,0,2};
> Line(3)={5,6};
> Transfinite Line{3}=n Using Progression p;
> 
> nod[0]=1;
> spa[0]=a;
> For i In {1:n-2}
>    nod[i]=1;
>    spa[i]=spa[i-1]+a*p^(i);
> EndFor
> Point(7)={0,-1.1,0,2};
> Extrude {10,0,0} {Point{7}; Layers{nod[],spa[]};}
> 
> The next is about the same but for a reverse direction.
> 
> n=5; // Number of nodes
> p=2; // Progression equations
> a=(p-1)/(p^(n-1)-1);
> Point(1)={0,0,0,2};
> Point(2)={10,0,0,2};
> Line(1)={1,2};
> Transfinite Line{-1}=n Using Progression p;
> 
> nodes[n-2]=1;
> spaces[n-2]=1;
> For j In {n-3:0:-1}
>   nodes[j]=1;
>   spaces[j]=spaces[j+1]-a*p^(-j+n-3);
> EndFor
> Point(3)={0,.1,0,2};
> Extrude {10,0,0} {Point{3}; Layers{nodes[],spaces[]};}
> 
> If anyone has any code for creating a similar node map using layers 
> which represents a transfinite line using bump, could you post it?  Or 
> if you know how Gmsh computes the spacing for each node in bump, then 
> could you post that?

cf. F_Transfinite() in Mesh/meshGEdge.cpp


> 
> Thank you,
> Adam Z.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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