Skip to content
Snippets Groups Projects
Gmsh.tab.cpp 251 KiB
Newer Older
	j = (int)d;
	extr.mesh.ZonLayer[i] = j;
	List_Read(yyvsp[-2].l,i,&d);
	extr.mesh.hLayer[i] = d;
case 224:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1879 "Gmsh.y"
      extr.mesh.Recombine = true;
case 225:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1890 "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);
	  c->Method = TRANSFINI;
	  c->ipar[0] = (int)yyvsp[-1].d;
	  c->ipar[1] = sign(d);
	  c->dpar[0] = 1.0;
case 226:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1907 "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);
	  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);
case 227:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1924 "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);
	  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);
case 228:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1941 "Gmsh.y"
      Surface *s = FindSurface((int)yyvsp[-4].d,THEM);
      if(!s)
	vyyerror("Unkown Surface %d", (int)yyvsp[-4].d);
	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) ;
	}
	  for(i=0;i<k;i++){
	    List_Read(yyvsp[-1].l,i,&d);
	    j = (int)fabs(d);
	    s->ipar[i] = j;
case 229:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1962 "Gmsh.y"
      Surface *s = FindSurface((int)yyvsp[-4].d,THEM);
      if(!s)
	vyyerror("Unkown Surface %d", (int)yyvsp[-4].d);
        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;
case 230:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 1982 "Gmsh.y"
      Volume *v = FindVolume((int)yyvsp[-4].d,THEM);
      if(!v)
	vyyerror("Unkown Volume %d", (int)yyvsp[-4].d);
	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) ;
	  for(i=0;i<k;i++){
	    List_Read(yyvsp[-1].l,i,&d);
	    j = (int)fabs(d);
	    v->ipar[i] = j;
case 231:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2002 "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;
case 232:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2019 "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); */
	else{
	  s->Recombine = 1;
	  s->RecombineAngle = 30.;
        }
case 233:
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2044 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2056 "Gmsh.y"
{yyval.i = 1;;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2057 "Gmsh.y"
{yyval.i = 0;;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2058 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2059 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{yyval.i = -1;;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2060 "Gmsh.y"
{yyval.i = -1;;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2064 "Gmsh.y"
{ yyval.d = yyvsp[0].d;           ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2065 "Gmsh.y"
{ yyval.d = yyvsp[-1].d ;          ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2066 "Gmsh.y"
{ yyval.d = -yyvsp[0].d ;         ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2067 "Gmsh.y"
{ yyval.d = yyvsp[0].d;           ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2068 "Gmsh.y"
{ yyval.d = !yyvsp[0].d ;         ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2069 "Gmsh.y"
{ yyval.d = yyvsp[-2].d - yyvsp[0].d ;     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2070 "Gmsh.y"
{ yyval.d = yyvsp[-2].d + yyvsp[0].d ;     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2071 "Gmsh.y"
{ yyval.d = yyvsp[-2].d * yyvsp[0].d ;     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2072 "Gmsh.y"
{ yyval.d = yyvsp[-2].d / yyvsp[0].d ;     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2073 "Gmsh.y"
{ yyval.d = (int)yyvsp[-2].d % (int)yyvsp[0].d ;  ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2074 "Gmsh.y"
{ yyval.d = pow(yyvsp[-2].d,yyvsp[0].d) ;  ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2075 "Gmsh.y"
{ yyval.d = yyvsp[-2].d < yyvsp[0].d ;     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2076 "Gmsh.y"
{ yyval.d = yyvsp[-2].d > yyvsp[0].d ;     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2077 "Gmsh.y"
{ yyval.d = yyvsp[-2].d <= yyvsp[0].d ;    ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2078 "Gmsh.y"
{ yyval.d = yyvsp[-2].d >= yyvsp[0].d ;    ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2079 "Gmsh.y"
{ yyval.d = yyvsp[-2].d == yyvsp[0].d ;    ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2080 "Gmsh.y"
{ yyval.d = yyvsp[-2].d != yyvsp[0].d ;    ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2081 "Gmsh.y"
{ yyval.d = yyvsp[-2].d && yyvsp[0].d ;    ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2082 "Gmsh.y"
{ yyval.d = yyvsp[-2].d || yyvsp[0].d ;    ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2083 "Gmsh.y"
{ yyval.d = yyvsp[-4].d? yyvsp[-2].d : yyvsp[0].d ; ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2084 "Gmsh.y"
{ yyval.d = exp(yyvsp[-1].d);      ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2085 "Gmsh.y"
{ yyval.d = log(yyvsp[-1].d);      ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2086 "Gmsh.y"
{ yyval.d = log10(yyvsp[-1].d);    ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2087 "Gmsh.y"
{ yyval.d = sqrt(yyvsp[-1].d);     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2088 "Gmsh.y"
{ yyval.d = sin(yyvsp[-1].d);      ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2089 "Gmsh.y"
{ yyval.d = asin(yyvsp[-1].d);     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2090 "Gmsh.y"
{ yyval.d = cos(yyvsp[-1].d);      ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2091 "Gmsh.y"
{ yyval.d = acos(yyvsp[-1].d);     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2092 "Gmsh.y"
{ yyval.d = tan(yyvsp[-1].d);      ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2093 "Gmsh.y"
{ yyval.d = atan(yyvsp[-1].d);     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2094 "Gmsh.y"
{ yyval.d = atan2(yyvsp[-3].d,yyvsp[-1].d); ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2095 "Gmsh.y"
{ yyval.d = sinh(yyvsp[-1].d);     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2096 "Gmsh.y"
{ yyval.d = cosh(yyvsp[-1].d);     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2097 "Gmsh.y"
{ yyval.d = tanh(yyvsp[-1].d);     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2098 "Gmsh.y"
{ yyval.d = fabs(yyvsp[-1].d);     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2099 "Gmsh.y"
{ yyval.d = floor(yyvsp[-1].d);    ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2100 "Gmsh.y"
{ yyval.d = ceil(yyvsp[-1].d);     ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2101 "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
#line 2102 "Gmsh.y"
{ yyval.d = fmod(yyvsp[-3].d,yyvsp[-1].d);  ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2103 "Gmsh.y"
{ yyval.d = sqrt(yyvsp[-3].d*yyvsp[-3].d+yyvsp[-1].d*yyvsp[-1].d); ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#line 2104 "Gmsh.y"
{ yyval.d = yyvsp[-1].d*(double)rand()/(double)RAND_MAX; ;
    break;}
case 280:
#line 2108 "Gmsh.y"
{ yyval.d = yyvsp[0].d; ;
David Colignon's avatar
David Colignon committed
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 281:
#line 2109 "Gmsh.y"
{ yyval.d = 3.141592653589793; ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 282:
#line 2111 "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 283:
#line 2120 "Gmsh.y"
{
      if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-2].c)))
	vyyerror("Unknown Numeric Option Class '%s'", yyvsp[-2].c);
      else{
	if(!(pNumOpt = Get_NumberOption(yyvsp[0].c, pNumCat, &i)))
	  vyyerror("Unknown Numeric Option '%s.%s'", yyvsp[-2].c, yyvsp[0].c);
	else{
	  switch(i){
	  case GMSH_DOUBLE : yyval.d = *(double*)pNumOpt ; break ;
	  case GMSH_FLOAT : yyval.d = (double)(*(float*)pNumOpt) ; break ;
	  case GMSH_LONG : yyval.d = (double)(*(long*)pNumOpt) ; break ;
	  case GMSH_INT : yyval.d = (double)(*(int*)pNumOpt) ; break ;
	  }
	}
      }
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 284:
#line 2137 "Gmsh.y"
      if(strcmp(yyvsp[-7].c, "PostProcessing"))
	vyyerror("Unknown View Option Class '%s'", yyvsp[-7].c);
      else{
	if(!(pNumOpt = Get_NumberViewOption((int)yyvsp[-3].d, yyvsp[0].c, &i))){
	  if(i < 0) vyyerror("PostProcessing View %d does not Exist", (int)yyvsp[-3].d);
	  else	    vyyerror("Unknown Numeric Option '%s.View[%d].%s'", 
			     yyvsp[-7].c, (int)yyvsp[-3].d, yyvsp[0].c);
	}
	else{
	  switch(i){
	  case GMSH_DOUBLE : yyval.d = *(double*)pNumOpt ; break ;
	  case GMSH_FLOAT : yyval.d = (double)(*(float*)pNumOpt) ; break ;
	  case GMSH_LONG : yyval.d = (double)(*(long*)pNumOpt) ; break ;
	  case GMSH_INT : yyval.d = (double)(*(int*)pNumOpt) ; break ;
	  }
	}
      }
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 285:
#line 2158 "Gmsh.y"
{
      if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-3].c)))
	vyyerror("Unknown Numeric Option Class '%s'", yyvsp[-3].c);
      else{
	if(!(pNumOpt = Get_NumberOption(yyvsp[-1].c, pNumCat, &i)))
	  vyyerror("Unknown Numeric Option '%s.%s'", yyvsp[-3].c, yyvsp[-1].c);
	else{
	  switch(i){
	  case GMSH_DOUBLE : yyval.d = (*(double*)pNumOpt += 1.) ; break ;
	  case GMSH_FLOAT : yyval.d = (double)(*(float*)pNumOpt += 1.) ; break ;
	  case GMSH_LONG : yyval.d = (double)(*(long*)pNumOpt += 1) ; break ;
	  case GMSH_INT : yyval.d = (double)(*(int*)pNumOpt += 1) ; break ;
	  }
	}
      }
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 286:
#line 2175 "Gmsh.y"
      if(strcmp(yyvsp[-8].c, "PostProcessing"))
	vyyerror("Unknown View Option Class '%s'", yyvsp[-8].c);
      else{
	if(!(pNumOpt = Get_NumberViewOption((int)yyvsp[-4].d, yyvsp[-1].c, &i))){
	  if(i < 0) vyyerror("PostProcessing View %d does not Exist", (int)yyvsp[-4].d);
	  else	    vyyerror("Unknown Numeric Option '%s.View[%d].%s'", 
			     yyvsp[-8].c, (int)yyvsp[-4].d, yyvsp[-1].c);
	}
	else{
	  switch(i){
	  case GMSH_DOUBLE : yyval.d = (*(double*)pNumOpt += 1.) ; break ;
	  case GMSH_FLOAT : yyval.d = (double)(*(float*)pNumOpt += 1.) ; break ;
	  case GMSH_LONG : yyval.d = (double)(*(long*)pNumOpt += 1) ; break ;
	  case GMSH_INT : yyval.d = (double)(*(int*)pNumOpt += 1) ; break ;
	  }
	}
      }
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 287:
#line 2196 "Gmsh.y"
{
      if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-3].c)))
	vyyerror("Unknown Numeric Option Class '%s'", yyvsp[-3].c);
      else{
	if(!(pNumOpt = Get_NumberOption(yyvsp[-1].c, pNumCat, &i)))
	  vyyerror("Unknown Numeric Option '%s.%s'", yyvsp[-3].c, yyvsp[-1].c);
	else{
	  switch(i){
	  case GMSH_DOUBLE : yyval.d = (*(double*)pNumOpt -= 1.) ; break ;
	  case GMSH_FLOAT : yyval.d = (double)(*(float*)pNumOpt -= 1.) ; break ;
	  case GMSH_LONG : yyval.d = (double)(*(long*)pNumOpt -= 1) ; break ;
	  case GMSH_INT : yyval.d = (double)(*(int*)pNumOpt -= 1) ; break ;
	  }
	}
      }
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 288:
#line 2213 "Gmsh.y"
      if(strcmp(yyvsp[-8].c, "PostProcessing"))
	vyyerror("Unknown View Option Class '%s'", yyvsp[-8].c);
      else{
	if(!(pNumOpt = Get_NumberViewOption((int)yyvsp[-4].d, yyvsp[-1].c, &i))){
	  if(i < 0) vyyerror("PostProcessing View %d does not Exist", (int)yyvsp[-4].d);
	  else	    vyyerror("Unknown Numeric Option '%s.View[%d].%s'", 
			     yyvsp[-8].c, (int)yyvsp[-4].d, yyvsp[-1].c);
	}
	else{
	  switch(i){
	  case GMSH_DOUBLE : yyval.d = (*(double*)pNumOpt -= 1.) ; break ;
	  case GMSH_FLOAT : yyval.d = (double)(*(float*)pNumOpt -= 1.) ; break ;
	  case GMSH_LONG : yyval.d = (double)(*(long*)pNumOpt -= 1) ; break ;
	  case GMSH_INT : yyval.d = (double)(*(int*)pNumOpt -= 1) ; break ;
	  }
	}
      }
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 289:
#line 2236 "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 290:
#line 2242 "Gmsh.y"
{
      ListOfDouble2_L = List_Create(2,1,sizeof(double)) ; 
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      if(!yyvsp[0].d || (yyvsp[-4].d<yyvsp[-2].d && yyvsp[0].d<0) || (yyvsp[-4].d>yyvsp[-2].d && yyvsp[0].d>0)){
        vyyerror("Wrong Increment in '%g:%g:%g'", yyvsp[-4].d, yyvsp[-2].d, yyvsp[0].d) ;
	List_Add(ListOfDouble2_L, &(yyvsp[-4].d)) ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
	for(d=yyvsp[-4].d ; (yyvsp[0].d>0)?(d<=yyvsp[-2].d):(d>=yyvsp[-2].d) ; d+=yyvsp[0].d)
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 291:
#line 2256 "Gmsh.y"
      for(i=0 ; i<6 ; i++) yyval.v[i] = yyvsp[0].v[i];
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 292:
#line 2260 "Gmsh.y"
      for(i=0 ; i<6 ; i++) yyval.v[i] = -yyvsp[0].v[i] ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 293:
#line 2264 "Gmsh.y"
      for(i=0 ; i<6 ; i++) yyval.v[i] = yyvsp[0].v[i];
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 294:
#line 2268 "Gmsh.y"
{ 
      for(i=0 ; i<6 ; i++) yyval.v[i] = yyvsp[-2].v[i] - yyvsp[0].v[i] ;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 295:
#line 2272 "Gmsh.y"
      for(i=0 ; i<6 ; i++) yyval.v[i] = yyvsp[-2].v[i] + yyvsp[0].v[i] ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 296:
#line 2278 "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 297:
#line 2282 "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 298:
#line 2286 "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;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 299:
#line 2290 "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;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 300:
#line 2294 "Gmsh.y"
      if(!(pArrCat = Get_ArrayOptionCategory(yyvsp[-2].c)))
	vyyerror("Unknown Array Option Class '%s'", yyvsp[-2].c);
      else{
	if(!(pArrOpt = Get_ArrayOption(yyvsp[0].c, pArrCat, &i)))
	  vyyerror("Unknown Array Option '%s.%s'", yyvsp[-2].c, yyvsp[0].c);
	else{
	  switch(i){
	  case GMSH_DOUBLE :
	    for(j=0 ; j<4 ; j++) yyval.v[j] = ((double*)pArrOpt)[j] ; 
	    break ;
	  case GMSH_FLOAT :
	    for(j=0 ; j<4 ; j++) yyval.v[j] = (double)((float*)pArrOpt)[j] ;
	    break ;
	  case GMSH_LONG : 
	    for(j=0 ; j<4 ; j++) yyval.v[j] = (double)((int*)pArrOpt)[j] ; 
	    break ;
	  case GMSH_INT :
	    for(j=0 ; j<4 ; j++) yyval.v[j] = (double)((int*)pArrOpt)[j] ; 
	    break ;
	  }
	  yyval.v[4] = 1. ;
	}
      }
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 301:
#line 2320 "Gmsh.y"
      if(strcmp(yyvsp[-7].c, "PostProcessing"))
	vyyerror("Unknown View Option Class '%s'", yyvsp[-7].c);
      else{
	if(!(pArrOpt = Get_ArrayViewOption((int)yyvsp[-3].d, yyvsp[0].c, &i))){
	  if(i < 0) vyyerror("PostProcessing View %d does not Exist", (int)yyvsp[-3].d);
	  else	    vyyerror("Unknown Array Option '%s.View[%d].%s'", 
			     yyvsp[-7].c, (int)yyvsp[-3].d, yyvsp[0].c);
	}
	else{
	  switch(i){
	  case GMSH_DOUBLE :
	    for(j=0 ; j<3 ; j++) yyval.v[j] = ((double*)pArrOpt)[j] ; 
	    break ;
	  case GMSH_FLOAT :
	    for(j=0 ; j<3 ; j++) yyval.v[j] = (double)((float*)pArrOpt)[j] ;
	    break ;
	  case GMSH_LONG : 
	    for(j=0 ; j<3 ; j++) yyval.v[j] = (double)((int*)pArrOpt)[j] ; 
	    break ;
	  case GMSH_INT :
	    for(j=0 ; j<3 ; j++) yyval.v[j] = (double)((int*)pArrOpt)[j] ; 
	    break ;
	  }
	  yyval.v[3] = 0. ;
	  yyval.v[4] = 1. ;
	}
      }
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 302:
#line 2353 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 303:
#line 2356 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 304:
#line 2362 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 305:
#line 2365 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 306:
#line 2371 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 307:
#line 2374 "Gmsh.y"
David Colignon's avatar
David Colignon committed
       yyval.l=ListOfListOfDouble_L;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 308:
#line 2378 "Gmsh.y"
       yyval.l=ListOfListOfDouble_L;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 309:
#line 2385 "Gmsh.y"
      ListOfListOfDouble_L = List_Create(2,1,sizeof(List_T*)) ;
David Colignon's avatar
David Colignon committed
      List_Add(ListOfListOfDouble_L, &(yyvsp[0].l)) ;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 310:
#line 2390 "Gmsh.y"
David Colignon's avatar
David Colignon committed
{
      List_Add(ListOfListOfDouble_L, &(yyvsp[0].l)) ;
David Colignon's avatar
David Colignon committed
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 311:
#line 2397 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 312:
#line 2400 "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 313:
#line 2406 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 314:
#line 2414 "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 315:
#line 2419 "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 316:
#line 2428 "Gmsh.y"
{
      List_Add(ListOfDouble_L, &(yyvsp[0].d)) ;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 317:
#line 2432 "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;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 318:
#line 2443 "Gmsh.y"
{
      yyval.u = PACK_COLOR((int)yyvsp[-7].d, (int)yyvsp[-5].d, (int)yyvsp[-3].d, (int)yyvsp[-1].d);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 319:
#line 2447 "Gmsh.y"
{
      yyval.u = PACK_COLOR((int)yyvsp[-5].d, (int)yyvsp[-3].d, (int)yyvsp[-1].d, 255);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 320:
#line 2451 "Gmsh.y"
{
      yyval.u = Get_ColorForString(ColorString, (int)yyvsp[-1].d, yyvsp[-3].c, &flag);
      if(flag) vyyerror("Unknown Color '%s'", yyvsp[-3].c);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 321:
#line 2456 "Gmsh.y"
{
      yyval.u = Get_ColorForString(ColorString, -1, yyvsp[0].c, &flag);
      if(flag) vyyerror("Unknown Color '%s'", yyvsp[0].c);
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 322:
#line 2461 "Gmsh.y"
{
      if(!(pColCat = Get_ColorOptionCategory(yyvsp[-4].c)))
	vyyerror("Unknown Color Option Class '%s'", yyvsp[-4].c);
      else{
	if(!(pColOpt = Get_ColorOption(yyvsp[0].c, pColCat)))
	  vyyerror("Unknown Color Option '%s.%s'", yyvsp[-4].c, yyvsp[0].c);
	else{
	  yyval.u = *pColOpt ;
	}
      }
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 323:
#line 2477 "Gmsh.y"
{
      yyval.l = ListOfColor_L;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 324:
#line 2481 "Gmsh.y"
{
      if(!ListOfColor_L)
	ListOfColor_L = List_Create(256,10,sizeof(unsigned int)) ;
      else
	List_Reset(ListOfColor_L) ;
      if(strcmp(yyvsp[-7].c, "PostProcessing"))
	vyyerror("Unknown View Option Class '%s'", yyvsp[-7].c);
      else{
	ColorTable *ct = Get_ColorTableViewOption((int)yyvsp[-3].d);
	if(!ct)
	  vyyerror("PostProcessing View %d does not Exist", (int)yyvsp[-3].d);
	else{
	  for(i=0 ; i<ct->size ; i++) 
	    List_Add(ListOfColor_L, &ct->table[i]);
	}
      }
      yyval.l = ListOfColor_L;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 325:
#line 2503 "Gmsh.y"
{
      if(!ListOfColor_L)
	ListOfColor_L = List_Create(256,10,sizeof(unsigned int)) ;
      else
	List_Reset(ListOfColor_L) ;
      List_Add(ListOfColor_L, &(yyvsp[0].u)) ;
    ;
    break;}
Christophe Geuzaine's avatar
Christophe Geuzaine committed
case 326:
#line 2511 "Gmsh.y"
{
      List_Add(ListOfColor_L, &(yyvsp[0].u)) ;
    ;
    break;}
}
   /* the action file gets copied in in place of this dollarsign */
#line 543 "/usr/lib/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)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

yyerrhandle:

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yyerrdefault;

  yyn += YYTERROR;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
    goto yyerrdefault;

  yyn = yytable[yyn];