"README.txt" did not exist on "904dd4f99b62eab4b0387db7d4f687e45e34f161"
Newer
Older
yymsg(0, "Unknown element type '%s'", (yyvsp[(1) - (1)].c));

Christophe Geuzaine
committed
#endif

Christophe Geuzaine
committed
#line 457 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
#endif

Christophe Geuzaine
committed
#line 467 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
#endif

Christophe Geuzaine
committed
#line 476 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c))+1; i++) List_Add(ViewData->T2C, &(yyvsp[(1) - (1)].c)[i]);

Christophe Geuzaine
committed
#endif
Free((yyvsp[(1) - (1)].c));
;}
break;
case 43:

Christophe Geuzaine
committed
#line 483 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c))+1; i++) List_Add(ViewData->T2C, &(yyvsp[(3) - (3)].c)[i]);

Christophe Geuzaine
committed
#endif
Free((yyvsp[(3) - (3)].c));
;}
break;
case 44:

Christophe Geuzaine
committed
#line 493 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
List_Add(ViewData->T2D, &(yyvsp[(3) - (8)].d));
List_Add(ViewData->T2D, &(yyvsp[(5) - (8)].d));
List_Add(ViewData->T2D, &(yyvsp[(7) - (8)].d));
double d = List_Nbr(ViewData->T2C);
List_Add(ViewData->T2D, &d);

Christophe Geuzaine
committed
#endif

Christophe Geuzaine
committed
#line 503 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
#endif

Christophe Geuzaine
committed
#line 512 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c))+1; i++) List_Add(ViewData->T3C, &(yyvsp[(1) - (1)].c)[i]);

Christophe Geuzaine
committed
#endif
Free((yyvsp[(1) - (1)].c));
;}
break;
case 47:

Christophe Geuzaine
committed
#line 519 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c))+1; i++) List_Add(ViewData->T3C, &(yyvsp[(3) - (3)].c)[i]);

Christophe Geuzaine
committed
#endif
Free((yyvsp[(3) - (3)].c));
;}
break;
case 48:

Christophe Geuzaine
committed
#line 529 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)
List_Add(ViewData->T3D, &(yyvsp[(3) - (10)].d)); List_Add(ViewData->T3D, &(yyvsp[(5) - (10)].d));
List_Add(ViewData->T3D, &(yyvsp[(7) - (10)].d)); List_Add(ViewData->T3D, &(yyvsp[(9) - (10)].d));
double d = List_Nbr(ViewData->T3C);
List_Add(ViewData->T3D, &d);

Christophe Geuzaine
committed
#endif

Christophe Geuzaine
committed
#line 538 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
#endif

Christophe Geuzaine
committed
#line 548 "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 566 "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 585 "Gmsh.y"

Christophe Geuzaine
committed
#if !defined(HAVE_NO_POST)

Christophe Geuzaine
committed
#endif

Christophe Geuzaine
committed
#line 591 "Gmsh.y"

Christophe Geuzaine
committed
#line 598 "Gmsh.y"

Christophe Geuzaine
committed
#line 599 "Gmsh.y"

Christophe Geuzaine
committed
#line 600 "Gmsh.y"

Christophe Geuzaine
committed
#line 601 "Gmsh.y"

Christophe Geuzaine
committed
#line 602 "Gmsh.y"

Christophe Geuzaine
committed
#line 606 "Gmsh.y"

Christophe Geuzaine
committed
#line 607 "Gmsh.y"

Christophe Geuzaine
committed
#line 615 "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 637 "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 664 "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 704 "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 714 "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 722 "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 730 "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 742 "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 751 "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 757 "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 766 "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 784 "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 802 "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 811 "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 823 "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 828 "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 836 "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 856 "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 879 "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 886 "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 892 "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 912 "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 933 "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 959 "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 971 "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 988 "Gmsh.y"
{
(yyval.i) = (int)(yyvsp[(1) - (1)].d);
;}
break;

Christophe Geuzaine
committed
#line 992 "Gmsh.y"

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

Christophe Geuzaine
committed
#line 1002 "Gmsh.y"

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

Christophe Geuzaine
committed
#line 1006 "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 1018 "Gmsh.y"
{
for(int i = 0; i < 4; i++) (yyval.v)[i] = 0.;
;}
break;
case 91:

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

Christophe Geuzaine
committed
#line 1032 "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 1055 "Gmsh.y"
{
curPhysDim = 0;
;}
break;
case 94:
#line 1059 "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:
#line 1075 "Gmsh.y"
(yyval.s).Type = 0;
(yyval.s).Num = 0;
;}
break;

Christophe Geuzaine
committed
case 96:
#line 1097 "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:
#line 1115 "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:
#line 1133 "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:
#line 1163 "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:
#line 1194 "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:
#line 1213 "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:
#line 1231 "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:
#line 1249 "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: "