[Gmsh] Physical entities don't exist in the .msh
Laurent Mattei
mattei at emse.fr
Fri Dec 19 17:45:06 CET 2008
Hi,
I use a loop "for" to create several entities. I record these entities in
Physical Surface in the loop. After meshing, the problem is that the .msh
doesn't contain the physical entities.
Futhermore, i would like to know how i could do to give a name like
hexagone_i_j to the physical surface where i and j are the increment of the
loop "for".
I put a part of my .geo
cpt = 1000000;
For i In {0:ifinal-2:2}
j=0;
/*Points de l'héxagone1*/
nhex1=newp; Point(nhex1) = {(a+b)*i,2*c*j,0,1e+022};
ohex1=newp; Point(ohex1) = {(a+b)*(i+1)+b,2*c*j,0,1e+022};
phex1=newp; Point(phex1) = {(a+b)*(i+1),c+2*c*j,0,1e+022};
qhex1=newp; Point(qhex1) = {b+(a+b)*i,2*c*j+c,0,1e+022};
/*Lignes de l'héxagone1*/
thex1=newl; Line(thex1) = {nhex1,ohex1};
uhex1=newl; Line(uhex1) = {ohex1,phex1};
vhex1=newl; Line(vhex1) = {phex1,qhex1};
whex1=newl; Line(whex1) = {qhex1,nhex1};
/*Points du maillage de l'héxagone1*/
nhex1mail=newp; Point(nhex1mail) = {(a+b)*i+b+a/2-c/1.73205,2*c*j,0,1e+022};
ohex1mail=newp; Point(ohex1mail) =
{(a+b)*i+b+a/2+c/1.73205,2*c*j,0,1e+022};
phex1mail=newp; Point(phex1mail) = {(a+b)*i+b+a/2,c+2*c*j,0,1e+022};
/*Lignes du maillage de l'héxagone1*/
thex1mail=newl; Line(thex1mail) = {nhex1,nhex1mail};
uhex1mail=newl; Line(uhex1mail) = {nhex1mail,phex1mail};
vhex1mail=newl; Line(vhex1mail) = {phex1mail,qhex1};
xhex1mail=newl; Line(xhex1mail) = {nhex1mail,ohex1mail};
yhex1mail=newl; Line(yhex1mail) = {ohex1mail,phex1mail};
zhex1mail=newl; Line(zhex1mail) = {ohex1mail,ohex1};
whex1mail=newl; Line(whex1mail) =
{phex1,phex1mail};
cpt=newreg; Line Loop(cpt) = {thex1mail,uhex1mail,vhex1mail,whex1};
Ruled Surface(cpt)={cpt};
cpt =newreg; Line Loop(cpt) = {xhex1mail,yhex1mail,-uhex1mail};
Ruled Surface(cpt)={cpt};
cpt =newreg; Line Loop(cpt) = {zhex1mail,uhex1,whex1mail,-yhex1mail};
Ruled Surface(cpt)={cpt};
cpt =newreg;
Physical Surface(cpt)={cpt-1,cpt-2,cpt-3};
EndFor
Can you help me?
Thanks
Laurent MATTEI
mattei at emse.fr
Ecole supérieure des Mines de Saint Etienne