Newer
Older

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

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

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

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

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

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

Christophe Geuzaine
committed
else if(!strncmp((yyvsp[(1) - (1)].c), "TY", 2)){
ViewValueList = &ViewData->TY; ViewNumList = &ViewData->NbTY;
if(strlen((yyvsp[(1) - (1)].c)) > 2) ViewData->setOrder2(8);
yymsg(0, "Unknown element type '%s'", (yyvsp[(1) - (1)].c));

Christophe Geuzaine
committed
#endif

Christophe Geuzaine
committed
#line 415 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

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

Christophe Geuzaine
committed
#endif

Christophe Geuzaine
committed
#line 425 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
#endif

Christophe Geuzaine
committed
#line 434 "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
Free((yyvsp[(1) - (1)].c));
;}
break;
case 43:

Christophe Geuzaine
committed
#line 441 "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
Free((yyvsp[(3) - (3)].c));
;}
break;
case 44:

Christophe Geuzaine
committed
#line 451 "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

Christophe Geuzaine
committed
#line 460 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
#endif

Christophe Geuzaine
committed
#line 469 "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
Free((yyvsp[(1) - (1)].c));
;}
break;
case 47:

Christophe Geuzaine
committed
#line 476 "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
Free((yyvsp[(3) - (3)].c));
;}
break;
case 48:

Christophe Geuzaine
committed
#line 486 "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

Christophe Geuzaine
committed
#line 494 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
#endif

Christophe Geuzaine
committed
#line 504 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
int type =
(ViewData->NbSL || ViewData->NbVL) ? 1 :
(ViewData->NbST || ViewData->NbVT) ? 3 :
(ViewData->NbSQ || ViewData->NbVQ) ? 4 :
(ViewData->NbSS || ViewData->NbVS) ? 6 :
ViewData->setInterpolationMatrices(type, ListOfListOfDouble2Matrix((yyvsp[(3) - (8)].l)),
ListOfListOfDouble2Matrix((yyvsp[(6) - (8)].l)));

Christophe Geuzaine
committed
#endif

Christophe Geuzaine
committed
#line 522 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
int type =
(ViewData->NbSL || ViewData->NbVL) ? 1 :
(ViewData->NbST || ViewData->NbVT) ? 3 :
(ViewData->NbSQ || ViewData->NbVQ) ? 4 :
(ViewData->NbSS || ViewData->NbVS) ? 6 :
(ViewData->NbSH || ViewData->NbVH) ? 12 :
0;
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

Christophe Geuzaine
committed
#line 541 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
ViewValueList = &ViewData->Time;

Christophe Geuzaine
committed
#endif

Christophe Geuzaine
committed
#line 547 "Gmsh.y"

Christophe Geuzaine
committed
#line 554 "Gmsh.y"

Christophe Geuzaine
committed
#line 555 "Gmsh.y"

Christophe Geuzaine
committed
#line 556 "Gmsh.y"

Christophe Geuzaine
committed
#line 557 "Gmsh.y"

Christophe Geuzaine
committed
#line 558 "Gmsh.y"

Christophe Geuzaine
committed
#line 562 "Gmsh.y"

Christophe Geuzaine
committed
#line 563 "Gmsh.y"

Christophe Geuzaine
committed
#line 571 "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));

Christophe Geuzaine
committed
#line 593 "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(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));

Christophe Geuzaine
committed
#line 620 "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(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 64:

Christophe Geuzaine
committed
#line 660 "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));
List_Delete((yyvsp[(5) - (6)].l));
;}
break;
case 65:

Christophe Geuzaine
committed
#line 670 "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));
List_Delete((yyvsp[(5) - (6)].l));
;}
break;
case 66:

Christophe Geuzaine
committed
#line 678 "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);
Free((yyvsp[(1) - (3)].c));
;}
break;
case 67:

Christophe Geuzaine
committed
#line 686 "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(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);
Free((yyvsp[(1) - (6)].c));
;}
break;
case 68:

Christophe Geuzaine
committed
#line 698 "Gmsh.y"
gmsh_yystringsymbols[(yyvsp[(1) - (4)].c)] = std::string((yyvsp[(3) - (4)].c));
Free((yyvsp[(1) - (4)].c));
Free((yyvsp[(3) - (4)].c));

Christophe Geuzaine
committed
#line 707 "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))

Christophe Geuzaine
committed
#line 713 "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))

Christophe Geuzaine
committed
#line 722 "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 72:

Christophe Geuzaine
committed
#line 740 "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 73:

Christophe Geuzaine
committed
#line 758 "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 74:

Christophe Geuzaine
committed
#line 767 "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 75:

Christophe Geuzaine
committed
#line 779 "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 76:

Christophe Geuzaine
committed
#line 784 "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 77:

Christophe Geuzaine
committed
#line 792 "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 78:

Christophe Geuzaine
committed
#line 812 "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 79:

Christophe Geuzaine
committed
#line 835 "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));

Christophe Geuzaine
committed
#line 842 "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));

Christophe Geuzaine
committed
#line 848 "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));

Christophe Geuzaine
committed
#line 868 "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));

Christophe Geuzaine
committed
#line 889 "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));

Christophe Geuzaine
committed
#line 915 "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;

Christophe Geuzaine
committed
#line 927 "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));

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

Christophe Geuzaine
committed
#line 948 "Gmsh.y"

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

Christophe Geuzaine
committed
#line 958 "Gmsh.y"

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

Christophe Geuzaine
committed
#line 962 "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 90:

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

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

Christophe Geuzaine
committed
#line 988 "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;

Christophe Geuzaine
committed
#line 1011 "Gmsh.y"

Christophe Geuzaine
committed
{
curPhysDim = 0;
;}
break;
case 94:

Christophe Geuzaine
committed
#line 1015 "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;

Christophe Geuzaine
committed
case 95:

Christophe Geuzaine
committed
#line 1031 "Gmsh.y"
(yyval.s).Type = 0;
(yyval.s).Num = 0;
;}
break;

Christophe Geuzaine
committed
case 96:

Christophe Geuzaine
committed
#line 1053 "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;

Christophe Geuzaine
committed
case 97:

Christophe Geuzaine
committed
#line 1071 "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;

Christophe Geuzaine
committed
case 98:

Christophe Geuzaine
committed
#line 1089 "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);
}
(yyval.s).Type = MSH_SEGM_CIRC;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
case 99:

Christophe Geuzaine
committed
#line 1119 "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);
}
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
case 100:

Christophe Geuzaine
committed
#line 1150 "Gmsh.y"
yymsg(0, "Curve %d already exists", num);
}
else{
Curve *c = Create_Curve(num, MSH_SEGM_PARAMETRIC, 2, NULL, NULL,
-1, -1, (yyvsp[(7) - (17)].d), (yyvsp[(9) - (17)].d));
strcpy(c->functu, (yyvsp[(11) - (17)].c));
strcpy(c->functv, (yyvsp[(13) - (17)].c));
strcpy(c->functw, (yyvsp[(15) - (17)].c));
Free((yyvsp[(11) - (17)].c)); Free((yyvsp[(13) - (17)].c)); Free((yyvsp[(15) - (17)].c));
(yyval.s).Type = MSH_SEGM_PARAMETRIC;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
case 101:

Christophe Geuzaine
committed
#line 1169 "Gmsh.y"
yymsg(0, "Curve %d already exists", num);
Curve *c = Create_Curve(num, MSH_SEGM_BSPLN, 2, temp, NULL,
-1, -1, 0., 1.);
List_Delete((yyvsp[(6) - (7)].l));
(yyval.s).Type = MSH_SEGM_BSPLN;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
case 102:

Christophe Geuzaine
committed
#line 1187 "Gmsh.y"
yymsg(0, "Curve %d already exists", num);
Curve *c = Create_Curve(num, MSH_SEGM_BEZIER, 2, temp, NULL,
-1, -1, 0., 1.);
List_Delete((yyvsp[(6) - (7)].l));
(yyval.s).Type = MSH_SEGM_BEZIER;
(yyval.s).Num = num;
;}
break;

Christophe Geuzaine
committed
case 103:

Christophe Geuzaine
committed
#line 1205 "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: "
(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);
yymsg(0, "Curve %d already exists", num);
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),
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
case 104:

Christophe Geuzaine
committed
#line 1231 "Gmsh.y"
yymsg(0, "Line loop %d already exists", num);
sortEdgesInLoop(num, temp);
EdgeLoop *l = Create_EdgeLoop(num, temp);
List_Delete((yyvsp[(7) - (8)].l));
(yyval.s).Type = MSH_SEGM_LOOP;
(yyval.s).Num = num;
;}
break;