Newer
Older
ViewElementIdx = 7; ViewNumNodes = 6; ViewNumComp = 3;
ViewValueList = View->VT2; ViewNumList = &View->NbVT2;
}
ViewElementIdx = 8; ViewNumNodes = 6; ViewNumComp = 9;
ViewValueList = View->TT2; ViewNumList = &View->NbTT2;
}
ViewElementIdx = 9; ViewNumNodes = 9; ViewNumComp = 1;
ViewValueList = View->SQ2; ViewNumList = &View->NbSQ2;
}
ViewElementIdx = 10; ViewNumNodes = 9; ViewNumComp = 3;
ViewValueList = View->VQ2; ViewNumList = &View->NbVQ2;
}
ViewElementIdx = 11; ViewNumNodes = 9; ViewNumComp = 9;
ViewValueList = View->TQ2; ViewNumList = &View->NbTQ2;
}
ViewElementIdx = 12; ViewNumNodes = 10; ViewNumComp = 1;
ViewValueList = View->SS2; ViewNumList = &View->NbSS2;
}
ViewElementIdx = 13; ViewNumNodes = 10; ViewNumComp = 3;
ViewValueList = View->VS2; ViewNumList = &View->NbVS2;
}
ViewElementIdx = 14; ViewNumNodes = 10; ViewNumComp = 9;
ViewValueList = View->TS2; ViewNumList = &View->NbTS2;
}
ViewElementIdx = 15; ViewNumNodes = 27; ViewNumComp = 1;
ViewValueList = View->SH2; ViewNumList = &View->NbSH2;
}
ViewElementIdx = 16; ViewNumNodes = 27; ViewNumComp = 3;
ViewValueList = View->VH2; ViewNumList = &View->NbVH2;
}
ViewElementIdx = 17; ViewNumNodes = 27; ViewNumComp = 9;
ViewValueList = View->TH2; ViewNumList = &View->NbTH2;
}
ViewElementIdx = 18; ViewNumNodes = 18; ViewNumComp = 1;
ViewValueList = View->SI2; ViewNumList = &View->NbSI2;
}
ViewElementIdx = 19; ViewNumNodes = 18; ViewNumComp = 3;
ViewValueList = View->VI2; ViewNumList = &View->NbVI2;
}
ViewElementIdx = 20; ViewNumNodes = 18; ViewNumComp = 9;
ViewValueList = View->TI2; ViewNumList = &View->NbTI2;
}
ViewElementIdx = 21; ViewNumNodes = 14; ViewNumComp = 1;
ViewValueList = View->SY2; ViewNumList = &View->NbSY2;
}
ViewElementIdx = 22; ViewNumNodes = 14; ViewNumComp = 3;
ViewValueList = View->VY2; ViewNumList = &View->NbVY2;
}
ViewElementIdx = 23; ViewNumNodes = 14; ViewNumComp = 9;
ViewValueList = View->TY2; ViewNumList = &View->NbTY2;
}
else{
ViewElementIdx = -1; ViewNumNodes = 0; ViewNumComp = 0;
ViewValueList = NULL; ViewNumList = NULL;
}
if(ViewValueList){
if(ViewCoordIdx != 3 * ViewNumNodes){
yymsg(GERROR, "Wrong number of node coordinates (%d != %d)",
ViewCoordIdx, 3 * ViewNumNodes);
double d = 0;
for(int i = 0; i < 3 * ViewNumNodes; i++)
List_Add(ViewValueList, &d);
}
else{
for(int i = 0; i < 3; i++)
for(int j = 0; j < ViewNumNodes; j++)
List_Add(ViewValueList, &ViewCoord[3*j+i]);
}
ViewNumListTmp = List_Nbr(ViewValueList);
}
if(ViewValueList){
if((List_Nbr(ViewValueList) - ViewNumListTmp) % (ViewNumComp * ViewNumNodes))
ViewErrorFlags[ViewElementIdx]++;
(*ViewNumList)++;
}
{
for(int i = 0; i < (int)strlen(yyvsp[0].c)+1; i++) List_Add(View->T2C, &yyvsp[0].c[i]);
Free(yyvsp[0].c);
;
break;}
{
for(int i = 0; i < (int)strlen(yyvsp[0].c)+1; i++) List_Add(View->T2C, &yyvsp[0].c[i]);
Free(yyvsp[0].c);
;
break;}
{
List_Add(View->T2D, &yyvsp[-5].d); List_Add(View->T2D, &yyvsp[-3].d);
List_Add(View->T2D, &yyvsp[-1].d);
{
for(int i = 0; i < (int)strlen(yyvsp[0].c)+1; i++) List_Add(View->T3C, &yyvsp[0].c[i]);
Free(yyvsp[0].c);
;
break;}
{
for(int i = 0; i < (int)strlen(yyvsp[0].c)+1; i++) List_Add(View->T3C, &yyvsp[0].c[i]);
Free(yyvsp[0].c);
;
break;}
{
List_Add(View->T3D, &yyvsp[-7].d); List_Add(View->T3D, &yyvsp[-5].d);
List_Add(View->T3D, &yyvsp[-3].d); List_Add(View->T3D, &yyvsp[-1].d);
{
View->adaptive = new Adaptive_Post_View(View, yyvsp[-5].l, yyvsp[-2].l);
;
break;}
{
(*View->Grains) [(int)yyvsp[-3].d] = yyvsp[-1].l;
;
break;}

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

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

Christophe Geuzaine
committed
break;
}

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

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

Christophe Geuzaine
committed
break;
}
}
else{
if(!yyvsp[-2].i)
List_Put(pSymbol->val, (int)yyvsp[-4].d, &yyvsp[-1].d);

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

Christophe Geuzaine
committed
}

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

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

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

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

Christophe Geuzaine
committed
else yymsg(GERROR, "Division by zero in '%s[%d].%s /= %g'",

Christophe Geuzaine
committed
break;
}
double (*pNumOpt)(int num, int action, double value);
StringXNumber *pNumCat;
if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-4].c)))
yymsg(GERROR, "Unknown numeric option class '%s'", yyvsp[-4].c);
if(!(pNumOpt = (double (*) (int, int, double))Get_NumberOption(yyvsp[-2].c, pNumCat)))
yymsg(GERROR, "Unknown numeric option '%s.%s'", yyvsp[-4].c, yyvsp[-2].c);

Christophe Geuzaine
committed
else
pNumOpt(0, GMSH_SET|GMSH_GUI, pNumOpt(0, GMSH_GET, 0)+yyvsp[-1].i);
double (*pNumOpt)(int num, int action, double value);
StringXNumber *pNumCat;
if(!(pNumCat = Get_NumberOptionCategory(yyvsp[-7].c)))
yymsg(GERROR, "Unknown numeric option class '%s'", yyvsp[-7].c);
if(!(pNumOpt = (double (*) (int, int, double))Get_NumberOption(yyvsp[-2].c, pNumCat)))
yymsg(GERROR, "Unknown numeric option '%s[%d].%s'", yyvsp[-7].c, (int)yyvsp[-5].d, yyvsp[-2].c);

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

Christophe Geuzaine
committed
else
unsigned int (*pColOpt)(int num, int action, unsigned int value);
StringXColor *pColCat;
if(!(pColCat = Get_ColorOptionCategory(yyvsp[-10].c)))
yymsg(GERROR, "Unknown color option class '%s'", yyvsp[-10].c);
if(!(pColOpt = (unsigned int (*) (int, int, unsigned int))Get_ColorOption(yyvsp[-3].c, pColCat)))
yymsg(GERROR, "Unknown color option '%s[%d].Color.%s'", yyvsp[-10].c, (int)yyvsp[-8].d, yyvsp[-3].c);

Christophe Geuzaine
committed
else
}
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[-1].l, i, &ct->table[i]);
if(ct->size == 1){
ct->size = 2;
ct->table[1] = ct->table[0];
}
Free(yyvsp[-5].c);
List_Delete(yyvsp[-1].l);
;
break;}

Christophe Geuzaine
committed
if(!ct)

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[-1].l, i, &ct->table[i]);
if(ct->size == 1){
ct->size = 2;
ct->table[1] = ct->table[0];
}
}
Free(yyvsp[-8].c);
List_Delete(yyvsp[-1].l);
;
break;}
GMSH_PluginManager::instance()->setPluginOption(yyvsp[-6].c, yyvsp[-3].c, yyvsp[-1].d);
yymsg(GERROR, "Unknown option '%s' or plugin '%s'", yyvsp[-3].c, yyvsp[-6].c);
GMSH_PluginManager::instance()->setPluginOption(yyvsp[-6].c, yyvsp[-3].c, yyvsp[-1].c);
yymsg(GERROR, "Unknown option '%s' or plugin '%s'", yyvsp[-3].c, yyvsp[-6].c);
Free(yyvsp[-6].c); Free(yyvsp[-3].c); // FIXME: sometimes leak $8
;
break;}
if(FindPoint(num, THEM)){
yymsg(GERROR, "Point %d already exists", num);
}
else{
Vertex *v = Create_Vertex(num, CTX.geom.scaling_factor * yyvsp[-1].v[0],
CTX.geom.scaling_factor * yyvsp[-1].v[1],
CTX.geom.scaling_factor * yyvsp[-1].v[2],
CTX.geom.scaling_factor * yyvsp[-1].v[3], 1.0);
yyval.s.Type = MSH_POINT;
yyval.s.Num = num;
;
break;}
if(FindPhysicalGroup(num, MSH_PHYSICAL_POINT, THEM)){
yymsg(GERROR, "Physical point %d already exists", num);
}
else{
PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_POINT, temp);
List_Delete(temp);
List_Add(THEM->PhysicalGroups, &p);
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_PHYSICAL_POINT;
yyval.s.Num = num;
;
break;}
Attractor *a = Create_Attractor(List_Nbr(THEM->Metric->Attractors)+1,
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
Curve *c = Create_Curve(num, MSH_SEGM_LINE, 1, temp, NULL,
-1, -1, 0., 1.);
Tree_Add(THEM->Curves, &c);
CreateReversedCurve(THEM, c);
List_Delete(temp);
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_SEGM_LINE;
yyval.s.Num = num;
;
break;}
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
}
else{
Curve *c = Create_Curve(num, MSH_SEGM_SPLN, 3, temp, NULL,
-1, -1, 0., 1.);
Tree_Add(THEM->Curves, &c);
CreateReversedCurve(THEM, c);
List_Delete(temp);
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_SEGM_SPLN;
yyval.s.Num = num;
;
break;}
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
}
else{
Curve *c = Create_Curve(num, MSH_SEGM_CIRC, 2, temp, NULL,
-1, -1, 0., 1.);
Tree_Add(THEM->Curves, &c);
CreateReversedCurve(THEM, c);
List_Delete(temp);
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_SEGM_CIRC;
yyval.s.Num = num;
;
break;}
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
}
else{
Curve *c = Create_Curve(num, MSH_SEGM_CIRC, 2, temp, NULL,
-1, -1, 0., 1.);
c->Circle.n[0] = yyvsp[-1].v[0];
c->Circle.n[1] = yyvsp[-1].v[1];
c->Circle.n[2] = yyvsp[-1].v[2];
End_Curve(c);
Tree_Add(THEM->Curves, &c);
Curve *rc = CreateReversedCurve(THEM, c);
rc->Circle.n[0] = yyvsp[-1].v[0];
rc->Circle.n[1] = yyvsp[-1].v[1];
rc->Circle.n[2] = yyvsp[-1].v[2];
List_Delete(yyvsp[-3].l);
yyval.s.Type = MSH_SEGM_CIRC;
yyval.s.Num = num;
;
break;}
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
}
else{
Curve *c = Create_Curve(num, MSH_SEGM_ELLI, 2, temp, NULL,
-1, -1, 0., 1.);
Tree_Add(THEM->Curves, &c);
CreateReversedCurve(THEM, c);
List_Delete(temp);
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_SEGM_ELLI;
yyval.s.Num = num;
;
break;}
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
}
else{
Curve *c = Create_Curve(num, MSH_SEGM_ELLI, 2, temp, NULL,
-1, -1, 0., 1.);
c->Circle.n[0] = yyvsp[-1].v[0];
c->Circle.n[1] = yyvsp[-1].v[1];
c->Circle.n[2] = yyvsp[-1].v[2];
End_Curve(c);
Tree_Add(THEM->Curves, &c);
Curve *rc = CreateReversedCurve(THEM, c);
rc->Circle.n[0] = yyvsp[-1].v[0];
rc->Circle.n[1] = yyvsp[-1].v[1];
rc->Circle.n[2] = yyvsp[-1].v[2];
List_Delete(yyvsp[-3].l);
yyval.s.Type = MSH_SEGM_ELLI;
yyval.s.Num = num;
;
break;}
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
}
else{
Curve *c = Create_Curve(num, MSH_SEGM_PARAMETRIC, 2, NULL, NULL,
-1, -1, yyvsp[-10].d, yyvsp[-8].d);
strcpy(c->functu, yyvsp[-6].c);
strcpy(c->functv, yyvsp[-4].c);
strcpy(c->functw, yyvsp[-2].c);
Tree_Add(THEM->Curves, &c);
CreateReversedCurve(THEM, c);
}
Free(yyvsp[-6].c); Free(yyvsp[-4].c); Free(yyvsp[-2].c);
yyval.s.Type = MSH_SEGM_PARAMETRIC;
yyval.s.Num = num;
;
break;}
{
int num = (int)yyvsp[-4].d;
if(List_Nbr(yyvsp[-1].l) < 4){
yymsg(GERROR, "Too few control points for BSpline %d (%d < 4)", num,
}
else{
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
}
else{
Curve *c = Create_Curve(num, MSH_SEGM_BSPLN, 2, temp, NULL,
-1, -1, 0., 1.);
Tree_Add(THEM->Curves, &c);
CreateReversedCurve(THEM, c);
List_Delete(temp);
}
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_SEGM_BSPLN;
yyval.s.Num = num;
;
break;}
{
int num = (int)yyvsp[-4].d;
if(List_Nbr(yyvsp[-1].l) < 4){
yymsg(GERROR, "Too few control points for Bezier curve %d (%d < 4)", num,
}
else{
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
}
else{
Curve *c = Create_Curve(num, MSH_SEGM_BEZIER, 2, temp, NULL,
-1, -1, 0., 1.);
Tree_Add(THEM->Curves, &c);
CreateReversedCurve(THEM, c);
List_Delete(temp);
}
}
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_SEGM_BEZIER;
yyval.s.Num = num;
;
break;}
{
int num = (int)yyvsp[-8].d;
if(List_Nbr(yyvsp[-5].l) + (int)yyvsp[-1].d + 1 != List_Nbr(yyvsp[-3].l)){
yymsg(GERROR, "Wrong definition of Nurbs Curve %d: "
"got %d knots, need N + D + 1 = %d + %d + 1 = %d",
(int)yyvsp[-8].d, List_Nbr(yyvsp[-3].l), List_Nbr(yyvsp[-5].l), (int)yyvsp[-1].d, List_Nbr(yyvsp[-5].l) + (int)yyvsp[-1].d + 1);
else{
if(FindCurve(num, THEM)){
yymsg(GERROR, "Curve %d already exists", num);
}
else{
List_T *temp = ListOfDouble2ListOfInt(yyvsp[-5].l);
Curve *c = Create_Curve(num, MSH_SEGM_NURBS, (int)yyvsp[-1].d, temp, yyvsp[-3].l,
-1, -1, 0., 1.);
Tree_Add(THEM->Curves, &c);
CreateReversedCurve(THEM, c);
List_Delete(temp);
}
}
List_Delete(yyvsp[-5].l);
List_Delete(yyvsp[-3].l);
yyval.s.Type = MSH_SEGM_NURBS;
yyval.s.Num = num;
;
break;}
if(FindEdgeLoop(num, THEM)){
yymsg(GERROR, "Line loop %d already exists", num);
sortEdgesInLoop(num, temp);
EdgeLoop *l = Create_EdgeLoop(num, temp);
Tree_Add(THEM->EdgeLoops, &l);
List_Delete(temp);
List_Delete(yyvsp[-1].l);
yyval.s.Type = MSH_SEGM_LOOP;
yyval.s.Num = num;
;
break;}
else{
Attractor *a = Create_Attractor(List_Nbr(THEM->Metric->Attractors)+1,
List_Add(THEM->Metric->Attractors, &a);
}
}
// dummy values
if(FindPhysicalGroup(num, MSH_PHYSICAL_LINE, THEM)){
yymsg(GERROR, "Physical line %d already exists", num);
}
else{
PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_LINE, temp);