Skip to content
Snippets Groups Projects
Gmsh.tab.cpp 154 KiB
Newer Older
case 157:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 959 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      TranslateShapes (yyvsp[-3].v[0],yyvsp[-3].v[1],yyvsp[-3].v[2],yyvsp[-1].l,1);
case 158:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 964 "Gmsh.y"
{
      RotateShapes(yyvsp[-8].v[0],yyvsp[-8].v[1],yyvsp[-8].v[2],yyvsp[-6].v[0],yyvsp[-6].v[1],yyvsp[-6].v[2],yyvsp[-4].d,yyvsp[-1].l);
      yyval.l = yyvsp[-1].l;
    ;
    break;}
case 159:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 969 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      SymmetryShapes(yyvsp[-3].v[0],yyvsp[-3].v[1],yyvsp[-3].v[2],yyvsp[-3].v[3],yyvsp[-1].l,1);
case 160:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 974 "Gmsh.y"
{
      DilatShapes(yyvsp[-6].v[0],yyvsp[-6].v[1],yyvsp[-6].v[2],yyvsp[-4].d,yyvsp[-1].l,1);
      yyval.l = yyvsp[-1].l;
    ;
    break;}
case 161:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 981 "Gmsh.y"
case 162:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 982 "Gmsh.y"
case 163:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 983 "Gmsh.y"
case 164:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 988 "Gmsh.y"
{
      yyval.l = List_Create(3,3,sizeof(Shape));
    ;
    break;}
case 165:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 992 "Gmsh.y"
{
      List_Add(yyval.l,&yyvsp[0].s);
      yyval.l = yyvsp[-1].l;
    ;
    break;}
case 166:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1004 "Gmsh.y"
{
      yyval.l = List_Create(3,3,sizeof(Shape));
      for(i=0;i<List_Nbr(yyvsp[-1].l);i++){
	List_Read (yyvsp[-1].l,i,&TheShape);
	CopyShape(TheShape.Type,TheShape.Num,&j);
	TheShape.Num = j;
	List_Add(yyval.l,&TheShape);
      }
    ;
    break;}
case 167:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1022 "Gmsh.y"
{
      for(i=0;i<List_Nbr(yyvsp[-1].l);i++){
	List_Read (yyvsp[-1].l,i,&TheShape);
	DeleteShape(TheShape.Type,TheShape.Num);
      }
    ;
    break;}
case 168:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1037 "Gmsh.y"
{
      yyinTab[RecursionLevel++] = yyin;
      strcpy(tmpstring, ThePathForIncludes);
      if((yyin = fopen(strcat(tmpstring,yyvsp[-1].c),"r"))){
	strcpy(yynameTab[RecursionLevel-1],yyname);
	yylinenoTab[RecursionLevel-1]=yylineno;
	yylineno=1;
	strcpy(yyname,yyvsp[-1].c);
	while(!feof(yyin)){
	  yyparse();
	}
	fclose(yyin);
	yyin = yyinTab[--RecursionLevel];
	strcpy(yyname,yynameTab[RecursionLevel]);
	yylineno = yylinenoTab[RecursionLevel];
      }
      else{
	vyyerror("Unknown File '%s'", yyvsp[-1].c) ;  
case 169:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1068 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Curve *pc, *prc;
      Extrude_ProtudePoint(1,(int)yyvsp[-4].d,yyvsp[-2].v[0],yyvsp[-2].v[1],yyvsp[-2].v[2],0.,0.,0.,0.,&pc,&prc,NULL);
case 170:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1073 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Curve *pc, *prc;
      Extrude_ProtudePoint(0,(int)yyvsp[-8].d,yyvsp[-6].v[0],yyvsp[-6].v[1],yyvsp[-6].v[2],yyvsp[-4].v[0],yyvsp[-4].v[1],yyvsp[-4].v[2],yyvsp[-2].d,
			   &pc,&prc,NULL);
case 171:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1079 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Extrude_ProtudeCurve(1,(int)yyvsp[-4].d,yyvsp[-2].v[0],yyvsp[-2].v[1],yyvsp[-2].v[2],0.,0.,0.,0.,NULL);
case 172:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1083 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Extrude_ProtudeCurve(0,(int)yyvsp[-8].d,yyvsp[-6].v[0],yyvsp[-6].v[1],yyvsp[-6].v[2],yyvsp[-4].v[0],yyvsp[-4].v[1],yyvsp[-4].v[2],yyvsp[-2].d,NULL);
case 173:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1087 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Extrude_ProtudeSurface(1,(int)yyvsp[-4].d,yyvsp[-2].v[0],yyvsp[-2].v[1],yyvsp[-2].v[2],0.,0.,0.,0.,0,NULL);
case 174:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1091 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      Extrude_ProtudeSurface(0,(int)yyvsp[-8].d,yyvsp[-6].v[0],yyvsp[-6].v[1],yyvsp[-6].v[2],yyvsp[-4].v[0],yyvsp[-4].v[1],yyvsp[-4].v[2],yyvsp[-2].d,0,NULL);
case 175:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1095 "Gmsh.y"
{
    int vol = NEWREG();
    Extrude_ProtudeSurface(1,(int)yyvsp[-7].d,yyvsp[-5].v[0],yyvsp[-5].v[1],yyvsp[-5].v[2],0.,0.,0.,0.,vol,&extr);
  ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 176:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1100 "Gmsh.y"
{
    int vol = NEWREG();
    Extrude_ProtudeSurface(0,(int)yyvsp[-11].d,yyvsp[-9].v[0],yyvsp[-9].v[1],yyvsp[-9].v[2],yyvsp[-7].v[0],yyvsp[-7].v[1],yyvsp[-7].v[2],yyvsp[-5].d,vol,&extr);
  ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 177:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1108 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 178:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1111 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 179:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1117 "Gmsh.y"
{
      double d;
      int j;
      extr.mesh.NbLayer = List_Nbr(yyvsp[-6].l);
      extr.mesh.ExtrudeMesh = true;
      for(int i=0;i<List_Nbr(yyvsp[-6].l);i++){
	List_Read(yyvsp[-6].l,i,&d);
	j = (int)d;
	extr.mesh.NbElmLayer[i] = j;
	List_Read(yyvsp[-4].l,i,&d);
	j = (int)d;
	extr.mesh.ZonLayer[i] = j;
	List_Read(yyvsp[-2].l,i,&d);
	extr.mesh.hLayer[i] = d;
      }
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 180:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1134 "Gmsh.y"
{
      extr.mesh.Recombine = true;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 181:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1145 "Gmsh.y"
{
      Curve *c;
      for(i=0;i<List_Nbr(yyvsp[-3].l);i++){
	List_Read(yyvsp[-3].l,i,&d);
	j = (int)fabs(d);
        c = FindCurve(j,THEM);
	if(!c)
	  vyyerror("Unkown Curve %d", j);
	else{
	  c->Method = TRANSFINI;
	  c->ipar[0] = (int)yyvsp[-1].d;
	  c->ipar[1] = sign(d);
	  c->dpar[0] = 1.0;
	}
      }
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 182:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1162 "Gmsh.y"
{
      Curve *c;
      for(i=0;i<List_Nbr(yyvsp[-6].l);i++){
	List_Read(yyvsp[-6].l,i,&d);
	j = (int)fabs(d);
        c = FindCurve(j,THEM);
	if(!c)
	  vyyerror("Unkown Curve %d", j);
	else{
	  c->Method = TRANSFINI;
	  c->ipar[0] = (int)yyvsp[-4].d;
	  c->ipar[1] = sign(d); /* Progresion : code 1 ou -1 */
	  c->dpar[0] = fabs(yyvsp[-1].d);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 183:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1179 "Gmsh.y"
{
      Curve *c;
      for(i=0;i<List_Nbr(yyvsp[-6].l);i++){
	List_Read(yyvsp[-6].l,i,&d);
	j = (int)fabs(d);
        c = FindCurve(j,THEM);
	if(!c)
	  vyyerror("Unkown Curve %d", j);
	else{
	  c->Method = TRANSFINI;
	  c->ipar[0] = (int)yyvsp[-4].d;
	  c->ipar[1] = 2*sign(d); /* Bump : code 2 ou -2 */
	  c->dpar[0] = fabs(yyvsp[-1].d);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 184:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1196 "Gmsh.y"
{
      Surface *s = FindSurface((int)yyvsp[-4].d,THEM);
      if(!s)
	vyyerror("Unkown Surface %d", (int)yyvsp[-4].d);
      else{
	s->Method = TRANSFINI;
	k = List_Nbr(yyvsp[-1].l);
	if(k!=3 && k!=4){
	  vyyerror("Wrong Definition of Transfinite Surface %d: "
		   "%d Points Instead of 3 or 4" , yyvsp[-4].d, k) ;
	}
	else{
	  for(i=0;i<k;i++){
	    List_Read(yyvsp[-1].l,i,&d);
	    j = (int)fabs(d);
	    s->ipar[i] = j;
	  }
	}
      }
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 185:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1217 "Gmsh.y"
{
      Surface *s = FindSurface((int)yyvsp[-4].d,THEM);
      if(!s)
	vyyerror("Unkown Surface %d", (int)yyvsp[-4].d);
      else{
        s->Method = ELLIPTIC;
        k = List_Nbr(yyvsp[-1].l);
        if(k != 4)
	  vyyerror("Wrong Definition of Elliptic Surface %d: "
		   "%d Points Instead of 4" , yyvsp[-4].d, k) ;
        else{
	  for(i=0;i<k;i++){
	    List_Read(yyvsp[-1].l,i,&d);
	    j = (int)fabs(d);
	    s->ipar[i] = j;
	  }
	}
      }
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 186:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1237 "Gmsh.y"
{
      Volume *v = FindVolume((int)yyvsp[-4].d,THEM);
      if(!v)
	vyyerror("Unkown Volume %d", (int)yyvsp[-4].d);
      else{
	v->Method = TRANSFINI;
	k = List_Nbr(yyvsp[-1].l);
	if(k!=6 && k!=8)
	  vyyerror("Wrong Definition of Transfinite Volume %d: "
		   "%d Points Instead of 6 or 8" , yyvsp[-4].d, k) ;
	else{
	  for(i=0;i<k;i++){
	    List_Read(yyvsp[-1].l,i,&d);
	    j = (int)fabs(d);
	    v->ipar[i] = j;
	  }
	}
      }
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 187:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1257 "Gmsh.y"
{
      Surface *s;
      for(i=0;i<List_Nbr(yyvsp[-3].l);i++){
	List_Read(yyvsp[-3].l,i,&d);
	j = (int)d;
	s = FindSurface(j,THEM);
	if(!s){
	  /* Allow generic lists, even if the surfaces don't exist
	     vyyerror("Unkown Surface %d", j); */
	}
	else{
	  s->Recombine = 1;
	  s->RecombineAngle = yyvsp[-1].d;
	}
      }
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 188:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1274 "Gmsh.y"
{
      Surface *s;
      for(i=0;i<List_Nbr(yyvsp[-1].l);i++){
	List_Read(yyvsp[-1].l,i,&d);
	j = (int)d;
        s = FindSurface(j,THEM);
	if(!s){
	  /* Allow generic lists, even if the surfaces don't exist
	     vyyerror("Unkown Surface %d", j); */
	}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 189:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1299 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 199:
#line 1328 "Gmsh.y"
{ 
      if(!Set_StringOption(yyvsp[-3].c, GeneralOptions_String, yyvsp[-1].c))
	vyyerror("Unknown General Option (String) '%s'", yyvsp[-3].c);
David Colignon's avatar
David Colignon committed
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 200:
#line 1333 "Gmsh.y"
{ 
      if(!Set_NumberOption(yyvsp[-3].c, GeneralOptions_Number, yyvsp[-1].d))
	vyyerror("Unknown General Option (Number) '%s'", yyvsp[-3].c);
    ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 201:
#line 1338 "Gmsh.y"
{ if(!Set_ArrayOption(yyvsp[-3].c, GeneralOptions_Array, yyvsp[-1].v)) 
	vyyerror("Unknown General Option (Array) '%s'", yyvsp[-3].c);
    ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 202:
David Colignon's avatar
David Colignon committed
#line 1342 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
{ ColorField = GeneralOptions_Color; ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 206:
David Colignon's avatar
David Colignon committed
#line 1353 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
{ 
      if(!Set_StringOption(yyvsp[-3].c, GeometryOptions_String, yyvsp[-1].c))
	vyyerror("Unknown Geometry Option (String) '%s'", yyvsp[-3].c);
    ;
    break;}
case 207:
#line 1358 "Gmsh.y"
{ 
      if(!Set_NumberOption(yyvsp[-3].c, GeometryOptions_Number, yyvsp[-1].d))
	vyyerror("Unknown Geometry Option (Number) '%s'", yyvsp[-3].c);
    ;
    break;}
case 208:
#line 1363 "Gmsh.y"
{
      if(!Set_ArrayOption(yyvsp[-3].c, GeometryOptions_Array, yyvsp[-1].v))
	vyyerror("Unknown Geometry Option (Array) '%s'", yyvsp[-3].c);
    ;
    break;}
case 209:
#line 1368 "Gmsh.y"
{ ColorField = GeometryOptions_Color; ;
    break;}
case 213:
#line 1379 "Gmsh.y"
{ 
      if(!Set_StringOption(yyvsp[-3].c, MeshOptions_String, yyvsp[-1].c))
	vyyerror("Unknown Mesh Option (String) '%s'", yyvsp[-3].c);
    ;
    break;}
case 214:
#line 1384 "Gmsh.y"
{
      if(!Set_NumberOption(yyvsp[-3].c, MeshOptions_Number, yyvsp[-1].d))
	vyyerror("Unknown Mesh Option (Number) '%s'", yyvsp[-3].c);
    ;
    break;}
case 215:
#line 1389 "Gmsh.y"
{
      if(!Set_ArrayOption(yyvsp[-3].c, MeshOptions_Array, yyvsp[-1].v))
	vyyerror("Unknown Mesh Option (Array) '%s'", yyvsp[-3].c);
    ;
    break;}
case 216:
#line 1394 "Gmsh.y"
{ ColorField = MeshOptions_Color; ;
    break;}
case 220:
#line 1405 "Gmsh.y"
{ 
      if(!Set_StringOption(yyvsp[-3].c, PostProcessingOptions_String, yyvsp[-1].c))
	vyyerror("Unknown PostProcessing Option (String) '%s'", yyvsp[-3].c);
    ;
    break;}
case 221:
#line 1410 "Gmsh.y"
{ 
      if(!Set_NumberOption(yyvsp[-3].c, PostProcessingOptions_Number, yyvsp[-1].d)) 
	vyyerror("Unknown PostProcessing Option (Number) '%s'", yyvsp[-3].c);
    ;
    break;}
case 222:
#line 1415 "Gmsh.y"
{ 
      if(!Set_ArrayOption(yyvsp[-3].c, PostProcessingOptions_Array, yyvsp[-1].v))
	vyyerror("Unknown PostProcessing (Array) Option '%s'", yyvsp[-3].c);
    ;
    break;}
case 223:
#line 1420 "Gmsh.y"
{ ColorField = PostProcessingOptions_Color; ;
    break;}
case 227:
#line 1431 "Gmsh.y"
{
      if(!Set_StringOption(yyvsp[-3].c, PrintOptions_String, yyvsp[-1].c))
	vyyerror("Unknown Print Option (String) '%s'", yyvsp[-3].c);
    ;
    break;}
case 228:
#line 1436 "Gmsh.y"
{
      if(!Set_NumberOption(yyvsp[-3].c, PrintOptions_Number, yyvsp[-1].d)) 
	vyyerror("Unknown Print Option (Number) '%s'", yyvsp[-3].c);
    ;
    break;}
case 229:
#line 1441 "Gmsh.y"
{
      if(!Set_ArrayOption(yyvsp[-3].c, PrintOptions_Array, yyvsp[-1].v))
	vyyerror("Unknown Print Option (Array) '%s'", yyvsp[-3].c);
    ;
    break;}
case 230:
#line 1446 "Gmsh.y"
{ ColorField = PrintOptions_Color; ;
    break;}
case 234:
#line 1457 "Gmsh.y"
{
      i = Get_ColorForString(ColorString, -1, yyvsp[-1].c, &flag);
      if(flag) vyyerror("Unknown Color '%s'", yyvsp[-1].c);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      if(!Set_ColorOption(yyvsp[-3].c, ColorField, i))
	vyyerror("Unknown Color Field '%s'", yyvsp[-3].c);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 235:
#line 1464 "Gmsh.y"
{
      i = Get_ColorForString(ColorString, (int)yyvsp[-2].d, yyvsp[-4].c, &flag);
      if(flag) vyyerror("Unknown Color '%s'", yyvsp[-4].c);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      if(!Set_ColorOption(yyvsp[-7].c, ColorField, i))
	 vyyerror("Unknown Color Field '%s'", yyvsp[-7].c);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 236:
#line 1471 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      if(!Set_ColorOption(yyvsp[-3].c, ColorField,
			  PACK_COLOR((int)yyvsp[-1].v[0], (int)yyvsp[-1].v[1], (int)yyvsp[-1].v[2], (int)yyvsp[-1].v[3])))
	vyyerror("Unknown Color Field '%s'", yyvsp[-3].c);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 237:
#line 1480 "Gmsh.y"
{
      yyval.v[0]=yyvsp[-7].d;
      yyval.v[1]=yyvsp[-5].d;
      yyval.v[2]=yyvsp[-3].d;
      yyval.v[3]=yyvsp[-1].d;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 238:
#line 1487 "Gmsh.y"
{
      yyval.v[0]=yyvsp[-5].d;
      yyval.v[1]=yyvsp[-3].d;
      yyval.v[2]=yyvsp[-1].d;
      yyval.v[3]=255.;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 239:
#line 1501 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{yyval.i = 1;;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 240:
#line 1502 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{yyval.i = 0;;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 241:
#line 1503 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 242:
#line 1504 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 243:
#line 1505 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{yyval.i = -1;;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 244:
#line 1509 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = yyvsp[0].d; ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 245:
#line 1510 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = yyvsp[-1].d; ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 246:
#line 1511 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = yyvsp[-2].d - yyvsp[0].d; ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 247:
#line 1512 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = yyvsp[-2].d + yyvsp[0].d; ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 248:
#line 1513 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = yyvsp[-2].d * yyvsp[0].d; ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 249:
#line 1514 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = yyvsp[-2].d / yyvsp[0].d; ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 250:
#line 1515 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = pow(yyvsp[-2].d, yyvsp[0].d); ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 251:
#line 1516 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = - yyvsp[0].d; ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 252:
#line 1517 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = yyvsp[0].d; ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 253:
#line 1518 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = exp(yyvsp[-1].d);      ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 254:
#line 1519 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = log(yyvsp[-1].d);      ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 255:
#line 1520 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = log10(yyvsp[-1].d);    ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 256:
#line 1521 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = sqrt(yyvsp[-1].d);     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 257:
#line 1522 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = sin(yyvsp[-1].d);      ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 258:
#line 1523 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = asin(yyvsp[-1].d);     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 259:
#line 1524 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = cos(yyvsp[-1].d);      ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 260:
#line 1525 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = acos(yyvsp[-1].d);     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 261:
#line 1526 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = tan(yyvsp[-1].d);      ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 262:
#line 1527 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = atan(yyvsp[-1].d);     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 263:
#line 1528 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = atan2(yyvsp[-3].d,yyvsp[-1].d); ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 264:
#line 1529 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = sinh(yyvsp[-1].d);     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 265:
#line 1530 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = cosh(yyvsp[-1].d);     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 266:
#line 1531 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = tanh(yyvsp[-1].d);     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 267:
#line 1532 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = fabs(yyvsp[-1].d);     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 268:
#line 1533 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = floor(yyvsp[-1].d);    ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 269:
#line 1534 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = ceil(yyvsp[-1].d);     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 270:
#line 1535 "Gmsh.y"
{ yyval.d = fmod(yyvsp[-3].d,yyvsp[-1].d);  ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 271:
#line 1536 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = fmod(yyvsp[-3].d,yyvsp[-1].d);  ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 272:
#line 1537 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = sqrt(yyvsp[-3].d*yyvsp[-3].d+yyvsp[-1].d*yyvsp[-1].d);  ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 273:
#line 1541 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = yyvsp[0].d; ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 274:
#line 1542 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{ yyval.d = 3.141592653589793; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 275:
#line 1544 "Gmsh.y"
{
      TheSymbol.Name = yyvsp[0].c ;
      if (!List_Query(Symbol_L, &TheSymbol, CompareSymbols)) {
	vyyerror("Unknown variable '%s'", yyvsp[0].c) ;  yyval.d = 0. ;
      }
      else  yyval.d = TheSymbol.val ;
      Free(yyvsp[0].c);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 276:
#line 1556 "Gmsh.y"
{ 
      ListOfDouble2_L = List_Create(2,1,sizeof(double)) ; 
      for(d=yyvsp[-2].d ; (yyvsp[-2].d<yyvsp[0].d)?(d<=yyvsp[0].d):(d>=yyvsp[0].d) ; (yyvsp[-2].d<yyvsp[0].d)?(d+=1.):(d-=1.)) 
	List_Add(ListOfDouble2_L, &d) ;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 277:
#line 1562 "Gmsh.y"
{
      ListOfDouble2_L = List_Create(2,1,sizeof(double)) ; 
      if(!yyvsp[-2].d || (yyvsp[-5].d<yyvsp[0].d && yyvsp[-2].d<0) || (yyvsp[-5].d>yyvsp[0].d && yyvsp[-2].d>0)){
        vyyerror("Wrong Increment in '%g :[%g] %g'", yyvsp[-5].d, yyvsp[-2].d, yyvsp[0].d) ;
	List_Add(ListOfDouble2_L, &(yyvsp[-5].d)) ;
      }
      else 
	for(d=yyvsp[-5].d ; (yyvsp[-2].d>0)?(d<=yyvsp[0].d):(d>=yyvsp[0].d) ; d+=yyvsp[-2].d)
	  List_Add(ListOfDouble2_L, &d) ;
   ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 278:
#line 1576 "Gmsh.y"
{
      yyval.v[0]=yyvsp[-9].d;
      yyval.v[1]=yyvsp[-7].d;
      yyval.v[2]=yyvsp[-5].d;
      yyval.v[3]=yyvsp[-3].d;
      yyval.v[4]=yyvsp[-1].d;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 279:
#line 1584 "Gmsh.y"
{
      yyval.v[0]=yyvsp[-7].d;
      yyval.v[1]=yyvsp[-5].d;
      yyval.v[2]=yyvsp[-3].d;
      yyval.v[3]=yyvsp[-1].d;
      yyval.v[4]=1.0;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 280:
#line 1592 "Gmsh.y"
{
      yyval.v[0]=yyvsp[-5].d;
      yyval.v[1]=yyvsp[-3].d;
      yyval.v[2]=yyvsp[-1].d;
      yyval.v[3]=0.0;
      yyval.v[4]=1.0;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 281:
#line 1600 "Gmsh.y"
{
      yyval.v[0]=yyvsp[-5].d;
      yyval.v[1]=yyvsp[-3].d;
      yyval.v[2]=yyvsp[-1].d;
      yyval.v[3]=0.0;
      yyval.v[4]=1.0;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 282:
#line 1611 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 283:
#line 1614 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 284:
#line 1620 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 285:
#line 1623 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 286:
#line 1629 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 287:
#line 1632 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 288:
#line 1636 "Gmsh.y"
David Colignon's avatar
David Colignon committed
       yyval.l=ListOfListOfDouble_L;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 289:
#line 1643 "Gmsh.y"
David Colignon's avatar
David Colignon committed
      ListOfListOfDouble_L = List_Create(2,1,sizeof(List_T*)) ;
      List_Add(ListOfListOfDouble_L, &(yyvsp[0].l)) ;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 290:
#line 1648 "Gmsh.y"
David Colignon's avatar
David Colignon committed
      List_Add(ListOfListOfDouble_L, &(yyvsp[0].l)) ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 291:
#line 1655 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 292:
#line 1658 "Gmsh.y"
{
      ListOfDouble_L = List_Create(2,1,sizeof(double)) ;
      List_Add(ListOfDouble_L, &(yyvsp[0].d)) ;
      yyval.l=ListOfDouble_L;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 293:
#line 1664 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 294:
#line 1678 "Gmsh.y"
{
      ListOfDouble_L = List_Create(2,1,sizeof(double)) ;
      List_Add(ListOfDouble_L, &(yyvsp[0].d)) ;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 295:
#line 1683 "Gmsh.y"
{ 
      ListOfDouble_L = List_Create(2,1,sizeof(double)) ;
      for(i=0 ; i<List_Nbr(ListOfDouble2_L) ; i++){
	List_Read(ListOfDouble2_L, i, &d) ;
	List_Add(ListOfDouble_L, &d) ;
      }
      List_Delete(ListOfDouble2_L);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 296:
#line 1692 "Gmsh.y"
{
      List_Add(ListOfDouble_L, &(yyvsp[0].d)) ;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 297:
#line 1696 "Gmsh.y"
{
      for(i=0 ; i<List_Nbr(ListOfDouble2_L) ; i++){
	List_Read(ListOfDouble2_L, i, &d) ;
	List_Add(ListOfDouble_L, &d) ;
      }
      List_Delete(ListOfDouble2_L);
    ;
    break;}
}
   /* the action file gets copied in in place of this dollarsign */
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 498 "/usr/local/share/bison.simple"

  yyvsp -= yylen;
  yyssp -= yylen;
#ifdef YYLSP_NEEDED
  yylsp -= yylen;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

  *++yyvsp = yyval;

#ifdef YYLSP_NEEDED
  yylsp++;
  if (yylen == 0)
    {
      yylsp->first_line = yylloc.first_line;
      yylsp->first_column = yylloc.first_column;
      yylsp->last_line = (yylsp-1)->last_line;
      yylsp->last_column = (yylsp-1)->last_column;
      yylsp->text = 0;
    }
  else
    {
      yylsp->last_line = (yylsp+yylen-1)->last_line;
      yylsp->last_column = (yylsp+yylen-1)->last_column;
    }
#endif

  /* Now "shift" the result of the reduction.
     Determine what state that goes to,
     based on the state we popped back to
     and the rule number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTBASE];

  goto yynewstate;

yyerrlab:   /* here on detecting error */

  if (! yyerrstatus)
    /* If not already recovering from an error, report this error.  */
    {
      ++yynerrs;

#ifdef YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (yyn > YYFLAG && yyn < YYLAST)
	{
	  int size = 0;
	  char *msg;
	  int x, count;

	  count = 0;
	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
	  for (x = (yyn < 0 ? -yyn : 0);
	       x < (sizeof(yytname) / sizeof(char *)); x++)
	    if (yycheck[x + yyn] == x)
	      size += strlen(yytname[x]) + 15, count++;
	  msg = (char *) malloc(size + 15);
	  if (msg != 0)
	    {
	      strcpy(msg, "parse error");

	      if (count < 5)
		{
		  count = 0;
		  for (x = (yyn < 0 ? -yyn : 0);
		       x < (sizeof(yytname) / sizeof(char *)); x++)
		    if (yycheck[x + yyn] == x)
		      {
			strcat(msg, count == 0 ? ", expecting `" : " or `");
			strcat(msg, yytname[x]);
			strcat(msg, "'");
			count++;
		      }
		}
	      yyerror(msg);
	      free(msg);
	    }
	  else
	    yyerror ("parse error; also virtual memory exceeded");
	}
      else
#endif /* YYERROR_VERBOSE */
	yyerror("parse error");
    }

  goto yyerrlab1;
yyerrlab1:   /* here on error raised explicitly by an action */

  if (yyerrstatus == 3)
    {
      /* if just tried and failed to reuse lookahead token after an error, discard it.  */

      /* return failure if at end of input */
      if (yychar == YYEOF)
	YYABORT;

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif

      yychar = YYEMPTY;
    }

  /* Else will try to reuse lookahead token
     after shifting the error token.  */

  yyerrstatus = 3;		/* Each real token shifted decrements this */

  goto yyerrhandle;

yyerrdefault:  /* current state does not do anything special for the error token. */

#if 0
  /* This is wrong; only states that explicitly want error tokens
     should shift them.  */
  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
  if (yyn) goto yydefault;
#endif

yyerrpop:   /* pop the current state because it cannot handle the error token */

  if (yyssp == yyss) YYABORT;
  yyvsp--;
  yystate = *--yyssp;
#ifdef YYLSP_NEEDED
  yylsp--;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "Error: state stack now");
      while (ssp1 != yyssp)