Newer
Older
(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));
/* Line 1455 of yacc.c */
#line 2640 "Gmsh.y"

Christophe Geuzaine
committed
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));
/* Line 1455 of yacc.c */
#line 2647 "Gmsh.y"

Christophe Geuzaine
committed
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));
/* Line 1455 of yacc.c */
#line 2654 "Gmsh.y"

Christophe Geuzaine
committed
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));
/* Line 1455 of yacc.c */
#line 2661 "Gmsh.y"

Christophe Geuzaine
committed
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));
/* Line 1455 of yacc.c */
#line 2668 "Gmsh.y"

Christophe Geuzaine
committed
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));
/* Line 1455 of yacc.c */
#line 2675 "Gmsh.y"

Christophe Geuzaine
committed
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));
/* Line 1455 of yacc.c */
#line 2682 "Gmsh.y"

Christophe Geuzaine
committed
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));
/* Line 1455 of yacc.c */
#line 2689 "Gmsh.y"

Christophe Geuzaine
committed
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));
/* Line 1455 of yacc.c */
#line 2696 "Gmsh.y"

Christophe Geuzaine
committed
extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
/* Line 1455 of yacc.c */
#line 2700 "Gmsh.y"

Christophe Geuzaine
committed
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));
/* Line 1455 of yacc.c */
#line 2707 "Gmsh.y"
/* Line 1455 of yacc.c */
#line 2711 "Gmsh.y"

Christophe Geuzaine
committed
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));
/* Line 1455 of yacc.c */
#line 2718 "Gmsh.y"
/* Line 1455 of yacc.c */
#line 2722 "Gmsh.y"

Christophe Geuzaine
committed
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));
/* Line 1455 of yacc.c */
#line 2729 "Gmsh.y"
/* Line 1455 of yacc.c */
#line 2733 "Gmsh.y"

Christophe Geuzaine
committed
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));
/* Line 1455 of yacc.c */
#line 2740 "Gmsh.y"
/* Line 1455 of yacc.c */
#line 2744 "Gmsh.y"

Christophe Geuzaine
committed
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));
/* Line 1455 of yacc.c */
#line 2751 "Gmsh.y"
/* Line 1455 of yacc.c */
#line 2755 "Gmsh.y"

Christophe Geuzaine
committed
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));
/* Line 1455 of yacc.c */
#line 2762 "Gmsh.y"
/* Line 1455 of yacc.c */
#line 2766 "Gmsh.y"

Christophe Geuzaine
committed
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));
/* Line 1455 of yacc.c */
#line 2773 "Gmsh.y"
/* Line 1455 of yacc.c */
#line 2777 "Gmsh.y"

Christophe Geuzaine
committed
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));
/* Line 1455 of yacc.c */
#line 2784 "Gmsh.y"
/* Line 1455 of yacc.c */
#line 2788 "Gmsh.y"

Christophe Geuzaine
committed
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));
/* Line 1455 of yacc.c */
#line 2799 "Gmsh.y"
/* Line 1455 of yacc.c */
#line 2802 "Gmsh.y"
/* Line 1455 of yacc.c */
#line 2808 "Gmsh.y"
extr.mesh.ExtrudeMesh = true;
extr.mesh.NbLayer = 1;
extr.mesh.NbElmLayer.clear();
extr.mesh.hLayer.clear();
/* Line 1455 of yacc.c */
#line 2817 "Gmsh.y"
extr.mesh.ExtrudeMesh = true;
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);
}
yymsg(0, "Wrong layer definition {%d, %d}", List_Nbr((yyvsp[(3) - (7)].l)), List_Nbr((yyvsp[(5) - (7)].l)));
List_Delete((yyvsp[(3) - (7)].l));
List_Delete((yyvsp[(5) - (7)].l));
;}
break;
/* Line 1455 of yacc.c */
#line 2837 "Gmsh.y"
yymsg(0, "Explicit region numbers in layers are deprecated");
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);
}
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)));
List_Delete((yyvsp[(3) - (9)].l));
List_Delete((yyvsp[(5) - (9)].l));
List_Delete((yyvsp[(7) - (9)].l));
;}
break;
/* Line 1455 of yacc.c */
#line 2860 "Gmsh.y"
/* Line 1455 of yacc.c */
#line 2864 "Gmsh.y"
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);
}
/* Line 1455 of yacc.c */
#line 2887 "Gmsh.y"
/* Line 1455 of yacc.c */
#line 2891 "Gmsh.y"
(yyval.i) = 1;
else if(!strcmp((yyvsp[(1) - (1)].c), "Conformal"))
(yyval.i) = -1;
else if(!strcmp((yyvsp[(1) - (1)].c), "Harmonic_NoSplit"))
(yyval.i) = 2;
else if(!strcmp((yyvsp[(1) - (1)].c), "Conformal_NoSplit"))
(yyval.i) = -2;
Free((yyvsp[(1) - (1)].c));
;}
break;
case 230:
/* Line 1455 of yacc.c */
#line 2906 "Gmsh.y"
/* Line 1455 of yacc.c */
#line 2910 "Gmsh.y"
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.;
(yyval.v)[1] = (yyvsp[(3) - (3)].d);
Free((yyvsp[(2) - (3)].c));
/* Line 1455 of yacc.c */
#line 2925 "Gmsh.y"
/* Line 1455 of yacc.c */
#line 2929 "Gmsh.y"
{
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));
;}
break;
/* Line 1455 of yacc.c */
#line 2941 "Gmsh.y"
{
(yyval.l) = List_Create(1, 1, sizeof(double));
;}
break;
/* Line 1455 of yacc.c */
#line 2945 "Gmsh.y"
{
(yyval.l) = (yyvsp[(2) - (2)].l);
;}
break;
/* Line 1455 of yacc.c */
#line 2950 "Gmsh.y"
/* Line 1455 of yacc.c */
#line 2954 "Gmsh.y"
/* Line 1455 of yacc.c */
#line 2961 "Gmsh.y"
int type = (int)(yyvsp[(6) - (7)].v)[0];
double coef = fabs((yyvsp[(6) - (7)].v)[1]);
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;
}
}
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;
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);

Christophe Geuzaine
committed
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;
}
else if(sign > 0)

Christophe Geuzaine
committed
yymsg(0, "Unknown line %d", j);
}
}
}
List_Delete((yyvsp[(3) - (7)].l));
/* Line 1455 of yacc.c */
#line 3017 "Gmsh.y"
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");
if(!(yyvsp[(3) - (6)].l)){
List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Surfaces);
if(List_Nbr(tmp)){
for(int i = 0; i < List_Nbr(tmp); i++){
Surface *s;
List_Read(tmp, i, &s);
s->Method = MESH_TRANSFINITE;
s->Recombine_Dir = (yyvsp[(5) - (6)].i);
List_Reset(s->TrsfPoints);
for(GModel::fiter it = GModel::current()->firstFace();
it != GModel::current()->lastFace(); it++){
(*it)->meshAttributes.Method = MESH_TRANSFINITE;
(*it)->meshAttributes.transfiniteArrangement = (yyvsp[(5) - (6)].i);
}
}
List_Delete(tmp);
}
else{
for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){
double d;
List_Read((yyvsp[(3) - (6)].l), i, &d);
Surface *s = FindSurface((int)d);
if(s){
s->Method = MESH_TRANSFINITE;
s->Recombine_Dir = (yyvsp[(5) - (6)].i);
List_Reset(s->TrsfPoints);
for(int j = 0; j < k; j++){
double p;
List_Read((yyvsp[(4) - (6)].l), j, &p);
Vertex *v = FindPoint((int)fabs(p));
if(v)
List_Add(s->TrsfPoints, &v);
else
yymsg(0, "Unknown point %d", (int)fabs(p));
}
}
else{
GFace *gf = GModel::current()->getFaceByTag((int)d);
if(gf){
gf->meshAttributes.Method = MESH_TRANSFINITE;
gf->meshAttributes.transfiniteArrangement = (yyvsp[(5) - (6)].i);
for(int j = 0; j < k; j++){
double p;
List_Read((yyvsp[(4) - (6)].l), j, &p);
GVertex *gv = GModel::current()->getVertexByTag((int)fabs(p));
if(gv)
gf->meshAttributes.corners.push_back(gv);
else
yymsg(0, "Unknown point %d", (int)fabs(p));
}
}
else
yymsg(0, "Unknown surface %d", (int)d);
}
List_Delete((yyvsp[(3) - (6)].l));
List_Delete((yyvsp[(4) - (6)].l));
/* Line 1455 of yacc.c */
#line 3087 "Gmsh.y"
yymsg(1, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)");
/* Line 1455 of yacc.c */
#line 3092 "Gmsh.y"
int k = List_Nbr((yyvsp[(4) - (5)].l));
if(k != 0 && k != 6 && k != 8){
yymsg(0, "Wrong definition of Transfinite Volume: "
"%d points instead of 6 or 8", k);
if(!(yyvsp[(3) - (5)].l)){
List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Volumes);
if(List_Nbr(tmp)){
for(int i = 0; i < List_Nbr(tmp); i++){
Volume *v;
List_Read(tmp, i, &v);
v->Method = MESH_TRANSFINITE;
List_Reset(v->TrsfPoints);
}
}
else{
for(GModel::riter it = GModel::current()->firstRegion();
it != GModel::current()->lastRegion(); it++){
(*it)->meshAttributes.Method = MESH_TRANSFINITE;
}
}
List_Delete(tmp);
}
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
for(int i = 0; i < List_Nbr((yyvsp[(3) - (5)].l)); i++){
double d;
List_Read((yyvsp[(3) - (5)].l), i, &d);
Volume *v = FindVolume((int)d);
if(v){
v->Method = MESH_TRANSFINITE;
List_Reset(v->TrsfPoints);
for(int i = 0; i < k; i++){
double p;
List_Read((yyvsp[(4) - (5)].l), i, &p);
Vertex *vert = FindPoint((int)fabs(p));
if(vert)
List_Add(v->TrsfPoints, &vert);
else
yymsg(0, "Unknown point %d", (int)fabs(p));
}
}
else{
GRegion *gr = GModel::current()->getRegionByTag((int)d);
if(gr){
gr->meshAttributes.Method = MESH_TRANSFINITE;
for(int i = 0; i < k; i++){
double p;
List_Read((yyvsp[(4) - (5)].l), i, &p);
GVertex *gv = GModel::current()->getVertexByTag((int)fabs(p));
if(gv)
gr->meshAttributes.corners.push_back(gv);
else
yymsg(0, "Unknown point %d", (int)fabs(p));
}
}
yymsg(0, "Unknown volume %d", (int)d);
List_Delete((yyvsp[(3) - (5)].l));
List_Delete((yyvsp[(4) - (5)].l));
/* Line 1455 of yacc.c */
#line 3159 "Gmsh.y"
if(!(yyvsp[(3) - (5)].l)){
List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Surfaces);
if(List_Nbr(tmp)){
for(int i = 0; i < List_Nbr(tmp); i++){
Surface *s;
List_Read(tmp, i, &s);
s->Recombine = 1;
s->RecombineAngle = (yyvsp[(4) - (5)].i);
}
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
for(GModel::fiter it = GModel::current()->firstFace();
it != GModel::current()->lastFace(); it++){
(*it)->meshAttributes.recombine = 1;
(*it)->meshAttributes.recombineAngle = (yyvsp[(4) - (5)].i);
}
}
List_Delete(tmp);
}
else{
for(int i = 0; i < List_Nbr((yyvsp[(3) - (5)].l)); i++){
double d;
List_Read((yyvsp[(3) - (5)].l), i, &d);
Surface *s = FindSurface((int)d);
if(s){
s->Recombine = 1;
s->RecombineAngle = (yyvsp[(4) - (5)].i);
}
else{
GFace *gf = GModel::current()->getFaceByTag((int)d);
if(gf){
gf->meshAttributes.recombine = 1;
gf->meshAttributes.recombineAngle = (yyvsp[(4) - (5)].i);
}
else
yymsg(1, "Unknown surface %d", (int)d);
List_Delete((yyvsp[(3) - (5)].l));
/* Line 1455 of yacc.c */
#line 3202 "Gmsh.y"
double d;
List_Read((yyvsp[(3) - (6)].l), i, &d);
int j = (int)d;
Surface *s = FindSurface(j);
if(s){
s->TransfiniteSmoothing = (int)(yyvsp[(5) - (6)].d);
}
else{
gf->meshAttributes.transfiniteSmoothing = (int)(yyvsp[(5) - (6)].d);
else
}
List_Delete((yyvsp[(3) - (6)].l));
;}
break;
/* Line 1455 of yacc.c */
#line 3228 "Gmsh.y"
}
else{
GFace *gf = GModel::current()->getFaceByTag((int)(yyvsp[(8) - (10)].d));
if(gf){
for(int i = 0; i < List_Nbr((yyvsp[(3) - (10)].l)); i++){
int iPoint;
List_Read((yyvsp[(3) - (10)].l), i, &iPoint);
GVertex *gv = GModel::current()->getVertexByTag(iPoint);
if(gv)
gf->addEmbeddedVertex(gv);
else
yymsg(0, "Unknown point %d", iPoint);
}
}
else
yymsg(0, "Unknown surface %d", (int)(yyvsp[(8) - (10)].d));
}
/* Line 1455 of yacc.c */
#line 3251 "Gmsh.y"
}
else{
GFace *gf = GModel::current()->getFaceByTag((int)(yyvsp[(8) - (10)].d));
if(gf){
for(int i = 0; i < List_Nbr((yyvsp[(3) - (10)].l)); i++){
int iCurve;
List_Read((yyvsp[(3) - (10)].l), i, &iCurve);
GEdge *ge = GModel::current()->getEdgeByTag(iCurve);
if(ge)
gf->addEmbeddedEdge(ge);
else
yymsg(0, "Unknown line %d", iCurve);
}
}
else
yymsg(0, "Unknown surface %d", (int)(yyvsp[(8) - (10)].d));
}
/* Line 1455 of yacc.c */
#line 3274 "Gmsh.y"
/* Line 1455 of yacc.c */
#line 3277 "Gmsh.y"
/* Line 1455 of yacc.c */
#line 3286 "Gmsh.y"
ReplaceAllDuplicates();
/* Line 1455 of yacc.c */
#line 3290 "Gmsh.y"
{
if(!strcmp((yyvsp[(2) - (3)].c), "Geometry"))
ReplaceAllDuplicates();
else if(!strcmp((yyvsp[(2) - (3)].c), "Mesh"))
GModel::current()->removeDuplicateMeshVertices(CTX::instance()->geom.tolerance);
else
yymsg(0, "Unknown coherence command");
Free((yyvsp[(2) - (3)].c));
;}
/* Line 1455 of yacc.c */
#line 3307 "Gmsh.y"
List_T *temp = ListOfDouble2ListOfInt((yyvsp[(7) - (11)].l));
int item = 0;
List_Read(temp, i, &item);
domain.push_back(item);
}
List_Delete((yyvsp[(7) - (11)].l));
List_T *temp2 = ListOfDouble2ListOfInt((yyvsp[(9) - (11)].l));
int item = 0;
List_Read(temp2, i, &item);
subdomain.push_back(item);
}
List_Delete((yyvsp[(9) - (11)].l));
std::string fileName = "";
fileName = (yyvsp[(3) - (11)].c);
Homology* homology = new Homology(GModel::current(), domain, subdomain);
delete homology;
#else
yymsg(0, "Gmsh needs to be configured with option Kbipack to use homology computation.");
/* Line 1455 of yacc.c */
#line 3344 "Gmsh.y"
int item = 0;
List_Read(temp, i, &item);
domain.push_back(item);
}
int item = 0;
List_Read(temp2, i, &item);
subdomain.push_back(item);
}
std::string fileName = "";
fileName = (yyvsp[(3) - (11)].c);
Homology* homology = new Homology(GModel::current(), domain, subdomain);
homology->setFileName(fileName);
homology->findGenerators();
#else
yymsg(0, "Gmsh needs to be configured with option Kbipack to use homology computation.");
/* Line 1455 of yacc.c */
#line 3380 "Gmsh.y"
int item = 0;
List_Read(temp, i, &item);
domain.push_back(item);
}