Newer
Older
Free((yyvsp[(3) - (9)].c));
Free((yyvsp[(8) - (9)].c));
List_Delete((yyvsp[(5) - (9)].l));
;}
break;
case 27:
#line 246 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
if(!strcmp((yyvsp[(1) - (6)].c), "View") && ViewData->finalize()){
ViewData->setName((yyvsp[(2) - (6)].c));
ViewData->setFileName(gmsh_yyname);
ViewData->setFileIndex(gmsh_yyviewindex++);

Christophe Geuzaine
committed
#endif
Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(2) - (6)].c));
;}
break;
case 28:
#line 260 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
if(!strcmp((yyvsp[(2) - (6)].c), "View")){
int index = (int)(yyvsp[(4) - (6)].d);

Christophe Geuzaine
committed
#endif
case 29:
#line 271 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
if(!strcmp((yyvsp[(2) - (6)].c), "View")){
int index = (int)(yyvsp[(4) - (6)].d);

Christophe Geuzaine
committed
#endif
case 30:
#line 285 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
ViewData = new PViewDataList();

Christophe Geuzaine
committed
#endif

Christophe Geuzaine
committed
#line 299 "Gmsh.y"
{ ViewCoord.push_back((yyvsp[(1) - (1)].d)); ;}
#line 301 "Gmsh.y"
{ ViewCoord.push_back((yyvsp[(3) - (3)].d)); ;}

Christophe Geuzaine
committed
#line 306 "Gmsh.y"
{ if(ViewValueList) ViewValueList->push_back((yyvsp[(1) - (1)].d)); ;}
#line 308 "Gmsh.y"
{ if(ViewValueList) ViewValueList->push_back((yyvsp[(3) - (3)].d)); ;}
break;
case 40:
#line 313 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
if(!strncmp((yyvsp[(1) - (1)].c), "SP", 2)){
ViewValueList = &ViewData->SP; ViewNumList = &ViewData->NbSP;

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "VP", 2)){
ViewValueList = &ViewData->VP; ViewNumList = &ViewData->NbVP;

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "TP", 2)){
ViewValueList = &ViewData->TP; ViewNumList = &ViewData->NbTP;

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "SL", 2)){
ViewValueList = &ViewData->SL; ViewNumList = &ViewData->NbSL;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_LIN);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "VL", 2)){
ViewValueList = &ViewData->VL; ViewNumList = &ViewData->NbVL;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_LIN);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "TL", 2)){
ViewValueList = &ViewData->TL; ViewNumList = &ViewData->NbTL;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_LIN);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "ST", 2)){
ViewValueList = &ViewData->ST; ViewNumList = &ViewData->NbST;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_TRI);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "VT", 2)){
ViewValueList = &ViewData->VT; ViewNumList = &ViewData->NbVT;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_TRI);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "TT", 2)){
ViewValueList = &ViewData->TT; ViewNumList = &ViewData->NbTT;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_TRI);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "SQ", 2)){
ViewValueList = &ViewData->SQ; ViewNumList = &ViewData->NbSQ;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_QUA);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "VQ", 2)){
ViewValueList = &ViewData->VQ; ViewNumList = &ViewData->NbVQ;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_QUA);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "TQ", 2)){
ViewValueList = &ViewData->TQ; ViewNumList = &ViewData->NbTQ;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_QUA);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "SS", 2)){
ViewValueList = &ViewData->SS; ViewNumList = &ViewData->NbSS;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_TET);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "VS", 2)){
ViewValueList = &ViewData->VS; ViewNumList = &ViewData->NbVS;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_TET);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "TS", 2)){
ViewValueList = &ViewData->TS; ViewNumList = &ViewData->NbTS;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_TET);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "SH", 2)){
ViewValueList = &ViewData->SH; ViewNumList = &ViewData->NbSH;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_HEX);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "VH", 2)){
ViewValueList = &ViewData->VH; ViewNumList = &ViewData->NbVH;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_HEX);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "TH", 2)){
ViewValueList = &ViewData->TH; ViewNumList = &ViewData->NbTH;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_HEX);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "SI", 2)){
ViewValueList = &ViewData->SI; ViewNumList = &ViewData->NbSI;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_PRI);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "VI", 2)){
ViewValueList = &ViewData->VI; ViewNumList = &ViewData->NbVI;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_PRI);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "TI", 2)){
ViewValueList = &ViewData->TI; ViewNumList = &ViewData->NbTI;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_PRI);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "SY", 2)){
ViewValueList = &ViewData->SY; ViewNumList = &ViewData->NbSY;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_PYR);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "VY", 2)){
ViewValueList = &ViewData->VY; ViewNumList = &ViewData->NbVY;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_PYR);

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "TY", 2)){
ViewValueList = &ViewData->TY; ViewNumList = &ViewData->NbTY;

Jean-François Remacle
committed
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(TYPE_PYR);
yymsg(0, "Unknown element type '%s'", (yyvsp[(1) - (1)].c));

Christophe Geuzaine
committed
#endif
case 41:
#line 417 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
for(unsigned int j = 0; j < ViewCoord.size() / 3; j++)

Christophe Geuzaine
committed
ViewValueList->push_back(ViewCoord[3 * j + i]);

Christophe Geuzaine
committed
#endif
case 42:
#line 427 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
#endif
case 43:
#line 436 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c)) + 1; i++) ViewData->T2C.push_back((yyvsp[(1) - (1)].c)[i]);

Christophe Geuzaine
committed
#endif
case 44:
#line 443 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c)) + 1; i++) ViewData->T2C.push_back((yyvsp[(3) - (3)].c)[i]);

Christophe Geuzaine
committed
#endif
case 45:
#line 453 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
ViewData->T2D.push_back((yyvsp[(3) - (8)].d));
ViewData->T2D.push_back((yyvsp[(5) - (8)].d));
ViewData->T2D.push_back((yyvsp[(7) - (8)].d));
ViewData->T2D.push_back(ViewData->T2C.size());

Christophe Geuzaine
committed
#endif
case 46:
#line 462 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
#endif
case 47:
#line 471 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c)) + 1; i++) ViewData->T3C.push_back((yyvsp[(1) - (1)].c)[i]);

Christophe Geuzaine
committed
#endif
case 48:
#line 478 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c)) + 1; i++) ViewData->T3C.push_back((yyvsp[(3) - (3)].c)[i]);

Christophe Geuzaine
committed
#endif
case 49:
#line 488 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
ViewData->T3D.push_back((yyvsp[(3) - (10)].d)); ViewData->T3D.push_back((yyvsp[(5) - (10)].d));
ViewData->T3D.push_back((yyvsp[(7) - (10)].d)); ViewData->T3D.push_back((yyvsp[(9) - (10)].d));
ViewData->T3D.push_back(ViewData->T3C.size());

Christophe Geuzaine
committed
#endif
case 50:
#line 496 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
#endif
case 51:
#line 506 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Jean-François Remacle
committed
(ViewData->NbSL || ViewData->NbVL) ? TYPE_LIN :
(ViewData->NbST || ViewData->NbVT) ? TYPE_TRI :
(ViewData->NbSQ || ViewData->NbVQ) ? TYPE_QUA :
(ViewData->NbSS || ViewData->NbVS) ? TYPE_TET :
(ViewData->NbSY || ViewData->NbVY) ? TYPE_PYR :
(ViewData->NbSI || ViewData->NbVI) ? TYPE_PRI :
(ViewData->NbSH || ViewData->NbVH) ? TYPE_HEX :
ViewData->setInterpolationMatrices(type, ListOfListOfDouble2Matrix((yyvsp[(3) - (8)].l)),
ListOfListOfDouble2Matrix((yyvsp[(6) - (8)].l)));

Christophe Geuzaine
committed
#endif
case 52:
#line 525 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Jean-François Remacle
committed
(ViewData->NbSL || ViewData->NbVL) ? TYPE_LIN :
(ViewData->NbST || ViewData->NbVT) ? TYPE_TRI :
(ViewData->NbSQ || ViewData->NbVQ) ? TYPE_QUA :
(ViewData->NbSS || ViewData->NbVS) ? TYPE_TET :
(ViewData->NbSH || ViewData->NbVH) ? TYPE_HEX :
ViewData->setInterpolationMatrices(type, ListOfListOfDouble2Matrix((yyvsp[(3) - (14)].l)),
ListOfListOfDouble2Matrix((yyvsp[(6) - (14)].l)),
ListOfListOfDouble2Matrix((yyvsp[(9) - (14)].l)),
ListOfListOfDouble2Matrix((yyvsp[(12) - (14)].l)));

Christophe Geuzaine
committed
#endif
case 53:
#line 544 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
ViewValueList = &ViewData->Time;

Christophe Geuzaine
committed
#endif
case 54:
#line 550 "Gmsh.y"
case 55:
#line 557 "Gmsh.y"
case 56:
#line 558 "Gmsh.y"
case 57:
#line 559 "Gmsh.y"
case 58:
#line 560 "Gmsh.y"
case 59:
#line 561 "Gmsh.y"
case 60:
#line 565 "Gmsh.y"
case 61:
#line 566 "Gmsh.y"
case 62:
#line 574 "Gmsh.y"
{
if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){
if(!(yyvsp[(2) - (4)].i))
gmsh_yysymbols[(yyvsp[(1) - (4)].c)].push_back((yyvsp[(3) - (4)].d));
else
yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (4)].c));
case 0 : gmsh_yysymbols[(yyvsp[(1) - (4)].c)][0] = (yyvsp[(3) - (4)].d); break;
case 1 : gmsh_yysymbols[(yyvsp[(1) - (4)].c)][0] += (yyvsp[(3) - (4)].d); break;
case 2 : gmsh_yysymbols[(yyvsp[(1) - (4)].c)][0] -= (yyvsp[(3) - (4)].d); break;
case 3 : gmsh_yysymbols[(yyvsp[(1) - (4)].c)][0] *= (yyvsp[(3) - (4)].d); break;

Christophe Geuzaine
committed
case 4 :
if((yyvsp[(3) - (4)].d)) gmsh_yysymbols[(yyvsp[(1) - (4)].c)][0] /= (yyvsp[(3) - (4)].d);
else yymsg(0, "Division by zero in '%s /= %g'", (yyvsp[(1) - (4)].c), (yyvsp[(3) - (4)].d));

Christophe Geuzaine
committed
break;
}
Free((yyvsp[(1) - (4)].c));
case 63:
#line 596 "Gmsh.y"
int index = (int)(yyvsp[(3) - (7)].d);
if(!gmsh_yysymbols.count((yyvsp[(1) - (7)].c))){
gmsh_yysymbols[(yyvsp[(1) - (7)].c)].resize(index + 1, 0.);
gmsh_yysymbols[(yyvsp[(1) - (7)].c)][index] = (yyvsp[(6) - (7)].d);

Christophe Geuzaine
committed
}
yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (7)].c));
if((int)gmsh_yysymbols[(yyvsp[(1) - (7)].c)].size() < index + 1)
gmsh_yysymbols[(yyvsp[(1) - (7)].c)].resize(index + 1, 0.);
switch((yyvsp[(5) - (7)].i)){
case 0 : gmsh_yysymbols[(yyvsp[(1) - (7)].c)][index] = (yyvsp[(6) - (7)].d); break;
case 1 : gmsh_yysymbols[(yyvsp[(1) - (7)].c)][index] += (yyvsp[(6) - (7)].d); break;
case 2 : gmsh_yysymbols[(yyvsp[(1) - (7)].c)][index] -= (yyvsp[(6) - (7)].d); break;
case 3 : gmsh_yysymbols[(yyvsp[(1) - (7)].c)][index] *= (yyvsp[(6) - (7)].d); break;
case 4 :
if((yyvsp[(6) - (7)].d)) gmsh_yysymbols[(yyvsp[(1) - (7)].c)][index] /= (yyvsp[(6) - (7)].d);
else yymsg(0, "Division by zero in '%s[%d] /= %g'", (yyvsp[(1) - (7)].c), index, (yyvsp[(6) - (7)].d));
break;

Christophe Geuzaine
committed
}
Free((yyvsp[(1) - (7)].c));
case 64:
#line 623 "Gmsh.y"
{
if(List_Nbr((yyvsp[(4) - (9)].l)) != List_Nbr((yyvsp[(8) - (9)].l))){
yymsg(0, "Incompatible array dimensions in affectation");
if(!gmsh_yysymbols.count((yyvsp[(1) - (9)].c))){
if(!(yyvsp[(7) - (9)].i)){
for(int i = 0; i < List_Nbr((yyvsp[(4) - (9)].l)); i++){
int index = (int)(*(double*)List_Pointer((yyvsp[(4) - (9)].l), i));
gmsh_yysymbols[(yyvsp[(1) - (9)].c)].resize(index + 1, 0.);
gmsh_yysymbols[(yyvsp[(1) - (9)].c)][index] = *(double*)List_Pointer((yyvsp[(8) - (9)].l), i);
yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (9)].c));
int index = (int)(*(double*)List_Pointer((yyvsp[(4) - (9)].l), i));
if((int)gmsh_yysymbols[(yyvsp[(1) - (9)].c)].size() < index + 1)
gmsh_yysymbols[(yyvsp[(1) - (9)].c)].resize(index + 1, 0.);
switch((yyvsp[(7) - (9)].i)){
case 0 : gmsh_yysymbols[(yyvsp[(1) - (9)].c)][index] = d; break;
case 1 : gmsh_yysymbols[(yyvsp[(1) - (9)].c)][index] += d; break;
case 2 : gmsh_yysymbols[(yyvsp[(1) - (9)].c)][index] -= d; break;
case 3 : gmsh_yysymbols[(yyvsp[(1) - (9)].c)][index] *= d; break;
case 4 :
if((yyvsp[(8) - (9)].l)) gmsh_yysymbols[(yyvsp[(1) - (9)].c)][index] /= d;
else yymsg(0, "Division by zero in '%s[%d] /= %g'", (yyvsp[(1) - (9)].c), index, d);
break;
Free((yyvsp[(1) - (9)].c));
List_Delete((yyvsp[(4) - (9)].l));
List_Delete((yyvsp[(8) - (9)].l));
;}
break;
case 65:
#line 663 "Gmsh.y"
if(gmsh_yysymbols.count((yyvsp[(1) - (6)].c)))
gmsh_yysymbols[(yyvsp[(1) - (6)].c)].clear();
gmsh_yysymbols[(yyvsp[(1) - (6)].c)] = std::vector<double>();
for(int i = 0; i < List_Nbr((yyvsp[(5) - (6)].l)); i++)
gmsh_yysymbols[(yyvsp[(1) - (6)].c)].push_back(*(double*)List_Pointer((yyvsp[(5) - (6)].l), i));
Free((yyvsp[(1) - (6)].c));
case 66:
#line 673 "Gmsh.y"
for(int i = 0; i < List_Nbr((yyvsp[(5) - (6)].l)); i++)
gmsh_yysymbols[(yyvsp[(1) - (6)].c)].push_back(*(double*)List_Pointer((yyvsp[(5) - (6)].l), i));
Free((yyvsp[(1) - (6)].c));
case 67:
#line 681 "Gmsh.y"
if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c)))
yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (3)].c));
gmsh_yysymbols[(yyvsp[(1) - (3)].c)][0] += (yyvsp[(2) - (3)].i);
case 68:
#line 689 "Gmsh.y"
if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c)))
yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (6)].c));
int index = (int)(yyvsp[(3) - (6)].d);
if((int)gmsh_yysymbols[(yyvsp[(1) - (6)].c)].size() < index + 1)
gmsh_yysymbols[(yyvsp[(1) - (6)].c)].resize(index + 1, 0.);
gmsh_yysymbols[(yyvsp[(1) - (6)].c)][index] += (yyvsp[(5) - (6)].i);
case 69:
#line 701 "Gmsh.y"
gmsh_yystringsymbols[(yyvsp[(1) - (4)].c)] = std::string((yyvsp[(3) - (4)].c));
Free((yyvsp[(1) - (4)].c));
Free((yyvsp[(3) - (4)].c));
case 70:
#line 710 "Gmsh.y"
std::string tmp((yyvsp[(5) - (6)].c));
StringOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (6)].c), 0, (yyvsp[(3) - (6)].c), tmp);
Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(3) - (6)].c)); Free((yyvsp[(5) - (6)].c))
case 71:
#line 716 "Gmsh.y"
std::string tmp((yyvsp[(8) - (9)].c));
StringOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (9)].c), (int)(yyvsp[(3) - (9)].d), (yyvsp[(6) - (9)].c), tmp);
Free((yyvsp[(1) - (9)].c)); Free((yyvsp[(6) - (9)].c)); Free((yyvsp[(8) - (9)].c))
case 72:
#line 725 "Gmsh.y"
{
double d = 0.;
if(NumberOption(GMSH_GET, (yyvsp[(1) - (6)].c), 0, (yyvsp[(3) - (6)].c), d)){
switch((yyvsp[(4) - (6)].i)){
case 0 : d = (yyvsp[(5) - (6)].d); break;
case 1 : d += (yyvsp[(5) - (6)].d); break;
case 2 : d -= (yyvsp[(5) - (6)].d); break;
case 3 : d *= (yyvsp[(5) - (6)].d); break;
case 4 :
if((yyvsp[(5) - (6)].d)) d /= (yyvsp[(5) - (6)].d);
else yymsg(0, "Division by zero in '%s.%s /= %g'", (yyvsp[(1) - (6)].c), (yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d));
break;
NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (6)].c), 0, (yyvsp[(3) - (6)].c), d);
Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(3) - (6)].c));
;}
break;
case 73:
#line 743 "Gmsh.y"
{
double d = 0.;
if(NumberOption(GMSH_GET, (yyvsp[(1) - (9)].c), (int)(yyvsp[(3) - (9)].d), (yyvsp[(6) - (9)].c), d)){
switch((yyvsp[(7) - (9)].i)){
case 0 : d = (yyvsp[(8) - (9)].d); break;
case 1 : d += (yyvsp[(8) - (9)].d); break;
case 2 : d -= (yyvsp[(8) - (9)].d); break;
case 3 : d *= (yyvsp[(8) - (9)].d); break;
case 4 :
if((yyvsp[(8) - (9)].d)) d /= (yyvsp[(8) - (9)].d);
else yymsg(0, "Division by zero in '%s[%d].%s /= %g'", (yyvsp[(1) - (9)].c), (int)(yyvsp[(3) - (9)].d), (yyvsp[(6) - (9)].c), (yyvsp[(8) - (9)].d));
break;
NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (9)].c), (int)(yyvsp[(3) - (9)].d), (yyvsp[(6) - (9)].c), d);
Free((yyvsp[(1) - (9)].c)); Free((yyvsp[(6) - (9)].c));
;}
break;
case 74:
#line 761 "Gmsh.y"
double d = 0.;
if(NumberOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(3) - (5)].c), d)){
d += (yyvsp[(4) - (5)].i);
NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (5)].c), 0, (yyvsp[(3) - (5)].c), d);
Free((yyvsp[(1) - (5)].c)); Free((yyvsp[(3) - (5)].c));
;}
break;
case 75:
#line 770 "Gmsh.y"
double d = 0.;
if(NumberOption(GMSH_GET, (yyvsp[(1) - (8)].c), (int)(yyvsp[(3) - (8)].d), (yyvsp[(6) - (8)].c), d)){
d += (yyvsp[(7) - (8)].i);
NumberOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (8)].c), (int)(yyvsp[(3) - (8)].d), (yyvsp[(6) - (8)].c), d);
Free((yyvsp[(1) - (8)].c)); Free((yyvsp[(6) - (8)].c));
;}
break;
case 76:
#line 782 "Gmsh.y"
ColorOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (8)].c), 0, (yyvsp[(5) - (8)].c), (yyvsp[(7) - (8)].u));
Free((yyvsp[(1) - (8)].c)); Free((yyvsp[(5) - (8)].c));
;}
break;
case 77:
#line 787 "Gmsh.y"
ColorOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (11)].c), (int)(yyvsp[(3) - (11)].d), (yyvsp[(8) - (11)].c), (yyvsp[(10) - (11)].u));
Free((yyvsp[(1) - (11)].c)); Free((yyvsp[(8) - (11)].c));
;}
break;
case 78:
#line 795 "Gmsh.y"
GmshColorTable *ct = GetColorTable(0);
yymsg(0, "View[%d] does not exist", 0);
yymsg(0, "Too many (%d>%d) colors in View[%d].ColorTable",

Christophe Geuzaine
committed
ct->size, COLORTABLE_NBMAX_COLOR, 0);
for(int i = 0; i < ct->size; i++) List_Read((yyvsp[(5) - (6)].l), i, &ct->table[i]);
if(ct->size == 1){
ct->size = 2;
ct->table[1] = ct->table[0];
}
Free((yyvsp[(1) - (6)].c));
List_Delete((yyvsp[(5) - (6)].l));
;}
break;
case 79:
#line 815 "Gmsh.y"
GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (9)].d));

Christophe Geuzaine
committed
if(!ct)
yymsg(0, "View[%d] does not exist", (int)(yyvsp[(3) - (9)].d));

Christophe Geuzaine
committed
if(ct->size > COLORTABLE_NBMAX_COLOR)
yymsg(0, "Too many (%d>%d) colors in View[%d].ColorTable",

Christophe Geuzaine
committed
else
for(int i = 0; i < ct->size; i++) List_Read((yyvsp[(8) - (9)].l), i, &ct->table[i]);
if(ct->size == 1){
ct->size = 2;
ct->table[1] = ct->table[0];
}
}
Free((yyvsp[(1) - (9)].c));
List_Delete((yyvsp[(8) - (9)].l));
;}
break;
case 80:
#line 838 "Gmsh.y"
if(!strcmp((yyvsp[(1) - (5)].c),"Background"))
GModel::current()->getFields()->background_field = (int)(yyvsp[(4) - (5)].d);
yymsg(0, "Unknown command %s Field", (yyvsp[(1) - (5)].c));
case 81:
#line 845 "Gmsh.y"
if(!GModel::current()->getFields()->newField((int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c)))
yymsg(0, "Cannot create field %i of type '%s'", (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c));
case 82:
#line 851 "Gmsh.y"
{
Field *field = GModel::current()->getFields()->get((int)(yyvsp[(3) - (9)].d));
if(field){
FieldOption *option = field->options[(yyvsp[(6) - (9)].c)];
if(option){
try { option->numericalValue((yyvsp[(8) - (9)].d)); }
yymsg(0, "Cannot assign a numerical value to option '%s' "
"in field %i of type '%s'", (yyvsp[(6) - (9)].c), (int)(yyvsp[(3) - (9)].d), field->getName());
yymsg(0, "Unknown option '%s' in field %i of type '%s'",
(yyvsp[(6) - (9)].c), (int)(yyvsp[(3) - (9)].d), field->getName());
yymsg(0, "No field with id %i", (int)(yyvsp[(3) - (9)].d));
case 83:
#line 871 "Gmsh.y"
{
Field *field = GModel::current()->getFields()->get((int)(yyvsp[(3) - (9)].d));
if(field){
FieldOption *option = field->options[(yyvsp[(6) - (9)].c)];
if(option){
try { option->string() = (yyvsp[(8) - (9)].c); }
catch (...){
yymsg(0, "Cannot assign a string value to option '%s' "
"in field %i of type '%s'", (yyvsp[(6) - (9)].c), (int)(yyvsp[(3) - (9)].d), field->getName());
yymsg(0, "Unknown option '%s' in field %i of type '%s'",
(yyvsp[(6) - (9)].c), (int)(yyvsp[(3) - (9)].d), field->getName());
yymsg(0, "No field with id %i", (int)(yyvsp[(3) - (9)].d));
Free((yyvsp[(6) - (9)].c));
Free((yyvsp[(8) - (9)].c));
case 84:
#line 892 "Gmsh.y"
{
Field *field = GModel::current()->getFields()->get((int)(yyvsp[(3) - (11)].d));
if(field){
FieldOption *option = field->options[(yyvsp[(6) - (11)].c)];
if(option){
std::list<int> &vl = option->list();
vl.clear();
for(int i = 0; i < List_Nbr((yyvsp[(9) - (11)].l)); i++){
double id;
List_Read((yyvsp[(9) - (11)].l), i, &id);
yymsg(0, "Unknown option '%s' in field %i of type '%s'",
(yyvsp[(6) - (11)].c), (int)(yyvsp[(3) - (11)].d), field->getName());
yymsg(0, "No field with id %i", (int)(yyvsp[(3) - (11)].d));
Free((yyvsp[(6) - (11)].c));
List_Delete((yyvsp[(9) - (11)].l));
case 85:
#line 918 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
PluginManager::instance()->setPluginOption((yyvsp[(3) - (9)].c), (yyvsp[(6) - (9)].c), (yyvsp[(8) - (9)].d));
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));
;}
break;
case 86:
#line 930 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
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));
case 87:
#line 947 "Gmsh.y"
{
(yyval.i) = (int)(yyvsp[(1) - (1)].d);
;}
break;
case 88:
#line 951 "Gmsh.y"

Christophe Geuzaine
committed
(std::string((yyvsp[(1) - (1)].c)), curPhysDim,
++GModel::current()->getGEOInternals()->MaxPhysicalNum);
case 89:
#line 961 "Gmsh.y"

Christophe Geuzaine
committed
{
(yyval.l) = 0;
;}
break;
case 90:
#line 965 "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{

Christophe Geuzaine
committed
}
;}
break;
case 91:
#line 977 "Gmsh.y"
{
for(int i = 0; i < 4; i++) (yyval.v)[i] = 0.;
;}
break;
case 92:
#line 981 "Gmsh.y"
{
for(int i = 0; i < 4; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i];
;}
break;
case 93:
#line 991 "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
v = Create_Vertex(num, x, y, z, lc, 1.0);
else
v = Create_Vertex(num, x, y, myGmshSurface, lc);
(yyval.s).Type = MSH_POINT;
(yyval.s).Num = num;
;}
break;
case 94:
#line 1014 "Gmsh.y"

Christophe Geuzaine
committed
{
curPhysDim = 0;
;}
break;
case 95:
#line 1018 "Gmsh.y"

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

Christophe Geuzaine
committed
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;
case 96:
#line 1034 "Gmsh.y"
(yyval.s).Type = 0;
(yyval.s).Num = 0;
;}
break;
case 97:
#line 1056 "Gmsh.y"
yymsg(0, "Curve %d already exists", num);
Curve *c = Create_Curve(num, MSH_SEGM_LINE, 1, temp, NULL,
-1, -1, 0., 1.);
List_Delete((yyvsp[(6) - (7)].l));
(yyval.s).Type = MSH_SEGM_LINE;
(yyval.s).Num = num;
;}
break;
case 98:
#line 1074 "Gmsh.y"
yymsg(0, "Curve %d already exists", num);
Curve *c = Create_Curve(num, MSH_SEGM_SPLN, 3, temp, NULL,
-1, -1, 0., 1.);
List_Delete((yyvsp[(6) - (7)].l));
(yyval.s).Type = MSH_SEGM_SPLN;
(yyval.s).Num = num;
;}
break;
case 99:
#line 1092 "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);
}
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);
}