Newer
Older
Free((yyvsp[(3) - (9)].c)); Free((yyvsp[(6) - (9)].c));
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 965 "Gmsh.y"
#if defined(HAVE_PLUGINS)
PluginManager::instance()->setPluginOption((yyvsp[(3) - (9)].c), (yyvsp[(6) - (9)].c), (yyvsp[(8) - (9)].c));
yymsg(0, "Unknown option '%s' or plugin '%s'", (yyvsp[(6) - (9)].c), (yyvsp[(3) - (9)].c));

Christophe Geuzaine
committed
#endif
Free((yyvsp[(3) - (9)].c)); Free((yyvsp[(6) - (9)].c)); Free((yyvsp[(8) - (9)].c));

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 982 "Gmsh.y"
{
(yyval.i) = (int)(yyvsp[(1) - (1)].d);
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 986 "Gmsh.y"

Christophe Geuzaine
committed
(std::string((yyvsp[(1) - (1)].c)), curPhysDim,
++GModel::current()->getGEOInternals()->MaxPhysicalNum);

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 996 "Gmsh.y"

Christophe Geuzaine
committed
{
(yyval.l) = 0;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1000 "Gmsh.y"

Christophe Geuzaine
committed
{

Christophe Geuzaine
committed
Vertex *v = FindPoint((int)(yyvsp[(4) - (5)].d));
if(!v)
yymsg(0, "Unknown point %d", (int)(yyvsp[(4) - (5)].d));

Christophe Geuzaine
committed
else{
List_Add((yyval.l), &v);

Christophe Geuzaine
committed
}
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1012 "Gmsh.y"
{
for(int i = 0; i < 4; i++) (yyval.v)[i] = 0.;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1016 "Gmsh.y"
{
for(int i = 0; i < 4; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i];
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1026 "Gmsh.y"
yymsg(0, "Point %d already exists", num);
double x = CTX::instance()->geom.scalingFactor * (yyvsp[(6) - (7)].v)[0];
double y = CTX::instance()->geom.scalingFactor * (yyvsp[(6) - (7)].v)[1];
double z = CTX::instance()->geom.scalingFactor * (yyvsp[(6) - (7)].v)[2];
double lc = CTX::instance()->geom.scalingFactor * (yyvsp[(6) - (7)].v)[3];
if(lc == 0.) lc = MAX_LC; // no mesh size given at the point
Vertex *v;
if(!myGmshSurface)
v = Create_Vertex(num, x, y, z, lc, 1.0);
else
v = Create_Vertex(num, x, y, myGmshSurface, lc);
Tree_Add(GModel::current()->getGEOInternals()->Points, &v);
AddToTemporaryBoundingBox(v->Pos.X, v->Pos.Y, v->Pos.Z);
(yyval.s).Type = MSH_POINT;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1049 "Gmsh.y"

Christophe Geuzaine
committed
{
curPhysDim = 0;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1053 "Gmsh.y"

Christophe Geuzaine
committed
int num = (int)(yyvsp[(5) - (9)].i);
yymsg(0, "Physical point %d already exists", num);
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(8) - (9)].l));
PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_POINT, temp);
List_Delete(temp);
List_Add(GModel::current()->getGEOInternals()->PhysicalGroups, &p);

Christophe Geuzaine
committed
List_Delete((yyvsp[(8) - (9)].l));
(yyval.s).Type = MSH_PHYSICAL_POINT;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1069 "Gmsh.y"
double d;
List_Read((yyvsp[(3) - (6)].l), i, &d);
Vertex *v = FindPoint((int)d);
if(v)
v->lc = (yyvsp[(5) - (6)].d);
else{
GVertex *gv = GModel::current()->getVertexByTag((int)d);
if(gv)
gv->setPrescribedMeshSizeAtVertex((yyvsp[(5) - (6)].d));
}
(yyval.s).Type = 0;
(yyval.s).Num = 0;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1091 "Gmsh.y"
yymsg(0, "Curve %d already exists", num);
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(6) - (7)].l));
Curve *c = Create_Curve(num, MSH_SEGM_LINE, 1, temp, NULL,
-1, -1, 0., 1.);
Tree_Add(GModel::current()->getGEOInternals()->Curves, &c);
CreateReversedCurve(c);
List_Delete(temp);
List_Delete((yyvsp[(6) - (7)].l));
(yyval.s).Type = MSH_SEGM_LINE;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1109 "Gmsh.y"
{
for (int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
double dnum;
List_Read((yyvsp[(3) - (4)].l), i, &dnum);
int num = (int) fabs(dnum);
Curve *c = FindCurve(num);
if (c){
c->degenerated = true;
}
else{
GEdge *ge = GModel::current()->getEdgeByTag(num);
if (!ge){
yymsg(0, "Curve %d does not exist", num);
}
else{
ge->setTooSmall(true);
}
}

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1130 "Gmsh.y"
yymsg(0, "Curve %d already exists", num);
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(6) - (7)].l));
Curve *c = Create_Curve(num, MSH_SEGM_SPLN, 3, temp, NULL,
-1, -1, 0., 1.);
Tree_Add(GModel::current()->getGEOInternals()->Curves, &c);
CreateReversedCurve(c);
List_Delete(temp);
List_Delete((yyvsp[(6) - (7)].l));
(yyval.s).Type = MSH_SEGM_SPLN;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1148 "Gmsh.y"
yymsg(0, "Curve %d already exists", num);
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(6) - (8)].l));
Curve *c = Create_Curve(num, MSH_SEGM_CIRC, 2, temp, NULL,
-1, -1, 0., 1.);
if((yyvsp[(7) - (8)].v)[0] || (yyvsp[(7) - (8)].v)[1] || (yyvsp[(7) - (8)].v)[2]){
c->Circle.n[0] = (yyvsp[(7) - (8)].v)[0];
c->Circle.n[1] = (yyvsp[(7) - (8)].v)[1];
c->Circle.n[2] = (yyvsp[(7) - (8)].v)[2];
End_Curve(c);
}
Tree_Add(GModel::current()->getGEOInternals()->Curves, &c);
Curve *rc = CreateReversedCurve(c);
if((yyvsp[(7) - (8)].v)[0] || (yyvsp[(7) - (8)].v)[1] || (yyvsp[(7) - (8)].v)[2]){
rc->Circle.n[0] = (yyvsp[(7) - (8)].v)[0];
rc->Circle.n[1] = (yyvsp[(7) - (8)].v)[1];
rc->Circle.n[2] = (yyvsp[(7) - (8)].v)[2];
End_Curve(rc);
}
(yyval.s).Type = MSH_SEGM_CIRC;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1178 "Gmsh.y"
yymsg(0, "Curve %d already exists", num);
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(6) - (8)].l));
Curve *c = Create_Curve(num, MSH_SEGM_ELLI, 2, temp, NULL,
-1, -1, 0., 1.);
if((yyvsp[(7) - (8)].v)[0] || (yyvsp[(7) - (8)].v)[1] || (yyvsp[(7) - (8)].v)[2]){
c->Circle.n[0] = (yyvsp[(7) - (8)].v)[0];
c->Circle.n[1] = (yyvsp[(7) - (8)].v)[1];
c->Circle.n[2] = (yyvsp[(7) - (8)].v)[2];
End_Curve(c);
}
Tree_Add(GModel::current()->getGEOInternals()->Curves, &c);
Curve *rc = CreateReversedCurve(c);
if((yyvsp[(7) - (8)].v)[0] || (yyvsp[(7) - (8)].v)[1] || (yyvsp[(7) - (8)].v)[2]){
rc->Circle.n[0] = (yyvsp[(7) - (8)].v)[0];
rc->Circle.n[1] = (yyvsp[(7) - (8)].v)[1];
rc->Circle.n[2] = (yyvsp[(7) - (8)].v)[2];
End_Curve(rc);
}
(yyval.s).Type = MSH_SEGM_ELLI;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1208 "Gmsh.y"
yymsg(0, "Curve %d already exists", num);
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(6) - (7)].l));
Curve *c = Create_Curve(num, MSH_SEGM_BSPLN, 2, temp, NULL,
-1, -1, 0., 1.);
Tree_Add(GModel::current()->getGEOInternals()->Curves, &c);
CreateReversedCurve(c);
List_Delete(temp);
List_Delete((yyvsp[(6) - (7)].l));
(yyval.s).Type = MSH_SEGM_BSPLN;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1226 "Gmsh.y"
yymsg(0, "Curve %d already exists", num);
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(6) - (7)].l));
Curve *c = Create_Curve(num, MSH_SEGM_BEZIER, 2, temp, NULL,
-1, -1, 0., 1.);
Tree_Add(GModel::current()->getGEOInternals()->Curves, &c);
CreateReversedCurve(c);
List_Delete(temp);
List_Delete((yyvsp[(6) - (7)].l));
(yyval.s).Type = MSH_SEGM_BEZIER;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1244 "Gmsh.y"
{
int num = (int)(yyvsp[(3) - (11)].d);
if(List_Nbr((yyvsp[(6) - (11)].l)) + (int)(yyvsp[(10) - (11)].d) + 1 != List_Nbr((yyvsp[(8) - (11)].l))){
yymsg(0, "Wrong definition of Nurbs Curve %d: "
"got %d knots, need N + D + 1 = %d + %d + 1 = %d",
(int)(yyvsp[(3) - (11)].d), List_Nbr((yyvsp[(8) - (11)].l)), List_Nbr((yyvsp[(6) - (11)].l)), (int)(yyvsp[(10) - (11)].d), List_Nbr((yyvsp[(6) - (11)].l)) + (int)(yyvsp[(10) - (11)].d) + 1);
if(FindCurve(num)){
yymsg(0, "Curve %d already exists", num);
}
else{
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(6) - (11)].l));
Curve *c = Create_Curve(num, MSH_SEGM_NURBS, (int)(yyvsp[(10) - (11)].d), temp, (yyvsp[(8) - (11)].l),
-1, -1, 0., 1.);
Tree_Add(GModel::current()->getGEOInternals()->Curves, &c);
CreateReversedCurve(c);
List_Delete(temp);
}
List_Delete((yyvsp[(6) - (11)].l));
List_Delete((yyvsp[(8) - (11)].l));
(yyval.s).Type = MSH_SEGM_NURBS;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1270 "Gmsh.y"
yymsg(0, "Line loop %d already exists", num);
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (8)].l));
sortEdgesInLoop(num, temp);
EdgeLoop *l = Create_EdgeLoop(num, temp);
Tree_Add(GModel::current()->getGEOInternals()->EdgeLoops, &l);
List_Delete(temp);
List_Delete((yyvsp[(7) - (8)].l));
(yyval.s).Type = MSH_SEGM_LOOP;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1287 "Gmsh.y"
int num = (int)(yyvsp[(4) - (8)].d);
if(FindCurve(num)){
yymsg(0, "Curve %d already exists", num);
}
else{
Curve *c = Create_Curve(num, MSH_SEGM_COMPOUND, 1, NULL, NULL, -1, -1, 0., 1.);
for(int i = 0; i < List_Nbr((yyvsp[(7) - (8)].l)); i++)
c->compound.push_back((int)*(double*)List_Pointer((yyvsp[(7) - (8)].l), i));
End_Curve(c);
Tree_Add(GModel::current()->getGEOInternals()->Curves, &c);
CreateReversedCurve(c);
}
List_Delete((yyvsp[(7) - (8)].l));
(yyval.s).Type = MSH_SEGM_COMPOUND;
(yyval.s).Num = num;

Christophe Geuzaine
committed
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1305 "Gmsh.y"
{
curPhysDim = 1;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1309 "Gmsh.y"

Christophe Geuzaine
committed
{
int num = (int)(yyvsp[(5) - (9)].i);
yymsg(0, "Physical line %d already exists", num);
else{
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(8) - (9)].l));
PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_LINE, temp);
List_Delete(temp);
List_Add(GModel::current()->getGEOInternals()->PhysicalGroups, &p);

Christophe Geuzaine
committed
List_Delete((yyvsp[(8) - (9)].l));
(yyval.s).Type = MSH_PHYSICAL_LINE;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1328 "Gmsh.y"
yymsg(0, "Surface %d already exists", num);
Surface *s = Create_Surface(num, MSH_SURF_PLAN);
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (8)].l));
setSurfaceGeneratrices(s, temp);
List_Delete(temp);
End_Surface(s);
Tree_Add(GModel::current()->getGEOInternals()->Surfaces, &s);
List_Delete((yyvsp[(7) - (8)].l));
(yyval.s).Type = MSH_SURF_PLAN;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1346 "Gmsh.y"

Christophe Geuzaine
committed
int num = (int)(yyvsp[(4) - (9)].d), type = 0;
yymsg(0, "Surface %d already exists", num);
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
double d;
List_Read((yyvsp[(7) - (9)].l), 0, &d);
EdgeLoop *el = FindEdgeLoop((int)fabs(d));
if(!el){
yymsg(0, "Unknown line loop %d", (int)d);
}
else{
int j = List_Nbr(el->Curves);
if(j == 4){
type = MSH_SURF_REGL;
}
else if(j == 3){
type = MSH_SURF_TRIC;
}
else{
yymsg(0, "Wrong definition of Ruled Surface %d: "
"%d borders instead of 3 or 4", num, j);
type = MSH_SURF_PLAN;
}
Surface *s = Create_Surface(num, type);
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (9)].l));
setSurfaceGeneratrices(s, temp);
List_Delete(temp);
End_Surface(s);
s->InSphereCenter = (yyvsp[(8) - (9)].l);
Tree_Add(GModel::current()->getGEOInternals()->Surfaces, &s);
}

Christophe Geuzaine
committed
List_Delete((yyvsp[(7) - (9)].l));
(yyval.s).Type = type;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1385 "Gmsh.y"

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1391 "Gmsh.y"
myGmshSurface = gmshSurface::getSurface((int)(yyvsp[(3) - (4)].d));

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1397 "Gmsh.y"
int num = (int)(yyvsp[(4) - (10)].d);
myGmshSurface = gmshParametricSurface::NewParametricSurface(num, (yyvsp[(7) - (10)].c), (yyvsp[(8) - (10)].c), (yyvsp[(9) - (10)].c));
(yyval.s).Type = 0;
(yyval.s).Num = num;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1404 "Gmsh.y"
yymsg(0, "Sphere %d has to be defined using 2 points (center + "
"any point) and not %d", num, List_Nbr((yyvsp[(6) - (7)].l)));
double p1,p2;
List_Read((yyvsp[(6) - (7)].l), 0, &p1);
List_Read((yyvsp[(6) - (7)].l), 1, &p2);
Vertex *v1 = FindPoint((int)p1);
Vertex *v2 = FindPoint((int)p2);
if(!v1) yymsg(0, "Sphere %d : unknown point %d", num, (int)p1);
if(!v2) yymsg(0, "Sphere %d : unknown point %d", num, (int)p2);
if(v1 && v2)
myGmshSurface = gmshSphere::NewSphere
(num, v1->Pos.X, v1->Pos.Y, v1->Pos.Z,
sqrt((v2->Pos.X - v1->Pos.X) * (v2->Pos.X - v1->Pos.X) +
(v2->Pos.Y - v1->Pos.Y) * (v2->Pos.Y - v1->Pos.Y) +
(v2->Pos.Z - v1->Pos.Z) * (v2->Pos.Z - v1->Pos.Z)));

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1429 "Gmsh.y"
yymsg(0, "PolarSphere %d has to be defined using 2 points (center + "
"any point) and not %d", num, List_Nbr((yyvsp[(6) - (7)].l)));
double p1,p2;
List_Read((yyvsp[(6) - (7)].l), 0, &p1);
List_Read((yyvsp[(6) - (7)].l), 1, &p2);
Vertex *v1 = FindPoint((int)p1);
Vertex *v2 = FindPoint((int)p2);
if(!v1) yymsg(0, "PolarSphere %d : unknown point %d", num, (int)p1);
if(!v2) yymsg(0, "PolarSphere %d : unknown point %d", num, (int)p2);
if(v1 && v2)
myGmshSurface = gmshPolarSphere::NewPolarSphere
(num, v1->Pos.X, v1->Pos.Y, v1->Pos.Z,
sqrt((v2->Pos.X - v1->Pos.X) * (v2->Pos.X - v1->Pos.X) +
(v2->Pos.Y - v1->Pos.Y) * (v2->Pos.Y - v1->Pos.Y) +
(v2->Pos.Z - v1->Pos.Z) * (v2->Pos.Z - v1->Pos.Z)));

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1454 "Gmsh.y"
yymsg(0, "Surface loop %d already exists", num);
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (8)].l));
SurfaceLoop *l = Create_SurfaceLoop(num, temp);
Tree_Add(GModel::current()->getGEOInternals()->SurfaceLoops, &l);
List_Delete(temp);
List_Delete((yyvsp[(7) - (8)].l));
(yyval.s).Type = MSH_SURF_LOOP;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1470 "Gmsh.y"
int num = (int)(yyvsp[(4) - (8)].d);
yymsg(0, "Surface %d already exists", num);
Emilie Marchandise
committed
Surface *s = Create_Surface(num, MSH_SURF_COMPOUND);
for(int i = 0; i < List_Nbr((yyvsp[(7) - (8)].l)); i++){
s->compound.push_back((int)*(double*)List_Pointer((yyvsp[(7) - (8)].l), i));
}
Tree_Add(GModel::current()->getGEOInternals()->Surfaces, &s);
List_Delete((yyvsp[(7) - (8)].l));

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1488 "Gmsh.y"
int num = (int)(yyvsp[(4) - (12)].d);
yymsg(0, "Surface %d already exists", num);
for(int i = 0; i < List_Nbr((yyvsp[(7) - (12)].l)); i++)
s->compound.push_back((int)*(double*)List_Pointer((yyvsp[(7) - (12)].l), i));
for (int i = 0; i < List_Nbr((yyvsp[(10) - (12)].l)); i++){
if(i > 3){
yymsg(0, "Too many boundary specifiers in compound surface");
break;
}
List_T *l = *(List_T**)List_Pointer((yyvsp[(10) - (12)].l), i);
s->compoundBoundary[i].push_back((int)*(double*)List_Pointer(l, j));
}
}
Tree_Add(GModel::current()->getGEOInternals()->Surfaces, &s);
List_Delete((yyvsp[(7) - (12)].l));
for (int i = 0; i < List_Nbr((yyvsp[(10) - (12)].l)); i++)
List_Delete(*(List_T**)List_Pointer((yyvsp[(10) - (12)].l), i));
List_Delete((yyvsp[(10) - (12)].l));
Free((yyvsp[(8) - (12)].c));
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1518 "Gmsh.y"

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1522 "Gmsh.y"
int num = (int)(yyvsp[(5) - (9)].i);
if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){
yymsg(0, "Physical surface %d already exists", num);
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(8) - (9)].l));
PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_SURFACE, temp);
List_Delete(temp);
List_Add(GModel::current()->getGEOInternals()->PhysicalGroups, &p);
List_Delete((yyvsp[(8) - (9)].l));
(yyval.s).Type = MSH_PHYSICAL_SURFACE;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1542 "Gmsh.y"
yymsg(0, "'Complex Volume' command is deprecated: use 'Volume' instead");
yymsg(0, "Volume %d already exists", num);
Volume *v = Create_Volume(num, MSH_VOLUME);
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (8)].l));
setVolumeSurfaces(v, temp);
List_Delete(temp);
Tree_Add(GModel::current()->getGEOInternals()->Volumes, &v);
List_Delete((yyvsp[(7) - (8)].l));
(yyval.s).Type = MSH_VOLUME;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1560 "Gmsh.y"
yymsg(0, "Volume %d already exists", num);
Volume *v = Create_Volume(num, MSH_VOLUME);
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(6) - (7)].l));
setVolumeSurfaces(v, temp);
List_Delete(temp);
Tree_Add(GModel::current()->getGEOInternals()->Volumes, &v);
List_Delete((yyvsp[(6) - (7)].l));
(yyval.s).Type = MSH_VOLUME;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1577 "Gmsh.y"
{
int num = (int)(yyvsp[(4) - (8)].d);
if(FindVolume(num)){
yymsg(0, "Volume %d already exists", num);
Volume *v = Create_Volume(num, MSH_VOLUME_COMPOUND);
for(int i = 0; i < List_Nbr((yyvsp[(7) - (8)].l)); i++)
v->compound.push_back((int)*(double*)List_Pointer((yyvsp[(7) - (8)].l), i));
Tree_Add(GModel::current()->getGEOInternals()->Volumes, &v);
}
List_Delete((yyvsp[(7) - (8)].l));
(yyval.s).Type = MSH_VOLUME_COMPOUND;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1593 "Gmsh.y"

Christophe Geuzaine
committed
{
curPhysDim = 3;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1597 "Gmsh.y"

Christophe Geuzaine
committed
int num = (int)(yyvsp[(5) - (9)].i);
yymsg(0, "Physical volume %d already exists", num);
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(8) - (9)].l));
PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_VOLUME, temp);
List_Delete(temp);
List_Add(GModel::current()->getGEOInternals()->PhysicalGroups, &p);

Christophe Geuzaine
committed
List_Delete((yyvsp[(8) - (9)].l));
(yyval.s).Type = MSH_PHYSICAL_VOLUME;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1619 "Gmsh.y"
{
TranslateShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(4) - (5)].l));
(yyval.l) = (yyvsp[(4) - (5)].l);
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1624 "Gmsh.y"
{
RotateShapes((yyvsp[(3) - (11)].v)[0], (yyvsp[(3) - (11)].v)[1], (yyvsp[(3) - (11)].v)[2], (yyvsp[(5) - (11)].v)[0], (yyvsp[(5) - (11)].v)[1], (yyvsp[(5) - (11)].v)[2], (yyvsp[(7) - (11)].d), (yyvsp[(10) - (11)].l));
(yyval.l) = (yyvsp[(10) - (11)].l);
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1629 "Gmsh.y"
{
SymmetryShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(2) - (5)].v)[3], (yyvsp[(4) - (5)].l));
(yyval.l) = (yyvsp[(4) - (5)].l);
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1634 "Gmsh.y"
{
DilatShapes((yyvsp[(3) - (9)].v)[0], (yyvsp[(3) - (9)].v)[1], (yyvsp[(3) - (9)].v)[2], (yyvsp[(5) - (9)].d), (yyvsp[(8) - (9)].l));
(yyval.l) = (yyvsp[(8) - (9)].l);
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1639 "Gmsh.y"
if(!strcmp((yyvsp[(1) - (4)].c), "Duplicata")){
for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
Shape TheShape;
List_Read((yyvsp[(3) - (4)].l), i, &TheShape);
CopyShape(TheShape.Type, TheShape.Num, &TheShape.Num);
List_Add((yyval.l), &TheShape);
}
}
else if(!strcmp((yyvsp[(1) - (4)].c), "Boundary")){
BoundaryShapes((yyvsp[(3) - (4)].l), (yyval.l), false);
}
else if(!strcmp((yyvsp[(1) - (4)].c), "CombinedBoundary")){
BoundaryShapes((yyvsp[(3) - (4)].l), (yyval.l), true);
else{
yymsg(0, "Unknown command on multiple shapes: '%s'", (yyvsp[(1) - (4)].c));
}
Free((yyvsp[(1) - (4)].c));

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1662 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(Shape));
IntersectCurvesWithSurface((yyvsp[(4) - (9)].l), (int)(yyvsp[(8) - (9)].d), (yyval.l));
List_Delete((yyvsp[(4) - (9)].l));
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1668 "Gmsh.y"
{
(yyval.l) = List_Create(2, 1, sizeof(Shape*));
List_T *tmp = ListOfDouble2ListOfInt((yyvsp[(7) - (9)].l));
SplitCurve((int)(yyvsp[(4) - (9)].d), tmp, (yyval.l));
List_Delete(tmp);
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1678 "Gmsh.y"

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1679 "Gmsh.y"
{ (yyval.l) = (yyvsp[(1) - (1)].l); ;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1684 "Gmsh.y"
{
(yyval.l) = List_Create(3, 3, sizeof(Shape));
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1688 "Gmsh.y"
{
List_Add((yyval.l), &(yyvsp[(2) - (2)].s));
;}
break;

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1692 "Gmsh.y"
double d;
List_Read((yyvsp[(4) - (6)].l), i, &d);
Shape TheShape;
TheShape.Num = (int)d;
Vertex *v = FindPoint(std::abs(TheShape.Num));
if(v){
TheShape.Type = MSH_POINT;
List_Add((yyval.l), &TheShape);
}
else{
GVertex *gv = GModel::current()->getVertexByTag(std::abs(TheShape.Num));
if(gv){
TheShape.Type = MSH_POINT_FROM_GMODEL;
List_Add((yyval.l), &TheShape);
}
else
yymsg(1, "Unknown point %d", TheShape.Num);
}

Christophe Geuzaine
committed
/* Line 1464 of yacc.c */

Christophe Geuzaine
committed
#line 1715 "Gmsh.y"
double d;
List_Read((yyvsp[(4) - (6)].l), i, &d);
Shape TheShape;
TheShape.Num = (int)d;
Curve *c = FindCurve(std::abs(TheShape.Num));
if(c){
TheShape.Type = c->Typ;
List_Add((yyval.l), &TheShape);
}
else{
GEdge *ge = GModel::current()->getEdgeByTag(std::abs(TheShape.Num));
if(ge){
TheShape.Type = MSH_SEGM_FROM_GMODEL;
List_Add((yyval.l), &TheShape);
}
else
yymsg(1, "Unknown curve %d", TheShape.Num);