[Gmsh] subloops

Christophe Geuzaine cgeuzaine at ulg.ac.be
Sat Jul 26 16:58:25 CEST 2008


hubrys at virgilio.it wrote:
> Hi, when I run the file .geo, in message console appeare this message:
> 
> Info    : Reading '/home/alessandro/Scrivania/structure.geo'
> Info    : 
> Starting subloop 1 in Line Loop 21 (are you sure about this?)
> Info    : 
> Starting subloop 2 in Line Loop 21 (are you sure about this?)
> Info    : 
> Starting subloop 3 in Line Loop 21 (are you sure about this?)
> Info    : 
> Starting subloop 4 in Line Loop 21 (are you sure about this?)
> 
> Where is 
> the error? Or isn't an error?
> 


It's not an error, just a message to let you know that you defined a 
surface in a way that's not normally permitted by the language.

A "line loop" should normally contain only a single closed loop (hence 
the name). A Surface with 2 holes should thus be defined as:

Line Loop(1) = {1,2,3}; // the exterior loop
Line Loop(2) = {4,5}; // first hole loop
Line Loop(3) = {6,7,8,9}; // second hole loop
Plane Surface(1) = {1,2,3};

and not as

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






> This is my file .geo:
> 
> Function 
> Structure
> 
>   
> 
>   a1=newp;  Point(a1) = {a,b+2*r,0,lc1};
> 
>   a2=newp;  
> Point(a2) = {a+r,b+3*r,0,lc1};
> 
>   a3=newp;  Point(a3) = {a+2*r,b+2*r,0,
> lc1};
> 
>   a4=newp;  Point(a4) = {a+r,b+r,0,lc1};
> 
>   a5=newp;  Point(a5) 
> = {a+r,b+2*r,0,lc1};
> 
> 
>   c1=newl;  Circle(c1) = {a1,a5,a2};
> 
>   
> c2=newl;  Circle(c2) = {a2,a5,a3};
> 
>   c3=newl;  Circle(c3) = {a3,a5,
> a4};
> 
>   c4=newl;  Circle(c4) = {a4,a5,a1};
> 
> 
> 
> circle_loop[] += {c1,c2,
> c3,c4};
> 
> 
> Return
> 
> 
> 
> //Begin
> 
> 
> 
> lc1=10; 
> 
> lc2=20; 
> 
> 
> r=10; 
> 
> 
> 
> t=0;  
> 
> b=15; 
> 
> R=200; 
> 
> 
> 
> side=4; 
> 
> step=2; 
> 
> 
> 
> 
> 
> i=1; j=1;
> 
> 
> 
> For i In {1:
> side:step}
> 
>   
> 
>      a=25;	
> 
> 	
> 
>         For j In {1:side:step}
> 
>  
> 
>         Call Structure;
> 
> 
> 
>      
> 
>      a+=80;
> 
>        
> 
>         EndFor
> 
> 
> 
>      b+=80;
> 
> 
> 
> EndFor
> 
> 
>   a11=newp;  Point(a11) = {-R,0,0,lc2};
> 
>   
> a12=newp;  Point(a12) = {0,R,0,lc2};
> 
>   a13=newp;  Point(a13) = {R,0,0,
> lc2};
> 
>   a14=newp;  Point(a14) = {0,-R,0,lc2};
> 
>   a15=newp;  Point(a15) 
> = {0,0,0,lc2};
> 
> 
>   c9=newl;   Circle(c9) = {a11,a15,a12};
> 
>   c10=newl;  
> Circle(c10) = {a12,a15,a13};
> 
>   c11=newl;  Circle(c11) = {a13,a15,a14};
> 
>   c12=newl;  Circle(c12) = {a14,a15,a11};
> 
> 
> 
> circle_loop[] += {c9,c10,
> c11,c12};
> 
> 
> 
> circle_holes = newreg;
> 
> Line Loop(circle_holes) = 
> {circle_loop[]};
> 
> 
> 
> surf_no_holes = newreg;
> 
> Plane Surface
> (surf_no_holes) = {circle_holes}; 
> 
> 
> 
> 
> 
> 
> 
> 
> Thank for your help
> 
> 
> 
> 
> _______________________________________________
> 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