Skip to content
Snippets Groups Projects
Gmsh.tab.cpp 376 KiB
Newer Older
Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2517 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      CTX::instance()->forcedBBox = 0;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      GModel::current()->importGEOInternals();
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      SetBoundingBox();
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2523 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      CTX::instance()->forcedBBox = 1;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      SetBoundingBox((yyvsp[(3) - (15)].d), (yyvsp[(5) - (15)].d), (yyvsp[(7) - (15)].d), (yyvsp[(9) - (15)].d), (yyvsp[(11) - (15)].d), (yyvsp[(13) - (15)].d));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2528 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      drawContext::global()->draw();
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2534 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
    {
      GModel::current()->createTopologyFromMesh();
Christophe Geuzaine's avatar
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2538 "Gmsh.y"
    {
      GModel::current()->createTopologyFromMesh(1);
Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2542 "Gmsh.y"
    {
      GModel::current()->importGEOInternals();
      GModel::current()->refineMesh(CTX::instance()->mesh.secondOrderLinear);
Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2552 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (6)].d);
      LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (6)].d);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      LoopControlVariablesTab[ImbricatedLoop][2] = 1.0;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      LoopControlVariablesNameTab[ImbricatedLoop] = NULL;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      fgetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
      yylinenoImbricatedLoopsTab[ImbricatedLoop] = gmsh_yylineno;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if((yyvsp[(3) - (6)].d) > (yyvsp[(5) - (6)].d))
	skip_until("For", "EndFor");
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      else
      if(ImbricatedLoop > MAX_RECUR_LOOPS - 1){
	yymsg(0, "Reached maximum number of imbricated loops");
	ImbricatedLoop = MAX_RECUR_LOOPS - 1;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      }
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2569 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (8)].d);
      LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (8)].d);
      LoopControlVariablesTab[ImbricatedLoop][2] = (yyvsp[(7) - (8)].d);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      LoopControlVariablesNameTab[ImbricatedLoop] = NULL;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      fgetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
      yylinenoImbricatedLoopsTab[ImbricatedLoop] = gmsh_yylineno;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(((yyvsp[(7) - (8)].d) > 0. && (yyvsp[(3) - (8)].d) > (yyvsp[(5) - (8)].d)) || ((yyvsp[(7) - (8)].d) < 0. && (yyvsp[(3) - (8)].d) < (yyvsp[(5) - (8)].d)))
	skip_until("For", "EndFor");
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      else
      if(ImbricatedLoop > MAX_RECUR_LOOPS - 1){
	yymsg(0, "Reached maximum number of imbricated loops");
	ImbricatedLoop = MAX_RECUR_LOOPS - 1;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      }
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2586 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (8)].d);
      LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (8)].d);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      LoopControlVariablesTab[ImbricatedLoop][2] = 1.0;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      LoopControlVariablesNameTab[ImbricatedLoop] = (yyvsp[(2) - (8)].c);
      gmsh_yysymbols[(yyvsp[(2) - (8)].c)].resize(1);
      gmsh_yysymbols[(yyvsp[(2) - (8)].c)][0] = (yyvsp[(5) - (8)].d);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      fgetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
      yylinenoImbricatedLoopsTab[ImbricatedLoop] = gmsh_yylineno;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if((yyvsp[(5) - (8)].d) > (yyvsp[(7) - (8)].d)) 
	skip_until("For", "EndFor");
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      else
      if(ImbricatedLoop > MAX_RECUR_LOOPS - 1){
	yymsg(0, "Reached maximum number of imbricated loops");
	ImbricatedLoop = MAX_RECUR_LOOPS - 1;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      }
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2605 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (10)].d);
      LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (10)].d);
      LoopControlVariablesTab[ImbricatedLoop][2] = (yyvsp[(9) - (10)].d);
      LoopControlVariablesNameTab[ImbricatedLoop] = (yyvsp[(2) - (10)].c);
      gmsh_yysymbols[(yyvsp[(2) - (10)].c)].resize(1);
      gmsh_yysymbols[(yyvsp[(2) - (10)].c)][0] = (yyvsp[(5) - (10)].d);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      fgetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop]);
      yylinenoImbricatedLoopsTab[ImbricatedLoop] = gmsh_yylineno;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(((yyvsp[(9) - (10)].d) > 0. && (yyvsp[(5) - (10)].d) > (yyvsp[(7) - (10)].d)) || ((yyvsp[(9) - (10)].d) < 0. && (yyvsp[(5) - (10)].d) < (yyvsp[(7) - (10)].d)))
	skip_until("For", "EndFor");
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      else
      if(ImbricatedLoop > MAX_RECUR_LOOPS - 1){
	yymsg(0, "Reached maximum number of imbricated loops");
	ImbricatedLoop = MAX_RECUR_LOOPS - 1;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      }
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2624 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(ImbricatedLoop <= 0){
	yymsg(0, "Invalid For/EndFor loop");
	ImbricatedLoop = 0;
	double step = LoopControlVariablesTab[ImbricatedLoop - 1][2];
        const char *name = LoopControlVariablesNameTab[ImbricatedLoop - 1];
        if(name){
          if(!gmsh_yysymbols.count(name))
            yymsg(0, "Unknown loop variable");
          else{
            gmsh_yysymbols[name][0] += step;
            LoopControlVariablesTab[ImbricatedLoop - 1][0] = gmsh_yysymbols[name][0];
          }
        }
        else{
          LoopControlVariablesTab[ImbricatedLoop - 1][0] += step;
        }
	double x0 = LoopControlVariablesTab[ImbricatedLoop - 1][0];
	double x1 = LoopControlVariablesTab[ImbricatedLoop - 1][1];
        if((step > 0. && x0 <= x1) || (step < 0. && x0 >= x1)){
	  fsetpos(gmsh_yyin, &yyposImbricatedLoopsTab[ImbricatedLoop - 1]);
	  gmsh_yylineno = yylinenoImbricatedLoopsTab[ImbricatedLoop - 1];
	}
	else
	  ImbricatedLoop--;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2654 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      if(!FunctionManager::Instance()->createFunction
         ((yyvsp[(2) - (2)].c), gmsh_yyin, gmsh_yyname, gmsh_yylineno))
	yymsg(0, "Redefinition of function %s", (yyvsp[(2) - (2)].c));
      skip_until(NULL, "Return");
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      //FIXME: wee leak $2
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2662 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      if(!FunctionManager::Instance()->leaveFunction
         (&gmsh_yyin, gmsh_yyname, gmsh_yylineno))
	yymsg(0, "Error while exiting function");
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2668 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      if(!FunctionManager::Instance()->enterFunction
         ((yyvsp[(2) - (3)].c), &gmsh_yyin, gmsh_yyname, gmsh_yylineno))
	yymsg(0, "Unknown function %s", (yyvsp[(2) - (3)].c));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2675 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      if(!(yyvsp[(3) - (4)].d)) skip_until("If", "EndIf");
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2679 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2688 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (5)].l), 
		    (yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
		    NULL, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      List_Delete((yyvsp[(4) - (5)].l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2696 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShapes(ROTATE, (yyvsp[(10) - (11)].l), 
		    0., 0., 0., (yyvsp[(3) - (11)].v)[0], (yyvsp[(3) - (11)].v)[1], (yyvsp[(3) - (11)].v)[2], (yyvsp[(5) - (11)].v)[0], (yyvsp[(5) - (11)].v)[1], (yyvsp[(5) - (11)].v)[2], (yyvsp[(7) - (11)].d),
		    NULL, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      List_Delete((yyvsp[(10) - (11)].l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2704 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (13)].l), 
		    (yyvsp[(3) - (13)].v)[0], (yyvsp[(3) - (13)].v)[1], (yyvsp[(3) - (13)].v)[2], (yyvsp[(5) - (13)].v)[0], (yyvsp[(5) - (13)].v)[1], (yyvsp[(5) - (13)].v)[2], (yyvsp[(7) - (13)].v)[0], (yyvsp[(7) - (13)].v)[1], (yyvsp[(7) - (13)].v)[2], (yyvsp[(9) - (13)].d),
		    NULL, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      List_Delete((yyvsp[(12) - (13)].l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2712 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2717 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (7)].l), 
		    (yyvsp[(2) - (7)].v)[0], (yyvsp[(2) - (7)].v)[1], (yyvsp[(2) - (7)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
		    &extr, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      List_Delete((yyvsp[(4) - (7)].l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2725 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2730 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShapes(ROTATE, (yyvsp[(10) - (13)].l), 
		    0., 0., 0., (yyvsp[(3) - (13)].v)[0], (yyvsp[(3) - (13)].v)[1], (yyvsp[(3) - (13)].v)[2], (yyvsp[(5) - (13)].v)[0], (yyvsp[(5) - (13)].v)[1], (yyvsp[(5) - (13)].v)[2], (yyvsp[(7) - (13)].d),
		    &extr, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      List_Delete((yyvsp[(10) - (13)].l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2738 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2743 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (15)].l), 
		    (yyvsp[(3) - (15)].v)[0], (yyvsp[(3) - (15)].v)[1], (yyvsp[(3) - (15)].v)[2], (yyvsp[(5) - (15)].v)[0], (yyvsp[(5) - (15)].v)[1], (yyvsp[(5) - (15)].v)[2], (yyvsp[(7) - (15)].v)[0], (yyvsp[(7) - (15)].v)[1], (yyvsp[(7) - (15)].v)[2], (yyvsp[(9) - (15)].d),
		    &extr, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      List_Delete((yyvsp[(12) - (15)].l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2751 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2756 "Gmsh.y"
      ExtrudeShapes(BOUNDARY_LAYER, (yyvsp[(3) - (6)].l), 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
      List_Delete((yyvsp[(3) - (6)].l));
Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2764 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (8)].d), 
		   (yyvsp[(6) - (8)].v)[0], (yyvsp[(6) - (8)].v)[1], (yyvsp[(6) - (8)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
		   NULL, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2771 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (8)].d), 
		   (yyvsp[(6) - (8)].v)[0], (yyvsp[(6) - (8)].v)[1], (yyvsp[(6) - (8)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
		   NULL, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2778 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (8)].d), 
		   (yyvsp[(6) - (8)].v)[0], (yyvsp[(6) - (8)].v)[1], (yyvsp[(6) - (8)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
		   NULL, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2785 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), 
		   0., 0., 0., (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], (yyvsp[(8) - (12)].v)[0], (yyvsp[(8) - (12)].v)[1], (yyvsp[(8) - (12)].v)[2], (yyvsp[(10) - (12)].d),
		   NULL, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2792 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), 
		   0., 0., 0., (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], (yyvsp[(8) - (12)].v)[0], (yyvsp[(8) - (12)].v)[1], (yyvsp[(8) - (12)].v)[2], (yyvsp[(10) - (12)].d),
		   NULL, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2799 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), 
		   0., 0., 0., (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], (yyvsp[(8) - (12)].v)[0], (yyvsp[(8) - (12)].v)[1], (yyvsp[(8) - (12)].v)[2], (yyvsp[(10) - (12)].d),
		   NULL, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2806 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (14)].d), 
		   (yyvsp[(6) - (14)].v)[0], (yyvsp[(6) - (14)].v)[1], (yyvsp[(6) - (14)].v)[2], (yyvsp[(8) - (14)].v)[0], (yyvsp[(8) - (14)].v)[1], (yyvsp[(8) - (14)].v)[2], (yyvsp[(10) - (14)].v)[0], (yyvsp[(10) - (14)].v)[1], (yyvsp[(10) - (14)].v)[2], (yyvsp[(12) - (14)].d),
		   NULL, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2813 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (14)].d), 
		   (yyvsp[(6) - (14)].v)[0], (yyvsp[(6) - (14)].v)[1], (yyvsp[(6) - (14)].v)[2], (yyvsp[(8) - (14)].v)[0], (yyvsp[(8) - (14)].v)[1], (yyvsp[(8) - (14)].v)[2], (yyvsp[(10) - (14)].v)[0], (yyvsp[(10) - (14)].v)[1], (yyvsp[(10) - (14)].v)[2], (yyvsp[(12) - (14)].d),
		   NULL, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2820 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (14)].d), 
		   (yyvsp[(6) - (14)].v)[0], (yyvsp[(6) - (14)].v)[1], (yyvsp[(6) - (14)].v)[2], (yyvsp[(8) - (14)].v)[0], (yyvsp[(8) - (14)].v)[1], (yyvsp[(8) - (14)].v)[2], (yyvsp[(10) - (14)].v)[0], (yyvsp[(10) - (14)].v)[1], (yyvsp[(10) - (14)].v)[2], (yyvsp[(12) - (14)].d),
		   NULL, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2827 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2832 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), 
		   (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
		   &extr, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2839 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2844 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), 
		   (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
		   &extr, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2851 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2856 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), 
		   (yyvsp[(6) - (12)].v)[0], (yyvsp[(6) - (12)].v)[1], (yyvsp[(6) - (12)].v)[2], 0., 0., 0., 0., 0., 0., 0.,
		   &extr, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2863 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2868 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (16)].d), 
		   0., 0., 0., (yyvsp[(6) - (16)].v)[0], (yyvsp[(6) - (16)].v)[1], (yyvsp[(6) - (16)].v)[2], (yyvsp[(8) - (16)].v)[0], (yyvsp[(8) - (16)].v)[1], (yyvsp[(8) - (16)].v)[2], (yyvsp[(10) - (16)].d),
		   &extr, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2875 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2880 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (16)].d), 
		   0., 0., 0., (yyvsp[(6) - (16)].v)[0], (yyvsp[(6) - (16)].v)[1], (yyvsp[(6) - (16)].v)[2], (yyvsp[(8) - (16)].v)[0], (yyvsp[(8) - (16)].v)[1], (yyvsp[(8) - (16)].v)[2], (yyvsp[(10) - (16)].d),
		   &extr, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2887 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2892 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (16)].d), 
		   0., 0., 0., (yyvsp[(6) - (16)].v)[0], (yyvsp[(6) - (16)].v)[1], (yyvsp[(6) - (16)].v)[2], (yyvsp[(8) - (16)].v)[0], (yyvsp[(8) - (16)].v)[1], (yyvsp[(8) - (16)].v)[2], (yyvsp[(10) - (16)].d),
		   &extr, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2899 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2904 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (18)].d), 
		   (yyvsp[(6) - (18)].v)[0], (yyvsp[(6) - (18)].v)[1], (yyvsp[(6) - (18)].v)[2], (yyvsp[(8) - (18)].v)[0], (yyvsp[(8) - (18)].v)[1], (yyvsp[(8) - (18)].v)[2], (yyvsp[(10) - (18)].v)[0], (yyvsp[(10) - (18)].v)[1], (yyvsp[(10) - (18)].v)[2], (yyvsp[(12) - (18)].d),
		   &extr, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2911 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2916 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (18)].d), 
		   (yyvsp[(6) - (18)].v)[0], (yyvsp[(6) - (18)].v)[1], (yyvsp[(6) - (18)].v)[2], (yyvsp[(8) - (18)].v)[0], (yyvsp[(8) - (18)].v)[1], (yyvsp[(8) - (18)].v)[2], (yyvsp[(10) - (18)].v)[0], (yyvsp[(10) - (18)].v)[1], (yyvsp[(10) - (18)].v)[2], (yyvsp[(12) - (18)].d),
		   &extr, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2923 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2928 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.l) = List_Create(2, 1, sizeof(Shape));
      ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (18)].d), 
		   (yyvsp[(6) - (18)].v)[0], (yyvsp[(6) - (18)].v)[1], (yyvsp[(6) - (18)].v)[2], (yyvsp[(8) - (18)].v)[0], (yyvsp[(8) - (18)].v)[1], (yyvsp[(8) - (18)].v)[2], (yyvsp[(10) - (18)].v)[0], (yyvsp[(10) - (18)].v)[1], (yyvsp[(10) - (18)].v)[2], (yyvsp[(12) - (18)].d),
		   &extr, (yyval.l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2939 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2942 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2948 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      extr.mesh.ExtrudeMesh = true;
      extr.mesh.NbLayer = 1;
      extr.mesh.NbElmLayer.clear();
      extr.mesh.hLayer.clear();
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      extr.mesh.NbElmLayer.push_back((int)fabs((yyvsp[(3) - (5)].d)));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      extr.mesh.hLayer.push_back(1.);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2957 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      extr.mesh.ExtrudeMesh = true;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      extr.mesh.NbLayer = List_Nbr((yyvsp[(3) - (7)].l));
      if(List_Nbr((yyvsp[(3) - (7)].l)) == List_Nbr((yyvsp[(5) - (7)].l))){
	extr.mesh.NbElmLayer.clear();
	extr.mesh.hLayer.clear();
	for(int i = 0; i < List_Nbr((yyvsp[(3) - (7)].l)); i++){
	  double d;
	  List_Read((yyvsp[(3) - (7)].l), i, &d);
	  extr.mesh.NbElmLayer.push_back((d > 0) ? (int)d : 1);
	  List_Read((yyvsp[(5) - (7)].l), i, &d);
	  extr.mesh.hLayer.push_back(d);
	}
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      else
	yymsg(0, "Wrong layer definition {%d, %d}", List_Nbr((yyvsp[(3) - (7)].l)), List_Nbr((yyvsp[(5) - (7)].l)));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      List_Delete((yyvsp[(3) - (7)].l));
      List_Delete((yyvsp[(5) - (7)].l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 2977 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      yymsg(0, "Explicit region numbers in layers are deprecated");
      extr.mesh.ExtrudeMesh = true;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      extr.mesh.NbLayer = List_Nbr((yyvsp[(3) - (9)].l));
      if(List_Nbr((yyvsp[(3) - (9)].l)) == List_Nbr((yyvsp[(5) - (9)].l)) && List_Nbr((yyvsp[(3) - (9)].l)) == List_Nbr((yyvsp[(7) - (9)].l))){
	extr.mesh.NbElmLayer.clear();
	extr.mesh.hLayer.clear();
	for(int i = 0; i < List_Nbr((yyvsp[(3) - (9)].l)); i++){
	  double d;
	  List_Read((yyvsp[(3) - (9)].l), i, &d);
	  extr.mesh.NbElmLayer.push_back((d > 0) ? (int)d : 1);
	  List_Read((yyvsp[(7) - (9)].l), i, &d);
	  extr.mesh.hLayer.push_back(d);
	}
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      else
	yymsg(0, "Wrong layer definition {%d, %d, %d}", List_Nbr((yyvsp[(3) - (9)].l)), 
	      List_Nbr((yyvsp[(5) - (9)].l)), List_Nbr((yyvsp[(7) - (9)].l)));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      List_Delete((yyvsp[(3) - (9)].l));
      List_Delete((yyvsp[(5) - (9)].l));
      List_Delete((yyvsp[(7) - (9)].l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 3000 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      extr.mesh.Recombine = true;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 3004 "Gmsh.y"
Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 3008 "Gmsh.y"
Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 3012 "Gmsh.y"
Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 3016 "Gmsh.y"
Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 3020 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      int num = (int)(yyvsp[(3) - (9)].d);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(FindSurface(num)){
	yymsg(0, "Surface %d already exists", num);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      }
      else{
	Surface *s = Create_Surface(num, MSH_SURF_DISCRETE);
	Tree_Add(GModel::current()->getGEOInternals()->Surfaces, &s);
	extr.mesh.Holes[num].first = (yyvsp[(8) - (9)].d);
	extr.mesh.Holes[num].second.clear();
	for(int i = 0; i < List_Nbr((yyvsp[(6) - (9)].l)); i++){
	  double d;
	  List_Read((yyvsp[(6) - (9)].l), i, &d);
	  extr.mesh.Holes[num].second.push_back((int)d);
	}
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      }
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      List_Delete((yyvsp[(6) - (9)].l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 3039 "Gmsh.y"
    {
      if(!strcmp((yyvsp[(2) - (6)].c), "Index"))
        extr.mesh.BoundaryLayerIndex = (yyvsp[(4) - (6)].d);
      else if(!strcmp((yyvsp[(2) - (6)].c), "View"))
        extr.mesh.ViewIndex = (yyvsp[(4) - (6)].d);
      Free((yyvsp[(2) - (6)].c));
Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 3051 "Gmsh.y"
Emilie Marchandise's avatar
Emilie Marchandise committed
      (yyval.v)[0] = (yyval.v)[1] = 1.;
Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 3055 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!strcmp((yyvsp[(2) - (3)].c), "Progression") || !strcmp((yyvsp[(2) - (3)].c), "Power"))
        (yyval.v)[0] = 1.;
      else if(!strcmp((yyvsp[(2) - (3)].c), "Bump"))
        (yyval.v)[0] = 2.;
      else{
        yymsg(0, "Unknown transfinite mesh type");
        (yyval.v)[0] = 1.;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      (yyval.v)[1] = (yyvsp[(3) - (3)].d);
      Free((yyvsp[(2) - (3)].c));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 3070 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      (yyval.i) = -1; // left
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 3074 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      if(!strcmp((yyvsp[(1) - (1)].c), "Right"))
        (yyval.i) = 1;
      else if(!strcmp((yyvsp[(1) - (1)].c), "Left"))
        (yyval.i) = -1;
      else // alternated
        (yyval.i) = 0;
      Free((yyvsp[(1) - (1)].c));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 3086 "Gmsh.y"
    {
     (yyval.l) = List_Create(1, 1, sizeof(double));
Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 3090 "Gmsh.y"
    {
     (yyval.l) = (yyvsp[(2) - (2)].l);
Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 3095 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
    {
      (yyval.i) = 45;
Christophe Geuzaine's avatar
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 3099 "Gmsh.y"
Christophe Geuzaine's avatar
Christophe Geuzaine committed
    {
      (yyval.i) = (int)(yyvsp[(2) - (2)].d);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 3106 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      int type = (int)(yyvsp[(6) - (7)].v)[0];
      double coef = fabs((yyvsp[(6) - (7)].v)[1]);
Christophe Geuzaine's avatar
Christophe Geuzaine committed
      if(!(yyvsp[(3) - (7)].l)){
        List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Curves);
        if(List_Nbr(tmp)){
          for(int i = 0; i < List_Nbr(tmp); i++){
            Curve *c;
            List_Read(tmp, i, &c);
            c->Method = MESH_TRANSFINITE;
            c->nbPointsTransfinite = ((yyvsp[(5) - (7)].d) > 2) ? (int)(yyvsp[(5) - (7)].d) : 2;
            c->typeTransfinite = type;
            c->coeffTransfinite = coef;
          }
        }
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
        else{
Christophe Geuzaine's avatar
Christophe Geuzaine committed
          for(GModel::eiter it = GModel::current()->firstEdge(); 
              it != GModel::current()->lastEdge(); it++){
            (*it)->meshAttributes.Method = MESH_TRANSFINITE;
            (*it)->meshAttributes.nbPointsTransfinite = ((yyvsp[(5) - (7)].d) > 2) ? (int)(yyvsp[(5) - (7)].d) : 2;
            (*it)->meshAttributes.typeTransfinite = type;
            (*it)->meshAttributes.coeffTransfinite = coef;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
          }
        }
Christophe Geuzaine's avatar
Christophe Geuzaine committed
        List_Delete(tmp);
      }
      else{
        for(int i = 0; i < List_Nbr((yyvsp[(3) - (7)].l)); i++){
          double d;
          List_Read((yyvsp[(3) - (7)].l), i, &d);
          int j = (int)fabs(d);
          for(int sign = -1; sign <= 1; sign += 2){
            Curve *c = FindCurve(sign * j);
            if(c){
              c->Method = MESH_TRANSFINITE;
              c->nbPointsTransfinite = ((yyvsp[(5) - (7)].d) > 2) ? (int)(yyvsp[(5) - (7)].d) : 2;
              c->typeTransfinite = type * sign(d);
              c->coeffTransfinite = coef;
            }
            else{
              GEdge *ge = GModel::current()->getEdgeByTag(sign * j);
              if(ge){
                ge->meshAttributes.Method = MESH_TRANSFINITE;
                ge->meshAttributes.nbPointsTransfinite = ((yyvsp[(5) - (7)].d) > 2) ? (int)(yyvsp[(5) - (7)].d) : 2;
                ge->meshAttributes.typeTransfinite = type * sign(d);
                ge->meshAttributes.coeffTransfinite = coef;
              }
Christophe Geuzaine's avatar
Christophe Geuzaine committed
            }
          }
        }
        List_Delete((yyvsp[(3) - (7)].l));
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    break;

Emilie Marchandise's avatar
Emilie Marchandise committed
/* Line 1806 of yacc.c  */
Gaetan Bricteux's avatar
Gaetan Bricteux committed
#line 3162 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    {
      int k = List_Nbr((yyvsp[(4) - (6)].l));
      if(k != 0 && k != 3 && k != 4){
        yymsg(0, "Wrong definition of Transfinite Surface: 0, 3 or 4 points needed");