[Gmsh] bug error

Christophe Geuzaine cgeuzaine at ulg.ac.be
Tue Sep 9 11:39:44 CEST 2008


ZhouBin wrote:
> Dear friends,
> 
> I have a problem which I can not solve, after three days, Can I ask you for help?
> 
> Would you please see the live between 'For t In {1:101}" and "EndFor" ?


Physical Surface(Sprintf("fiber%g", t)) = {e1[8+4*t]:e1[11+4*t]} ;




> -----------------------------------------------
> For t In {1:101}
> 
> // define a Physical Surface for each fiber:
> //http://gmsh.sourcearchive.com/documentation/1.65.0/nginterface_8cpp-source.html
> //char cir[10];
> //cir="fiber";
> //StrCat(cir,"fiber");
> //StrCat(cir,"t");
> //cir+=t;
> 
> //Char is 8 bits. Int is 16 bits. Therefore you cannot get 16 bits into 8 bits without data overflow
> char add= (char) t;
> //char add= t.c_str(); //convert from string to char;
> //char add=t;
> //char add = (char)t->Chars[0];
>   Physical Surface(StrCat("fiber",add)) = {e1[8+4*t]:e1[11+4*t]} ;
> //StrCat ( char-expression , char-expression )
> //permits to concatenate two character expressions
> EndFor
> -----------------------------------------------
> I plan to name many circles as "fiber1", "fiber2", ...."fiber101". however, I do not know how to do using Gmsh?
> 
> Or could you suggest me if I could use some other methods, for example, lists?
> 
> Thank you for your reply.
> 
> Best regards,
> 
> Bin
> _________________________________________________________________
> Windows Live Photo gallery 数码相机的超级伴侣,轻松管理和编辑照片,还能制作全景美图!
> http://get.live.cn/product/photo.html
> 
> _______________________________________________
> 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