Newer
Older
{ if(ViewValueList) List_Add(ViewValueList, &(yyvsp[(1) - (1)].d)); ;}
break;
case 38:
{ if(ViewValueList) List_Add(ViewValueList, &(yyvsp[(3) - (3)].d)); ;}
break;
case 39:
yymsg(GERROR, "Unknown element type '%s'", (yyvsp[(1) - (1)].c));
for(int j = 0; j < ViewCoordIdx / 3; j++)
List_Add(ViewValueList, &ViewCoord[3 * j + i]);
{
for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c))+1; i++) List_Add(ViewData->T2C, &(yyvsp[(1) - (1)].c)[i]);
Free((yyvsp[(1) - (1)].c));
;}
break;
case 43:
{
for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c))+1; i++) List_Add(ViewData->T2C, &(yyvsp[(3) - (3)].c)[i]);
Free((yyvsp[(3) - (3)].c));
;}
break;
case 44:
{
List_Add(ViewData->T2D, &(yyvsp[(3) - (8)].d));
List_Add(ViewData->T2D, &(yyvsp[(5) - (8)].d));
List_Add(ViewData->T2D, &(yyvsp[(7) - (8)].d));
double d = List_Nbr(ViewData->T2C);
List_Add(ViewData->T2D, &d);
{
for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c))+1; i++) List_Add(ViewData->T3C, &(yyvsp[(1) - (1)].c)[i]);
Free((yyvsp[(1) - (1)].c));
;}
break;
case 47:
{
for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c))+1; i++) List_Add(ViewData->T3C, &(yyvsp[(3) - (3)].c)[i]);
Free((yyvsp[(3) - (3)].c));
;}
break;
case 48:
{
List_Add(ViewData->T3D, &(yyvsp[(3) - (10)].d)); List_Add(ViewData->T3D, &(yyvsp[(5) - (10)].d));
List_Add(ViewData->T3D, &(yyvsp[(7) - (10)].d)); List_Add(ViewData->T3D, &(yyvsp[(9) - (10)].d));
double d = List_Nbr(ViewData->T3C);
List_Add(ViewData->T3D, &d);
{
ViewData->adaptive = new Adaptive_Post_View(ViewData, (yyvsp[(3) - (8)].l), (yyvsp[(6) - (8)].l));
;}
break;
case 51:
{
ViewData->adaptive = new Adaptive_Post_View(ViewData, (yyvsp[(3) - (14)].l), (yyvsp[(6) - (14)].l), (yyvsp[(9) - (14)].l), (yyvsp[(12) - (14)].l));
;}
break;
case 52:

Christophe Geuzaine
committed
}
yymsg(GERROR, "Unknown variable '%s'", (yyvsp[(1) - (4)].c));
Free((yyvsp[(1) - (4)].c));
switch((yyvsp[(2) - (4)].i)){
case 0 : *pd = (yyvsp[(3) - (4)].d); break;
case 1 : *pd += (yyvsp[(3) - (4)].d); break;
case 2 : *pd -= (yyvsp[(3) - (4)].d); break;
case 3 : *pd *= (yyvsp[(3) - (4)].d); break;

Christophe Geuzaine
committed
case 4 :
if((yyvsp[(3) - (4)].d)) *pd /= (yyvsp[(3) - (4)].d);
else yymsg(GERROR, "Division by zero in '%s /= %g'", (yyvsp[(1) - (4)].c), (yyvsp[(3) - (4)].d));

Christophe Geuzaine
committed
break;
}
List_Put(TheSymbol.val, (int)(yyvsp[(3) - (7)].d), &(yyvsp[(6) - (7)].d));

Christophe Geuzaine
committed
}
yymsg(GERROR, "Unknown variable '%s'", (yyvsp[(1) - (7)].c));
Free((yyvsp[(1) - (7)].c));
if((pd = (double*)List_Pointer_Test(pSymbol->val, (int)(yyvsp[(3) - (7)].d)))){
switch((yyvsp[(5) - (7)].i)){
case 0 : *pd = (yyvsp[(6) - (7)].d); break;
case 1 : *pd += (yyvsp[(6) - (7)].d); break;
case 2 : *pd -= (yyvsp[(6) - (7)].d); break;
case 3 : *pd *= (yyvsp[(6) - (7)].d); break;

Christophe Geuzaine
committed
case 4 :
if((yyvsp[(6) - (7)].d)) *pd /= (yyvsp[(6) - (7)].d);
else yymsg(GERROR, "Division by zero in '%s[%d] /= %g'", (yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].d));

Christophe Geuzaine
committed
break;
}
}
else{
if(!(yyvsp[(5) - (7)].i))
List_Put(pSymbol->val, (int)(yyvsp[(3) - (7)].d), &(yyvsp[(6) - (7)].d));

Christophe Geuzaine
committed
else
yymsg(GERROR, "Uninitialized variable '%s[%d]'", (yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d));

Christophe Geuzaine
committed
}
{
if(List_Nbr((yyvsp[(4) - (9)].l)) != List_Nbr((yyvsp[(8) - (9)].l))){

Christophe Geuzaine
committed
yymsg(GERROR, "Incompatible array dimensions in affectation");
for(int i = 0; i < List_Nbr((yyvsp[(4) - (9)].l)); i++){
List_Put(TheSymbol.val, (int)(*(double*)List_Pointer((yyvsp[(4) - (9)].l), i)),
(double*)List_Pointer((yyvsp[(8) - (9)].l), i));
yymsg(GERROR, "Unknown variable '%s'", (yyvsp[(1) - (9)].c));
Free((yyvsp[(1) - (9)].c));
for(int i = 0; i < List_Nbr((yyvsp[(4) - (9)].l)); i++){
int j = (int)(*(double*)List_Pointer((yyvsp[(4) - (9)].l), i));
double d = *(double*)List_Pointer((yyvsp[(8) - (9)].l), i);
if((pd = (double*)List_Pointer_Test(pSymbol->val, j))){
case 0 : *pd = d; break;
case 1 : *pd += d; break;
case 2 : *pd -= d; break;
case 3 : *pd *= d; break;
if((yyvsp[(8) - (9)].l)) *pd /= d;
else yymsg(GERROR, "Division by zero in '%s[%d] /= %g'", (yyvsp[(1) - (9)].c), j, d);
List_Put(pSymbol->val, j, &d);
else
yymsg(GERROR, "Uninitialized variable '%s[%d]'", (yyvsp[(1) - (9)].c), j);
List_Delete((yyvsp[(4) - (9)].l));
List_Delete((yyvsp[(8) - (9)].l));
;}
break;
case 64:
if(!(pSymbol = (Symbol*)Tree_PQuery(Symbol_T, &TheSymbol))){
TheSymbol.val = List_Create(5, 5, sizeof(double));
}
else{
List_Reset(pSymbol->val);
List_Copy((yyvsp[(5) - (6)].l), pSymbol->val);
Free((yyvsp[(1) - (6)].c));
List_Delete((yyvsp[(5) - (6)].l));
;}
break;
case 65:
Symbol *pSymbol;
if(!(pSymbol = (Symbol*)Tree_PQuery(Symbol_T, &TheSymbol))){
TheSymbol.val = List_Create(5, 5, sizeof(double));
for(int i = 0; i < List_Nbr((yyvsp[(5) - (6)].l)); i++)
List_Add(pSymbol->val, List_Pointer((yyvsp[(5) - (6)].l), i));
Free((yyvsp[(1) - (6)].c));
}
List_Delete((yyvsp[(5) - (6)].l));
;}
break;
case 66:
*(double*)List_Pointer_Fast(pSymbol->val, 0) += (yyvsp[(2) - (3)].i);
Free((yyvsp[(1) - (3)].c));
;}
break;
case 67:
if((pd = (double*)List_Pointer_Test(pSymbol->val, (int)(yyvsp[(3) - (6)].d))))
*pd += (yyvsp[(5) - (6)].i);
yymsg(GERROR, "Uninitialized variable '%s[%d]'", (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d));
Free((yyvsp[(1) - (6)].c));
;}
break;
case 68:
const char* (*pStrOpt)(int num, int action, const char *value);
if(!(pStrCat = Get_StringOptionCategory((yyvsp[(1) - (6)].c))))
yymsg(GERROR, "Unknown string option class '%s'", (yyvsp[(1) - (6)].c));
if(!(pStrOpt = (const char *(*) (int, int, const char *))
Get_StringOption((yyvsp[(3) - (6)].c), pStrCat)))
yymsg(GERROR, "Unknown string option '%s.%s'", (yyvsp[(1) - (6)].c), (yyvsp[(3) - (6)].c));
Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(3) - (6)].c)); //FIXME: somtimes leak $5
;}
break;
case 70:
#line 779 "Gmsh.y"
const char* (*pStrOpt)(int num, int action, const char *value);
if(!(pStrCat = Get_StringOptionCategory((yyvsp[(1) - (9)].c))))
yymsg(GERROR, "Unknown string option class '%s'", (yyvsp[(1) - (9)].c));
if(!(pStrOpt = (const char *(*) (int, int, const char *))
Get_StringOption((yyvsp[(6) - (9)].c), pStrCat)))
yymsg(GERROR, "Unknown string option '%s[%d].%s'", (yyvsp[(1) - (9)].c), (int)(yyvsp[(3) - (9)].d), (yyvsp[(6) - (9)].c));
pStrOpt((int)(yyvsp[(3) - (9)].d), GMSH_SET|GMSH_GUI, (yyvsp[(8) - (9)].c));
Free((yyvsp[(1) - (9)].c)); Free((yyvsp[(6) - (9)].c)); //FIXME: somtimes leak $8
;}
break;
case 71:
#line 797 "Gmsh.y"
double (*pNumOpt)(int num, int action, double value);
StringXNumber *pNumCat;
if(!(pNumCat = Get_NumberOptionCategory((yyvsp[(1) - (6)].c))))
yymsg(GERROR, "Unknown numeric option class '%s'", (yyvsp[(1) - (6)].c));
if(!(pNumOpt = (double (*) (int, int, double))Get_NumberOption((yyvsp[(3) - (6)].c), pNumCat)))
yymsg(GERROR, "Unknown numeric option '%s.%s'", (yyvsp[(1) - (6)].c), (yyvsp[(3) - (6)].c));
switch((yyvsp[(4) - (6)].i)){
case 0 : d = (yyvsp[(5) - (6)].d); break;
case 1 : d = pNumOpt(0, GMSH_GET, 0) + (yyvsp[(5) - (6)].d); break;
case 2 : d = pNumOpt(0, GMSH_GET, 0) - (yyvsp[(5) - (6)].d); break;
case 3 : d = pNumOpt(0, GMSH_GET, 0) * (yyvsp[(5) - (6)].d); break;

Christophe Geuzaine
committed
case 4 :
if((yyvsp[(5) - (6)].d)) d = pNumOpt(0, GMSH_GET, 0) / (yyvsp[(5) - (6)].d);
else yymsg(GERROR, "Division by zero in '%s.%s /= %g'", (yyvsp[(1) - (6)].c), (yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d));

Christophe Geuzaine
committed
break;
}
Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(3) - (6)].c));
;}
break;
case 72:
#line 823 "Gmsh.y"
double (*pNumOpt)(int num, int action, double value);
StringXNumber *pNumCat;
if(!(pNumCat = Get_NumberOptionCategory((yyvsp[(1) - (9)].c))))
yymsg(GERROR, "Unknown numeric option class '%s'", (yyvsp[(1) - (9)].c));
if(!(pNumOpt = (double (*) (int, int, double))Get_NumberOption((yyvsp[(6) - (9)].c), pNumCat)))
yymsg(GERROR, "Unknown numeric option '%s[%d].%s'", (yyvsp[(1) - (9)].c), (int)(yyvsp[(3) - (9)].d), (yyvsp[(6) - (9)].c));
switch((yyvsp[(7) - (9)].i)){
case 0 : d = (yyvsp[(8) - (9)].d); break;
case 1 : d = pNumOpt((int)(yyvsp[(3) - (9)].d), GMSH_GET, 0) + (yyvsp[(8) - (9)].d); break;
case 2 : d = pNumOpt((int)(yyvsp[(3) - (9)].d), GMSH_GET, 0) - (yyvsp[(8) - (9)].d); break;
case 3 : d = pNumOpt((int)(yyvsp[(3) - (9)].d), GMSH_GET, 0) * (yyvsp[(8) - (9)].d); break;

Christophe Geuzaine
committed
case 4 :
if((yyvsp[(8) - (9)].d)) d = pNumOpt((int)(yyvsp[(3) - (9)].d), GMSH_GET, 0) / (yyvsp[(8) - (9)].d);

Christophe Geuzaine
committed
else yymsg(GERROR, "Division by zero in '%s[%d].%s /= %g'",
(yyvsp[(1) - (9)].c), (int)(yyvsp[(3) - (9)].d), (yyvsp[(6) - (9)].c), (yyvsp[(8) - (9)].d));

Christophe Geuzaine
committed
break;
}
Free((yyvsp[(1) - (9)].c)); Free((yyvsp[(6) - (9)].c));
;}
break;
case 73:
#line 850 "Gmsh.y"
double (*pNumOpt)(int num, int action, double value);
StringXNumber *pNumCat;
if(!(pNumCat = Get_NumberOptionCategory((yyvsp[(1) - (5)].c))))
yymsg(GERROR, "Unknown numeric option class '%s'", (yyvsp[(1) - (5)].c));
if(!(pNumOpt = (double (*) (int, int, double))Get_NumberOption((yyvsp[(3) - (5)].c), pNumCat)))
yymsg(GERROR, "Unknown numeric option '%s.%s'", (yyvsp[(1) - (5)].c), (yyvsp[(3) - (5)].c));

Christophe Geuzaine
committed
else
pNumOpt(0, GMSH_SET|GMSH_GUI, pNumOpt(0, GMSH_GET, 0)+(yyvsp[(4) - (5)].i));
Free((yyvsp[(1) - (5)].c)); Free((yyvsp[(3) - (5)].c));
;}
break;
case 74:
#line 864 "Gmsh.y"
double (*pNumOpt)(int num, int action, double value);
StringXNumber *pNumCat;
if(!(pNumCat = Get_NumberOptionCategory((yyvsp[(1) - (8)].c))))
yymsg(GERROR, "Unknown numeric option class '%s'", (yyvsp[(1) - (8)].c));
if(!(pNumOpt = (double (*) (int, int, double))Get_NumberOption((yyvsp[(6) - (8)].c), pNumCat)))
yymsg(GERROR, "Unknown numeric option '%s[%d].%s'", (yyvsp[(1) - (8)].c), (int)(yyvsp[(3) - (8)].d), (yyvsp[(6) - (8)].c));

Christophe Geuzaine
committed
else
pNumOpt((int)(yyvsp[(3) - (8)].d), GMSH_SET|GMSH_GUI, pNumOpt((int)(yyvsp[(3) - (8)].d), GMSH_GET, 0)+(yyvsp[(7) - (8)].i));
Free((yyvsp[(1) - (8)].c)); Free((yyvsp[(6) - (8)].c));
;}
break;
case 75:
#line 881 "Gmsh.y"
unsigned int (*pColOpt)(int num, int action, unsigned int value);
StringXColor *pColCat;
if(!(pColCat = Get_ColorOptionCategory((yyvsp[(1) - (8)].c))))
yymsg(GERROR, "Unknown color option class '%s'", (yyvsp[(1) - (8)].c));
if(!(pColOpt = (unsigned int (*) (int, int, unsigned int))
Get_ColorOption((yyvsp[(5) - (8)].c), pColCat)))
yymsg(GERROR, "Unknown color option '%s.Color.%s'", (yyvsp[(1) - (8)].c), (yyvsp[(5) - (8)].c));

Christophe Geuzaine
committed
else
Free((yyvsp[(1) - (8)].c)); Free((yyvsp[(5) - (8)].c));
;}
break;
case 76:
#line 896 "Gmsh.y"
unsigned int (*pColOpt)(int num, int action, unsigned int value);
StringXColor *pColCat;
if(!(pColCat = Get_ColorOptionCategory((yyvsp[(1) - (11)].c))))
yymsg(GERROR, "Unknown color option class '%s'", (yyvsp[(1) - (11)].c));
if(!(pColOpt = (unsigned int (*) (int, int, unsigned int))
Get_ColorOption((yyvsp[(8) - (11)].c), pColCat)))
yymsg(GERROR, "Unknown color option '%s[%d].Color.%s'", (yyvsp[(1) - (11)].c), (int)(yyvsp[(3) - (11)].d), (yyvsp[(8) - (11)].c));

Christophe Geuzaine
committed
else
pColOpt((int)(yyvsp[(3) - (11)].d), GMSH_SET|GMSH_GUI, (yyvsp[(10) - (11)].u));
}
Free((yyvsp[(1) - (11)].c)); Free((yyvsp[(8) - (11)].c));
;}
break;
case 77:
#line 914 "Gmsh.y"
GmshColorTable *ct = Get_ColorTable(0);

Christophe Geuzaine
committed
yymsg(GERROR, "View[%d] does not exist", 0);

Christophe Geuzaine
committed
yymsg(GERROR, "Too many (%d>%d) colors in View[%d].ColorTable",
ct->size, COLORTABLE_NBMAX_COLOR, 0);
for(int i = 0; i < ct->size; i++) List_Read((yyvsp[(5) - (6)].l), i, &ct->table[i]);
if(ct->size == 1){
ct->size = 2;
ct->table[1] = ct->table[0];
}
Free((yyvsp[(1) - (6)].c));
List_Delete((yyvsp[(5) - (6)].l));
;}
break;
case 78:
#line 934 "Gmsh.y"
{
GmshColorTable *ct = Get_ColorTable((int)(yyvsp[(3) - (9)].d));

Christophe Geuzaine
committed
if(!ct)
yymsg(GERROR, "View[%d] does not exist", (int)(yyvsp[(3) - (9)].d));

Christophe Geuzaine
committed
if(ct->size > COLORTABLE_NBMAX_COLOR)

Christophe Geuzaine
committed
yymsg(GERROR, "Too many (%d>%d) colors in View[%d].ColorTable",

Christophe Geuzaine
committed
else
for(int i = 0; i < ct->size; i++) List_Read((yyvsp[(8) - (9)].l), i, &ct->table[i]);
if(ct->size == 1){
ct->size = 2;
ct->table[1] = ct->table[0];
}
}
Free((yyvsp[(1) - (9)].c));
List_Delete((yyvsp[(8) - (9)].l));
;}
break;
case 79:
#line 957 "Gmsh.y"
GMSH_PluginManager::instance()->setPluginOption((yyvsp[(3) - (9)].c), (yyvsp[(6) - (9)].c), (yyvsp[(8) - (9)].d));
yymsg(GERROR, "Unknown option '%s' or plugin '%s'", (yyvsp[(6) - (9)].c), (yyvsp[(3) - (9)].c));
Free((yyvsp[(3) - (9)].c)); Free((yyvsp[(6) - (9)].c));
;}
break;
case 80:
#line 967 "Gmsh.y"
GMSH_PluginManager::instance()->setPluginOption((yyvsp[(3) - (9)].c), (yyvsp[(6) - (9)].c), (yyvsp[(8) - (9)].c));
yymsg(GERROR, "Unknown option '%s' or plugin '%s'", (yyvsp[(6) - (9)].c), (yyvsp[(3) - (9)].c));
Free((yyvsp[(3) - (9)].c)); Free((yyvsp[(6) - (9)].c)); // FIXME: sometimes leak $8
;}
break;
case 81:
#line 982 "Gmsh.y"
{
(yyval.i) = (int)(yyvsp[(1) - (1)].d);
;}
break;
case 82:
#line 986 "Gmsh.y"
{
(yyval.i) = GModel::current()->setPhysicalName
(std::string((yyvsp[(1) - (1)].c)), ++GModel::current()->getGEOInternals()->MaxPhysicalNum);
Free((yyvsp[(1) - (1)].c));
;}
break;
case 83:
#line 999 "Gmsh.y"
double x = CTX.geom.scaling_factor * (yyvsp[(6) - (7)].v)[0];
double y = CTX.geom.scaling_factor * (yyvsp[(6) - (7)].v)[1];
double z = CTX.geom.scaling_factor * (yyvsp[(6) - (7)].v)[2];
double lc = CTX.geom.scaling_factor * (yyvsp[(6) - (7)].v)[3];
v = Create_Vertex(num, x, y, z, lc, 1.0);
else
v = Create_Vertex(num, x, y, myGmshSurface, lc);
(yyval.s).Type = MSH_POINT;
(yyval.s).Num = num;
;}
break;
case 84:
#line 1021 "Gmsh.y"
yymsg(GERROR, "Physical point %d already exists", num);
}
else{
PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_POINT, temp);
List_Delete(temp);
List_Add(GModel::current()->getGEOInternals()->PhysicalGroups, &p);
List_Delete((yyvsp[(7) - (8)].l));
(yyval.s).Type = MSH_PHYSICAL_POINT;
(yyval.s).Num = num;
;}
break;
case 85:
#line 1037 "Gmsh.y"
AttractorField *att = new AttractorField();
Vertex *v = FindPoint((int)d);
if(v)
att->addPoint(v->Pos.X, v->Pos.Y, v->Pos.Z);
else{
if(gv)
att->addPoint(gv->x(), gv->y(), gv->z());
}
}
att->buildFastSearchStructures();
(yyval.s).Type = 0;
(yyval.s).Num = 0;
;}
break;
case 86:
#line 1058 "Gmsh.y"
{
fields.insert(new LatLonField(fields.get((int)(yyvsp[(7) - (8)].d))), (int)(yyvsp[(4) - (8)].d));
(yyval.s).Type = 0;
(yyval.s).Num = 0;
;}
break;
case 87:
#line 1065 "Gmsh.y"
fields.insert(new PostViewField(PView::list[index]), (int)(yyvsp[(4) - (8)].d));
yymsg(GERROR, "Field %i error, view %i does not exist", (int)(yyvsp[(4) - (8)].d), (int)(yyvsp[(7) - (8)].d));
(yyval.s).Type = 0;
(yyval.s).Num = 0;
;}
break;
case 88:
#line 1076 "Gmsh.y"
double pars[] = {0, CTX.lc/10, CTX.lc, CTX.lc/100, CTX.lc/20};
if(i > 4)
yymsg(GERROR, "Too many parameters for Thresold Field (max=5)");
else
}
fields.insert(new ThresholdField(fields.get((int)pars[0]), pars[1],
(yyval.s).Type = 0;
(yyval.s).Num = 0;
;}
break;
case 89:
#line 1091 "Gmsh.y"
fields.insert(new FunctionField(flist,(yyvsp[(7) - (8)].c)), (int)(yyvsp[(4) - (8)].d));
(yyval.s).Type = 0;
(yyval.s).Num = 0;
;}
break;
case 90:
#line 1099 "Gmsh.y"
std::list<Field*> *flist = new std::list<Field*>;
flist->resize(0);
fields.insert(new FunctionField(flist,(yyvsp[(7) - (9)].c)), (int)(yyvsp[(4) - (9)].d));
(yyval.s).Type = 0;
(yyval.s).Num = 0;
;}
break;
case 91:
#line 1114 "Gmsh.y"
{
fields.insert(new StructuredField((yyvsp[(7) - (8)].c)), (int)(yyvsp[(4) - (8)].d));
(yyval.s).Type = 0;
(yyval.s).Num = 0;
;}
break;
case 92:
#line 1121 "Gmsh.y"
BGMAddField(fields.get((int)id));
(yyval.s).Type = 0;
(yyval.s).Num = 0;
;}
break;
case 93:
#line 1133 "Gmsh.y"
double pars[] = { CTX.lc/10, CTX.lc/100., CTX.lc/20, 1, 3 };
if(i > 4)
yymsg(GERROR, "Too many paramaters for attractor line (max = 5)");
else
}
// treshold attractor: first parameter is the treshold, next two
// are the in and out size fields, last is transition factor
AttractorField *attractor = new AttractorField();
fields.insert(attractor);
Field *threshold = new ThresholdField(attractor, pars[0], pars[0] * pars[4],
pars[1], pars[2]);
fields.insert(threshold);
BGMAddField(threshold);
Vertex *v = FindPoint((int)d);
if(v)
attractor->addPoint(v->Pos.X, v->Pos.Y, v->Pos.Z);
attractor->addPoint(gv->x(), gv->y(), gv->z());
attractor->buildFastSearchStructures();
(yyval.s).Type = 0;
(yyval.s).Num = 0;
;}
break;
case 94:
#line 1167 "Gmsh.y"
double pars[] = { CTX.lc/10, CTX.lc/100., CTX.lc/20, 10, 3 };
if(i > 4)
yymsg(GERROR, "Too many paramaters for attractor line (max = 5)");
else
}
// treshold attractor: first parameter is the treshold, next two
// are the in and out size fields, last is transition factor
AttractorField *att = new AttractorField();
fields.insert(att);
Field *threshold = new ThresholdField(att, pars[0], pars[0] * pars[4],
pars[1], pars[2]);
fields.insert(threshold);
BGMAddField(threshold);
Curve *c = FindCurve((int)d);
if(c){
att->addCurve(c, (int)pars[3]);
}
else{
if(ge){
att->addGEdge(ge, (int)pars[3]);
}
}