Newer
Older

Christophe Geuzaine
committed
#line 1248 "Gmsh.y"

Christophe Geuzaine
committed
curPhysDim = 1;
;}
break;
case 106:

Christophe Geuzaine
committed
#line 1252 "Gmsh.y"

Christophe Geuzaine
committed
{
int num = (int)(yyvsp[(5) - (9)].i);
yymsg(0, "Physical line %d already exists", num);
else{

Christophe Geuzaine
committed
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
case 107:

Christophe Geuzaine
committed
#line 1271 "Gmsh.y"
yymsg(0, "Surface %d already exists", num);
}
else{
Surface *s = Create_Surface(num, MSH_SURF_PLAN);
setSurfaceGeneratrices(s, temp);
List_Delete(temp);
End_Surface(s);
List_Delete((yyvsp[(7) - (8)].l));
(yyval.s).Type = MSH_SURF_PLAN;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
case 108:

Christophe Geuzaine
committed
#line 1289 "Gmsh.y"

Christophe Geuzaine
committed
int num = (int)(yyvsp[(4) - (9)].d), type = 0;
yymsg(0, "Surface %d already exists", num);

Christophe Geuzaine
committed
List_Read((yyvsp[(7) - (9)].l), 0, &d);
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);

Christophe Geuzaine
committed
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (9)].l));
setSurfaceGeneratrices(s, temp);
List_Delete(temp);
End_Surface(s);

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

Christophe Geuzaine
committed
case 109:

Christophe Geuzaine
committed
#line 1328 "Gmsh.y"

Christophe Geuzaine
committed
case 110:

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

Christophe Geuzaine
committed
case 111:

Christophe Geuzaine
committed
#line 1340 "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
case 112:

Christophe Geuzaine
committed
#line 1347 "Gmsh.y"
yymsg(0, "Sphere %d has to be defined using 2 points (center + "
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
case 113:

Christophe Geuzaine
committed
#line 1372 "Gmsh.y"
yymsg(0, "PolarSphere %d has to be defined using 2 points (center + "
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
case 114:

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

Christophe Geuzaine
committed
case 115:

Christophe Geuzaine
committed
#line 1413 "Gmsh.y"

Christophe Geuzaine
committed
{
curPhysDim = 2;
;}
break;
case 116:

Christophe Geuzaine
committed
#line 1417 "Gmsh.y"

Christophe Geuzaine
committed
int num = (int)(yyvsp[(5) - (9)].i);
yymsg(0, "Physical surface %d already exists", num);

Christophe Geuzaine
committed
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);

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

Christophe Geuzaine
committed
case 117:

Christophe Geuzaine
committed
#line 1434 "Gmsh.y"
{
int num = (int)(yyvsp[(4) - (8)].d);
if(FindPhysicalGroup(num, MSH_PHYSICAL_VOLUME)){
yymsg(0, "Physical volume %d already exists", num);
}
else{
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (8)].l));
List_T *S[4] = {temp, 0, 0, 0};
PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_VOLUME, temp, S);
List_Delete(temp);
List_Add(GModel::current()->getGEOInternals()->PhysicalGroups, &p);
}
List_Delete((yyvsp[(7) - (8)].l));
(yyval.s).Type = MSH_PHYSICAL_VOLUME;
(yyval.s).Num = num;
;}
break;
case 118:

Christophe Geuzaine
committed
#line 1452 "Gmsh.y"
{
int num = (int)(yyvsp[(4) - (12)].d);
if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){
yymsg(0, "Physical surface %d already exists", num);
}
else{
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (12)].l));
List_T *S[4] = {0, 0, 0, 0};
for (int i = 0; i < List_Nbr((yyvsp[(10) - (12)].l)); i++){
List_Read((yyvsp[(10) - (12)].l), i, &ll);
List_Delete(ll);
}
PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_SURFACE, temp, S);
List_Delete(temp);
for (int i = 0; i < List_Nbr((yyvsp[(10) - (12)].l)); i++)
List_Add(GModel::current()->getGEOInternals()->PhysicalGroups, &p);
}
List_Delete((yyvsp[(7) - (12)].l));
List_Delete((yyvsp[(10) - (12)].l));
(yyval.s).Type = MSH_PHYSICAL_SURFACE;
(yyval.s).Num = num;
;}
break;

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

Christophe Geuzaine
committed
#line 1500 "Gmsh.y"
yymsg(0, "'Complex Volume' command is deprecated: use 'Volume' instead");
yymsg(0, "Volume %d already exists", num);
List_Delete((yyvsp[(7) - (8)].l));
(yyval.s).Type = MSH_VOLUME;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
#line 1518 "Gmsh.y"
yymsg(0, "Volume %d already exists", num);
List_Delete((yyvsp[(6) - (7)].l));
(yyval.s).Type = MSH_VOLUME;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
#line 1535 "Gmsh.y"

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

Christophe Geuzaine
committed
#line 1539 "Gmsh.y"

Christophe Geuzaine
committed
int num = (int)(yyvsp[(5) - (9)].i);
yymsg(0, "Physical volume %d already exists", num);

Christophe Geuzaine
committed
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 1560 "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 1565 "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 1570 "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 1575 "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 1580 "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));
else{
yymsg(0, "Unknown command on multiple shapes: '%s'", (yyvsp[(1) - (4)].c));
}
Free((yyvsp[(1) - (4)].c));

Christophe Geuzaine
committed
#line 1600 "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 1606 "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 1616 "Gmsh.y"
{ (yyval.l) = (yyvsp[(1) - (1)].l); ;}

Christophe Geuzaine
committed
#line 1617 "Gmsh.y"

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

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

Christophe Geuzaine
committed
#line 1630 "Gmsh.y"

Christophe Geuzaine
committed
Vertex *v = FindPoint(std::abs(TheShape.Num));

Christophe Geuzaine
committed
GVertex *gv = GModel::current()->getVertexByTag(std::abs(TheShape.Num));
yymsg(1, "Unknown point %d", TheShape.Num);

Christophe Geuzaine
committed
#line 1653 "Gmsh.y"

Christophe Geuzaine
committed
Curve *c = FindCurve(std::abs(TheShape.Num));

Christophe Geuzaine
committed
GEdge *ge = GModel::current()->getEdgeByTag(std::abs(TheShape.Num));
yymsg(1, "Unknown curve %d", TheShape.Num);

Christophe Geuzaine
committed
#line 1676 "Gmsh.y"

Christophe Geuzaine
committed
Surface *s = FindSurface(std::abs(TheShape.Num));

Christophe Geuzaine
committed
GFace *gf = GModel::current()->getFaceByTag(std::abs(TheShape.Num));
yymsg(1, "Unknown surface %d", TheShape.Num);

Christophe Geuzaine
committed
#line 1699 "Gmsh.y"

Christophe Geuzaine
committed
Volume *v = FindVolume(std::abs(TheShape.Num));

Christophe Geuzaine
committed
GRegion *gr = GModel::current()->getRegionByTag(std::abs(TheShape.Num));
yymsg(1, "Unknown volume %d", TheShape.Num);

Christophe Geuzaine
committed
#line 1727 "Gmsh.y"

Christophe Geuzaine
committed
#line 1736 "Gmsh.y"
GModel::current()->getFields()->deleteField((int)(yyvsp[(4) - (6)].d));

Christophe Geuzaine
committed
#line 1740 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
if(!strcmp((yyvsp[(2) - (6)].c), "View")){
int index = (int)(yyvsp[(4) - (6)].d);
yymsg(0, "Unknown view %d", index);
yymsg(0, "Unknown command 'Delete %s'", (yyvsp[(2) - (6)].c));

Christophe Geuzaine
committed
#endif

Christophe Geuzaine
committed
#line 1755 "Gmsh.y"
if(!strcmp((yyvsp[(2) - (3)].c), "Meshes") || !strcmp((yyvsp[(2) - (3)].c), "All")){
for(unsigned int i = 0; i < GModel::list.size(); i++){
GModel::list[i]->destroy();
GModel::list[i]->getGEOInternals()->destroy();
}
}
else if(!strcmp((yyvsp[(2) - (3)].c), "Model")){
GModel::current()->getGEOInternals()->reset_physicals();
else if(!strcmp((yyvsp[(2) - (3)].c), "Variables")){
gmsh_yysymbols.clear();
if(gmsh_yysymbols.count((yyvsp[(2) - (3)].c)))
gmsh_yysymbols.erase((yyvsp[(2) - (3)].c));
else
yymsg(0, "Unknown object or expression to delete '%s'", (yyvsp[(2) - (3)].c));
}

Christophe Geuzaine
committed
#line 1782 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
if(!strcmp((yyvsp[(2) - (4)].c), "Empty") && !strcmp((yyvsp[(3) - (4)].c), "Views")){
for(int i = PView::list.size() - 1; i >= 0; i--)
if(PView::list[i]->getData()->empty()) delete PView::list[i];
yymsg(0, "Unknown command 'Delete %s %s'", (yyvsp[(2) - (4)].c), (yyvsp[(3) - (4)].c));

Christophe Geuzaine
committed
#endif
Free((yyvsp[(2) - (4)].c)); Free((yyvsp[(3) - (4)].c));
;}
break;

Christophe Geuzaine
committed
#line 1799 "Gmsh.y"
List_Read((yyvsp[(4) - (5)].l), i, &TheShape);
ColorShape(TheShape.Type, TheShape.Num, (yyvsp[(2) - (5)].u));

Christophe Geuzaine
committed
#line 1813 "Gmsh.y"
VisibilityShape((yyvsp[(2) - (3)].c), i, 1);
Free((yyvsp[(2) - (3)].c));
;}
break;

Christophe Geuzaine
committed
#line 1819 "Gmsh.y"
VisibilityShape((yyvsp[(2) - (3)].c), i, 0);
Free((yyvsp[(2) - (3)].c));
;}
break;

Christophe Geuzaine
committed
#line 1825 "Gmsh.y"
VisibilityShape(TheShape.Type, TheShape.Num, 1);

Christophe Geuzaine
committed
#line 1834 "Gmsh.y"

Christophe Geuzaine
committed
#line 1848 "Gmsh.y"
// Warning: we *don't* close included files (to allow user
// functions in these files). If you need to include many many
// files and don't have functions in the files, use "Merge"
// instead: some OSes limit the number of files a process can
// open simultaneously. The right solution would be of course
// to modify FunctionManager to reopen the files instead of
// using the FILE pointer, but hey, I'm lazy...
Msg::StatusBar(2, true, "Reading '%s'", tmpstring);
ParseFile(tmpstring, false, true);
Msg::StatusBar(2, true, "Read '%s'", tmpstring);
// make sure we have the latest data from GEO_Internals in GModel
// (fixes bug where we would have no geometry in the picture if
// the print command is in the same file as the geometry)
CreateOutputFile(tmpstring, CTX::instance()->print.format);
CreateOutputFile(tmpstring, CTX::instance()->mesh.format);
else if(!strcmp((yyvsp[(1) - (3)].c), "Merge") || !strcmp((yyvsp[(1) - (3)].c), "MergeWithBoundingBox")){
MergeFile(tmpstring, true);
}
else if(!strcmp((yyvsp[(1) - (3)].c), "System"))
SystemCall((yyvsp[(2) - (3)].c));
yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (3)].c));
Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(2) - (3)].c));
;}
break;

Christophe Geuzaine
committed
#line 1896 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
if(!strcmp((yyvsp[(1) - (7)].c), "Save") && !strcmp((yyvsp[(2) - (7)].c), "View")){
int index = (int)(yyvsp[(4) - (7)].d);
PView::list[index]->write(tmpstring, CTX::instance()->post.fileFormat);
yymsg(0, "Unknown view %d", index);
yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (7)].c));

Christophe Geuzaine
committed
#endif
Free((yyvsp[(1) - (7)].c)); Free((yyvsp[(2) - (7)].c)); Free((yyvsp[(6) - (7)].c));
;}
break;

Christophe Geuzaine
committed
#line 1914 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
if(!strcmp((yyvsp[(1) - (7)].c), "Background") && !strcmp((yyvsp[(2) - (7)].c), "Mesh") && !strcmp((yyvsp[(3) - (7)].c), "View")){
int index = (int)(yyvsp[(5) - (7)].d);
if(index >= 0 && index < (int)PView::list.size())
GModel::current()->getFields()->setBackgroundMesh(index);
yymsg(0, "Unknown view %d", index);
yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (7)].c));

Christophe Geuzaine
committed
#endif
Free((yyvsp[(1) - (7)].c)); Free((yyvsp[(2) - (7)].c)); Free((yyvsp[(3) - (7)].c));
;}
break;

Christophe Geuzaine
committed
#line 1929 "Gmsh.y"
{
if(!strcmp((yyvsp[(1) - (3)].c), "Sleep")){
SleepInSeconds((yyvsp[(2) - (3)].d));
int lock = CTX::instance()->lock;
CTX::instance()->lock = 0;
GModel::current()->importGEOInternals();
GModel::current()->mesh((int)(yyvsp[(2) - (3)].d));
CTX::instance()->lock = lock;
yymsg(0, "Unknown command '%s'", (yyvsp[(1) - (3)].c));

Christophe Geuzaine
committed
#line 1948 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
PluginManager::instance()->action((yyvsp[(3) - (7)].c), (yyvsp[(6) - (7)].c), 0);
yymsg(0, "Unknown action '%s' or plugin '%s'", (yyvsp[(6) - (7)].c), (yyvsp[(3) - (7)].c));

Christophe Geuzaine
committed
#endif
Free((yyvsp[(3) - (7)].c)); Free((yyvsp[(6) - (7)].c));
;}
break;

Christophe Geuzaine
committed
#line 1960 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
PView::combine(false, 1, CTX::instance()->post.combineRemoveOrig);
else if(!strcmp((yyvsp[(2) - (3)].c), "ElementsFromVisibleViews"))
PView::combine(false, 0, CTX::instance()->post.combineRemoveOrig);
PView::combine(false, 2, CTX::instance()->post.combineRemoveOrig);
PView::combine(true, 1, CTX::instance()->post.combineRemoveOrig);
else if(!strcmp((yyvsp[(2) - (3)].c), "TimeStepsFromVisibleViews"))
PView::combine(true, 0, CTX::instance()->post.combineRemoveOrig);
PView::combine(true, 2, CTX::instance()->post.combineRemoveOrig);
PView::combine(false, 1, CTX::instance()->post.combineRemoveOrig);
PView::combine(true, 2, CTX::instance()->post.combineRemoveOrig);
yymsg(0, "Unknown 'Combine' command");

Christophe Geuzaine
committed
#endif

Christophe Geuzaine
committed
#line 1984 "Gmsh.y"

Christophe Geuzaine
committed
#line 1988 "Gmsh.y"
CTX::instance()->forcedBBox = 0;
// make sure we transfer everything into GModel before computing
// the bounding box
GModel::current()->importGEOInternals();
CTX::instance()->forcedBBox = 1;
SetBoundingBox((yyvsp[(3) - (15)].d), (yyvsp[(5) - (15)].d), (yyvsp[(7) - (15)].d), (yyvsp[(9) - (15)].d), (yyvsp[(11) - (15)].d), (yyvsp[(13) - (15)].d));
;}
break;

Christophe Geuzaine
committed
GModel::current()->createTopologyFromMesh();
{
LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (6)].d);
LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (6)].d);
fgetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
yylinenoImbricatedLoopsTab[ImbricatedLoop] = gmsh_yylineno;
if((yyvsp[(3) - (6)].d) > (yyvsp[(5) - (6)].d))
skip_until("For", "EndFor");
else
ImbricatedLoop++;
if(ImbricatedLoop > MAX_RECUR_LOOPS - 1){
yymsg(0, "Reached maximum number of imbricated loops");
{
LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (8)].d);
LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (8)].d);
LoopControlVariablesTab[ImbricatedLoop][2] = (yyvsp[(7) - (8)].d);
fgetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
yylinenoImbricatedLoopsTab[ImbricatedLoop] = gmsh_yylineno;
if(((yyvsp[(7) - (8)].d) > 0. && (yyvsp[(3) - (8)].d) > (yyvsp[(5) - (8)].d)) || ((yyvsp[(7) - (8)].d) < 0. && (yyvsp[(3) - (8)].d) < (yyvsp[(5) - (8)].d)))
skip_until("For", "EndFor");
else
ImbricatedLoop++;
if(ImbricatedLoop > MAX_RECUR_LOOPS - 1){
yymsg(0, "Reached maximum number of imbricated loops");
{
LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (8)].d);
LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (8)].d);
LoopControlVariablesNameTab[ImbricatedLoop] = (yyvsp[(2) - (8)].c);
gmsh_yysymbols[(yyvsp[(2) - (8)].c)].resize(1);
gmsh_yysymbols[(yyvsp[(2) - (8)].c)][0] = (yyvsp[(5) - (8)].d);
fgetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
yylinenoImbricatedLoopsTab[ImbricatedLoop] = gmsh_yylineno;
if((yyvsp[(5) - (8)].d) > (yyvsp[(7) - (8)].d))
skip_until("For", "EndFor");
else
ImbricatedLoop++;
if(ImbricatedLoop > MAX_RECUR_LOOPS - 1){
yymsg(0, "Reached maximum number of imbricated loops");
{
LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (10)].d);
LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (10)].d);
LoopControlVariablesTab[ImbricatedLoop][2] = (yyvsp[(9) - (10)].d);
LoopControlVariablesNameTab[ImbricatedLoop] = (yyvsp[(2) - (10)].c);
gmsh_yysymbols[(yyvsp[(2) - (10)].c)].resize(1);
gmsh_yysymbols[(yyvsp[(2) - (10)].c)][0] = (yyvsp[(5) - (10)].d);
fgetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
yylinenoImbricatedLoopsTab[ImbricatedLoop] = gmsh_yylineno;
if(((yyvsp[(9) - (10)].d) > 0. && (yyvsp[(5) - (10)].d) > (yyvsp[(7) - (10)].d)) || ((yyvsp[(9) - (10)].d) < 0. && (yyvsp[(5) - (10)].d) < (yyvsp[(7) - (10)].d)))
skip_until("For", "EndFor");
else
ImbricatedLoop++;
if(ImbricatedLoop > MAX_RECUR_LOOPS - 1){
yymsg(0, "Reached maximum number of imbricated loops");
yymsg(0, "Invalid For/EndFor loop");
double x0 = LoopControlVariablesTab[ImbricatedLoop - 1][0];
double x1 = LoopControlVariablesTab[ImbricatedLoop - 1][1];
double step = LoopControlVariablesTab[ImbricatedLoop - 1][2];
int do_next = (step > 0.) ? (x0 + step <= x1) : (x0 + step >= x1);
LoopControlVariablesTab[ImbricatedLoop - 1][0] +=
LoopControlVariablesTab[ImbricatedLoop - 1][2];
if(LoopControlVariablesNameTab[ImbricatedLoop - 1]){
if(!gmsh_yysymbols.count(LoopControlVariablesNameTab[ImbricatedLoop - 1]))
yymsg(0, "Unknown loop variable");
gmsh_yysymbols[LoopControlVariablesNameTab[ImbricatedLoop - 1]][0] +=
LoopControlVariablesTab[ImbricatedLoop - 1][2];
fsetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop - 1]);
gmsh_yylineno = yylinenoImbricatedLoopsTab[ImbricatedLoop - 1];