diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index 8404d79a71539671beb14b093db732727e47197d..89e7de28cb5c610d578dcc50e648409b9d4b4f4c 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -324,7 +324,7 @@ /* Copy the first part of user declarations. */ #line 1 "Gmsh.y" -// $Id: Gmsh.tab.cpp,v 1.368 2008-06-12 09:31:36 geuzaine Exp $ +// $Id: Gmsh.tab.cpp,v 1.369 2008-06-23 11:32:06 remacle Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -434,7 +434,7 @@ typedef union YYSTYPE Shape s; List_T *l; } -/* Line 193 of yacc.c. */ +/* Line 187 of yacc.c. */ #line 439 "Gmsh.tab.cpp" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -498,7 +498,7 @@ typedef short int yytype_int16; #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS +# if YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -988,37 +988,37 @@ static const yytype_uint16 yyrline[] = 177, 181, 188, 193, 208, 221, 250, 264, 275, 290, 295, 296, 297, 298, 299, 303, 305, 310, 312, 318, 464, 317, 482, 489, 500, 499, 518, 525, 536, 535, - 553, 567, 587, 586, 600, 601, 602, 603, 604, 608, - 609, 616, 647, 686, 740, 757, 775, 786, 803, 810, - 825, 843, 869, 896, 910, 927, 942, 960, 980, 1003, - 1012, 1018, 1038, 1059, 1085, 1097, 1114, 1118, 1128, 1131, - 1149, 1171, 1187, 1209, 1227, 1245, 1263, 1289, 1307, 1333, - 1353, 1371, 1389, 1415, 1432, 1451, 1469, 1508, 1514, 1520, - 1527, 1552, 1577, 1593, 1613, 1631, 1648, 1669, 1674, 1679, - 1684, 1689, 1700, 1706, 1715, 1716, 1721, 1724, 1728, 1751, - 1774, 1797, 1825, 1834, 1838, 1853, 1869, 1886, 1900, 1906, - 1912, 1921, 1935, 1983, 2001, 2016, 2038, 2050, 2074, 2078, - 2083, 2088, 2100, 2117, 2134, 2161, 2188, 2219, 2227, 2233, - 2240, 2244, 2253, 2261, 2269, 2278, 2277, 2290, 2289, 2302, - 2301, 2314, 2313, 2325, 2324, 2340, 2347, 2354, 2361, 2368, - 2375, 2382, 2389, 2396, 2404, 2403, 2415, 2414, 2426, 2425, - 2437, 2436, 2448, 2447, 2459, 2458, 2470, 2469, 2481, 2480, - 2492, 2491, 2506, 2509, 2515, 2524, 2544, 2567, 2571, 2595, - 2613, 2631, 2649, 2678, 2713, 2718, 2745, 2759, 2772, 2789, - 2795, 2801, 2804, 2813, 2823, 2824, 2825, 2826, 2827, 2828, - 2829, 2830, 2831, 2838, 2839, 2840, 2841, 2842, 2843, 2844, - 2845, 2846, 2847, 2848, 2849, 2850, 2851, 2852, 2853, 2854, - 2855, 2856, 2857, 2858, 2859, 2860, 2861, 2862, 2863, 2864, - 2865, 2866, 2867, 2868, 2869, 2871, 2872, 2873, 2874, 2875, - 2876, 2877, 2878, 2879, 2880, 2881, 2882, 2883, 2884, 2885, - 2886, 2887, 2888, 2889, 2890, 2891, 2900, 2901, 2902, 2903, - 2904, 2905, 2906, 2910, 2926, 2941, 2961, 2974, 2987, 3010, - 3028, 3046, 3064, 3082, 3090, 3094, 3098, 3102, 3106, 3113, - 3117, 3121, 3125, 3132, 3137, 3145, 3150, 3154, 3159, 3163, - 3171, 3182, 3190, 3198, 3204, 3215, 3235, 3245, 3255, 3272, - 3299, 3304, 3308, 3312, 3325, 3329, 3341, 3348, 3369, 3373, - 3388, 3393, 3400, 3404, 3411, 3415, 3423, 3431, 3445, 3459, - 3463, 3482, 3505 + 553, 568, 588, 587, 601, 602, 603, 604, 605, 609, + 610, 617, 648, 687, 741, 758, 776, 787, 804, 811, + 826, 844, 870, 897, 911, 928, 943, 961, 981, 1004, + 1013, 1019, 1039, 1060, 1086, 1098, 1115, 1119, 1129, 1132, + 1150, 1172, 1188, 1210, 1228, 1246, 1264, 1290, 1308, 1334, + 1354, 1372, 1390, 1416, 1433, 1452, 1470, 1509, 1515, 1521, + 1528, 1553, 1578, 1594, 1614, 1632, 1649, 1670, 1675, 1680, + 1685, 1690, 1701, 1707, 1716, 1717, 1722, 1725, 1729, 1752, + 1775, 1798, 1826, 1835, 1839, 1854, 1870, 1887, 1901, 1907, + 1913, 1922, 1936, 1984, 2002, 2017, 2039, 2051, 2075, 2079, + 2084, 2089, 2101, 2118, 2135, 2162, 2189, 2220, 2228, 2234, + 2241, 2245, 2254, 2262, 2270, 2279, 2278, 2291, 2290, 2303, + 2302, 2315, 2314, 2326, 2325, 2341, 2348, 2355, 2362, 2369, + 2376, 2383, 2390, 2397, 2405, 2404, 2416, 2415, 2427, 2426, + 2438, 2437, 2449, 2448, 2460, 2459, 2471, 2470, 2482, 2481, + 2493, 2492, 2507, 2510, 2516, 2525, 2545, 2568, 2572, 2596, + 2614, 2632, 2650, 2679, 2714, 2719, 2746, 2760, 2773, 2790, + 2796, 2802, 2805, 2814, 2824, 2825, 2826, 2827, 2828, 2829, + 2830, 2831, 2832, 2839, 2840, 2841, 2842, 2843, 2844, 2845, + 2846, 2847, 2848, 2849, 2850, 2851, 2852, 2853, 2854, 2855, + 2856, 2857, 2858, 2859, 2860, 2861, 2862, 2863, 2864, 2865, + 2866, 2867, 2868, 2869, 2870, 2872, 2873, 2874, 2875, 2876, + 2877, 2878, 2879, 2880, 2881, 2882, 2883, 2884, 2885, 2886, + 2887, 2888, 2889, 2890, 2891, 2892, 2901, 2902, 2903, 2904, + 2905, 2906, 2907, 2911, 2927, 2942, 2962, 2975, 2988, 3011, + 3029, 3047, 3065, 3083, 3091, 3095, 3099, 3103, 3107, 3114, + 3118, 3122, 3126, 3133, 3138, 3146, 3151, 3155, 3160, 3164, + 3172, 3183, 3191, 3199, 3205, 3216, 3236, 3246, 3256, 3273, + 3300, 3305, 3309, 3313, 3326, 3330, 3342, 3349, 3370, 3374, + 3389, 3394, 3401, 3405, 3412, 3416, 3424, 3432, 3446, 3460, + 3464, 3483, 3506 }; #endif @@ -2918,7 +2918,7 @@ while (YYID (0)) we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ @@ -4153,6 +4153,7 @@ yyreduce: (ViewData->NbST || ViewData->NbVT) ? 3 : (ViewData->NbSQ || ViewData->NbVQ) ? 4 : (ViewData->NbSS || ViewData->NbVS) ? 6 : + (ViewData->NbSI || ViewData->NbVI) ? 9 : (ViewData->NbSH || ViewData->NbVH) ? 12 : 0; ViewData->setInterpolationScheme(type, (yyvsp[(3) - (8)].l), (yyvsp[(6) - (8)].l)); @@ -4161,7 +4162,7 @@ yyreduce: break; case 51: -#line 571 "Gmsh.y" +#line 572 "Gmsh.y" { #if !defined(HAVE_NO_POST) int type = @@ -4177,7 +4178,7 @@ yyreduce: break; case 52: -#line 587 "Gmsh.y" +#line 588 "Gmsh.y" { #if !defined(HAVE_NO_POST) ViewValueList = ViewData->Time; @@ -4186,48 +4187,48 @@ yyreduce: break; case 53: -#line 593 "Gmsh.y" +#line 594 "Gmsh.y" { ;} break; case 54: -#line 600 "Gmsh.y" +#line 601 "Gmsh.y" { (yyval.i) = 0; ;} break; case 55: -#line 601 "Gmsh.y" +#line 602 "Gmsh.y" { (yyval.i) = 1; ;} break; case 56: -#line 602 "Gmsh.y" +#line 603 "Gmsh.y" { (yyval.i) = 2; ;} break; case 57: -#line 603 "Gmsh.y" +#line 604 "Gmsh.y" { (yyval.i) = 3; ;} break; case 58: -#line 604 "Gmsh.y" +#line 605 "Gmsh.y" { (yyval.i) = 4; ;} break; case 59: -#line 608 "Gmsh.y" +#line 609 "Gmsh.y" { (yyval.i) = 1; ;} break; case 60: -#line 609 "Gmsh.y" +#line 610 "Gmsh.y" { (yyval.i) = -1; ;} break; case 61: -#line 617 "Gmsh.y" +#line 618 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(1) - (4)].c); @@ -4261,7 +4262,7 @@ yyreduce: break; case 62: -#line 648 "Gmsh.y" +#line 649 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(1) - (7)].c); @@ -4303,7 +4304,7 @@ yyreduce: break; case 63: -#line 687 "Gmsh.y" +#line 688 "Gmsh.y" { if(List_Nbr((yyvsp[(4) - (9)].l)) != List_Nbr((yyvsp[(8) - (9)].l))){ yymsg(0, "Incompatible array dimensions in affectation"); @@ -4360,7 +4361,7 @@ yyreduce: break; case 64: -#line 741 "Gmsh.y" +#line 742 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(1) - (6)].c); @@ -4380,7 +4381,7 @@ yyreduce: break; case 65: -#line 758 "Gmsh.y" +#line 759 "Gmsh.y" { // appends to the list Symbol TheSymbol; @@ -4401,7 +4402,7 @@ yyreduce: break; case 66: -#line 776 "Gmsh.y" +#line 777 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(1) - (3)].c); @@ -4415,7 +4416,7 @@ yyreduce: break; case 67: -#line 787 "Gmsh.y" +#line 788 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(1) - (6)].c); @@ -4434,14 +4435,14 @@ yyreduce: break; case 68: -#line 804 "Gmsh.y" +#line 805 "Gmsh.y" { Msg::Warning("Named string expressions not implemented yet"); ;} break; case 69: -#line 811 "Gmsh.y" +#line 812 "Gmsh.y" { const char* (*pStrOpt)(int num, int action, const char *value); StringXString *pStrCat; @@ -4459,7 +4460,7 @@ yyreduce: break; case 70: -#line 826 "Gmsh.y" +#line 827 "Gmsh.y" { const char* (*pStrOpt)(int num, int action, const char *value); StringXString *pStrCat; @@ -4477,7 +4478,7 @@ yyreduce: break; case 71: -#line 844 "Gmsh.y" +#line 845 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -4506,7 +4507,7 @@ yyreduce: break; case 72: -#line 870 "Gmsh.y" +#line 871 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -4536,7 +4537,7 @@ yyreduce: break; case 73: -#line 897 "Gmsh.y" +#line 898 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -4553,7 +4554,7 @@ yyreduce: break; case 74: -#line 911 "Gmsh.y" +#line 912 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -4570,7 +4571,7 @@ yyreduce: break; case 75: -#line 928 "Gmsh.y" +#line 929 "Gmsh.y" { unsigned int (*pColOpt)(int num, int action, unsigned int value); StringXColor *pColCat; @@ -4588,7 +4589,7 @@ yyreduce: break; case 76: -#line 943 "Gmsh.y" +#line 944 "Gmsh.y" { unsigned int (*pColOpt)(int num, int action, unsigned int value); StringXColor *pColCat; @@ -4606,7 +4607,7 @@ yyreduce: break; case 77: -#line 961 "Gmsh.y" +#line 962 "Gmsh.y" { GmshColorTable *ct = Get_ColorTable(0); if(!ct) @@ -4629,7 +4630,7 @@ yyreduce: break; case 78: -#line 981 "Gmsh.y" +#line 982 "Gmsh.y" { GmshColorTable *ct = Get_ColorTable((int)(yyvsp[(3) - (9)].d)); if(!ct) @@ -4652,7 +4653,7 @@ yyreduce: break; case 79: -#line 1004 "Gmsh.y" +#line 1005 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (5)].c),"Background")){ GModel::current()->getFields()->background_field = (int)(yyvsp[(4) - (5)].d); @@ -4664,7 +4665,7 @@ yyreduce: break; case 80: -#line 1013 "Gmsh.y" +#line 1014 "Gmsh.y" { if(!GModel::current()->getFields()->new_field((int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c))) yymsg(0, "Cannot create field %i of type '%s'", (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c)); @@ -4673,7 +4674,7 @@ yyreduce: break; case 81: -#line 1019 "Gmsh.y" +#line 1020 "Gmsh.y" { Field *field = GModel::current()->getFields()->get((int)(yyvsp[(3) - (9)].d)); if(field){ @@ -4696,7 +4697,7 @@ yyreduce: break; case 82: -#line 1039 "Gmsh.y" +#line 1040 "Gmsh.y" { Field *field = GModel::current()->getFields()->get((int)(yyvsp[(3) - (9)].d)); if(field){ @@ -4720,7 +4721,7 @@ yyreduce: break; case 83: -#line 1060 "Gmsh.y" +#line 1061 "Gmsh.y" { Field *field = GModel::current()->getFields()->get((int)(yyvsp[(3) - (11)].d)); if(field){ @@ -4746,7 +4747,7 @@ yyreduce: break; case 84: -#line 1086 "Gmsh.y" +#line 1087 "Gmsh.y" { #if !defined(HAVE_NO_POST) try { @@ -4761,7 +4762,7 @@ yyreduce: break; case 85: -#line 1098 "Gmsh.y" +#line 1099 "Gmsh.y" { #if !defined(HAVE_NO_POST) try { @@ -4776,14 +4777,14 @@ yyreduce: break; case 86: -#line 1115 "Gmsh.y" +#line 1116 "Gmsh.y" { (yyval.i) = (int)(yyvsp[(1) - (1)].d); ;} break; case 87: -#line 1119 "Gmsh.y" +#line 1120 "Gmsh.y" { (yyval.i) = GModel::current()->setPhysicalName (std::string((yyvsp[(1) - (1)].c)), ++GModel::current()->getGEOInternals()->MaxPhysicalNum); @@ -4792,14 +4793,14 @@ yyreduce: break; case 88: -#line 1128 "Gmsh.y" +#line 1129 "Gmsh.y" { (yyval.l) = 0; ;} break; case 89: -#line 1132 "Gmsh.y" +#line 1133 "Gmsh.y" { (yyval.l) = List_Create(4, 4, sizeof(double)); Vertex *v = FindPoint((int)(yyvsp[(4) - (5)].d)); @@ -4814,7 +4815,7 @@ yyreduce: break; case 90: -#line 1150 "Gmsh.y" +#line 1151 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindPoint(num)){ @@ -4839,7 +4840,7 @@ yyreduce: break; case 91: -#line 1172 "Gmsh.y" +#line 1173 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].i); if(FindPhysicalGroup(num, MSH_PHYSICAL_POINT)){ @@ -4858,7 +4859,7 @@ yyreduce: break; case 92: -#line 1188 "Gmsh.y" +#line 1189 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ double d; @@ -4880,7 +4881,7 @@ yyreduce: break; case 93: -#line 1210 "Gmsh.y" +#line 1211 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -4901,7 +4902,7 @@ yyreduce: break; case 94: -#line 1228 "Gmsh.y" +#line 1229 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -4922,7 +4923,7 @@ yyreduce: break; case 95: -#line 1246 "Gmsh.y" +#line 1247 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -4943,7 +4944,7 @@ yyreduce: break; case 96: -#line 1264 "Gmsh.y" +#line 1265 "Gmsh.y" { int num = (int)(yyvsp[(3) - (9)].d); if(FindCurve(num)){ @@ -4972,7 +4973,7 @@ yyreduce: break; case 97: -#line 1290 "Gmsh.y" +#line 1291 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -4993,7 +4994,7 @@ yyreduce: break; case 98: -#line 1308 "Gmsh.y" +#line 1309 "Gmsh.y" { int num = (int)(yyvsp[(3) - (9)].d); if(FindCurve(num)){ @@ -5022,7 +5023,7 @@ yyreduce: break; case 99: -#line 1335 "Gmsh.y" +#line 1336 "Gmsh.y" { int num = (int)(yyvsp[(3) - (17)].d); if(FindCurve(num)){ @@ -5044,7 +5045,7 @@ yyreduce: break; case 100: -#line 1354 "Gmsh.y" +#line 1355 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -5065,7 +5066,7 @@ yyreduce: break; case 101: -#line 1372 "Gmsh.y" +#line 1373 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindCurve(num)){ @@ -5086,7 +5087,7 @@ yyreduce: break; case 102: -#line 1390 "Gmsh.y" +#line 1391 "Gmsh.y" { int num = (int)(yyvsp[(3) - (11)].d); if(List_Nbr((yyvsp[(6) - (11)].l)) + (int)(yyvsp[(10) - (11)].d) + 1 != List_Nbr((yyvsp[(8) - (11)].l))){ @@ -5115,7 +5116,7 @@ yyreduce: break; case 103: -#line 1416 "Gmsh.y" +#line 1417 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindEdgeLoop(num)){ @@ -5135,7 +5136,7 @@ yyreduce: break; case 104: -#line 1433 "Gmsh.y" +#line 1434 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].i); if(FindPhysicalGroup(num, MSH_PHYSICAL_LINE)){ @@ -5154,7 +5155,7 @@ yyreduce: break; case 105: -#line 1452 "Gmsh.y" +#line 1453 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindSurface(num)){ @@ -5175,7 +5176,7 @@ yyreduce: break; case 106: -#line 1470 "Gmsh.y" +#line 1471 "Gmsh.y" { int num = (int)(yyvsp[(4) - (9)].d), type = 0; if(FindSurface(num)){ @@ -5217,7 +5218,7 @@ yyreduce: break; case 107: -#line 1509 "Gmsh.y" +#line 1510 "Gmsh.y" { myGmshSurface = 0; (yyval.s).Type = 0; @@ -5226,7 +5227,7 @@ yyreduce: break; case 108: -#line 1515 "Gmsh.y" +#line 1516 "Gmsh.y" { myGmshSurface = gmshSurface::getSurface((int)(yyvsp[(3) - (4)].d)); (yyval.s).Type = 0; @@ -5235,7 +5236,7 @@ yyreduce: break; case 109: -#line 1521 "Gmsh.y" +#line 1522 "Gmsh.y" { int num = (int)(yyvsp[(4) - (10)].d); myGmshSurface = gmshParametricSurface::NewParametricSurface(num, (yyvsp[(7) - (10)].c), (yyvsp[(8) - (10)].c), (yyvsp[(9) - (10)].c)); @@ -5245,7 +5246,7 @@ yyreduce: break; case 110: -#line 1528 "Gmsh.y" +#line 1529 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if (List_Nbr((yyvsp[(6) - (7)].l)) != 2){ @@ -5273,7 +5274,7 @@ yyreduce: break; case 111: -#line 1553 "Gmsh.y" +#line 1554 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if (List_Nbr((yyvsp[(6) - (7)].l)) != 2){ @@ -5301,7 +5302,7 @@ yyreduce: break; case 112: -#line 1578 "Gmsh.y" +#line 1579 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindSurfaceLoop(num)){ @@ -5320,7 +5321,7 @@ yyreduce: break; case 113: -#line 1594 "Gmsh.y" +#line 1595 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].i); if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){ @@ -5339,7 +5340,7 @@ yyreduce: break; case 114: -#line 1614 "Gmsh.y" +#line 1615 "Gmsh.y" { yymsg(0, "'Complex Volume' command is deprecated: use 'Volume' instead"); int num = (int)(yyvsp[(4) - (8)].d); @@ -5360,7 +5361,7 @@ yyreduce: break; case 115: -#line 1632 "Gmsh.y" +#line 1633 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindVolume(num)){ @@ -5380,7 +5381,7 @@ yyreduce: break; case 116: -#line 1649 "Gmsh.y" +#line 1650 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].i); if(FindPhysicalGroup(num, MSH_PHYSICAL_VOLUME)){ @@ -5399,7 +5400,7 @@ yyreduce: break; case 117: -#line 1670 "Gmsh.y" +#line 1671 "Gmsh.y" { TranslateShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(4) - (5)].l)); (yyval.l) = (yyvsp[(4) - (5)].l); @@ -5407,7 +5408,7 @@ yyreduce: break; case 118: -#line 1675 "Gmsh.y" +#line 1676 "Gmsh.y" { RotateShapes((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), (yyvsp[(10) - (11)].l)); (yyval.l) = (yyvsp[(10) - (11)].l); @@ -5415,7 +5416,7 @@ yyreduce: break; case 119: -#line 1680 "Gmsh.y" +#line 1681 "Gmsh.y" { SymmetryShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(2) - (5)].v)[3], (yyvsp[(4) - (5)].l)); (yyval.l) = (yyvsp[(4) - (5)].l); @@ -5423,7 +5424,7 @@ yyreduce: break; case 120: -#line 1685 "Gmsh.y" +#line 1686 "Gmsh.y" { DilatShapes((yyvsp[(3) - (9)].v)[0], (yyvsp[(3) - (9)].v)[1], (yyvsp[(3) - (9)].v)[2], (yyvsp[(5) - (9)].d), (yyvsp[(8) - (9)].l)); (yyval.l) = (yyvsp[(8) - (9)].l); @@ -5431,7 +5432,7 @@ yyreduce: break; case 121: -#line 1690 "Gmsh.y" +#line 1691 "Gmsh.y" { (yyval.l) = List_Create(3, 3, sizeof(Shape)); for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ @@ -5445,7 +5446,7 @@ yyreduce: break; case 122: -#line 1701 "Gmsh.y" +#line 1702 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); IntersectCurvesWithSurface((yyvsp[(4) - (9)].l), (int)(yyvsp[(8) - (9)].d), (yyval.l)); @@ -5454,7 +5455,7 @@ yyreduce: break; case 123: -#line 1707 "Gmsh.y" +#line 1708 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); BoundaryShapes((yyvsp[(3) - (4)].l), (yyval.l)); @@ -5463,31 +5464,31 @@ yyreduce: break; case 124: -#line 1715 "Gmsh.y" +#line 1716 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 125: -#line 1716 "Gmsh.y" +#line 1717 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 126: -#line 1721 "Gmsh.y" +#line 1722 "Gmsh.y" { (yyval.l) = List_Create(3, 3, sizeof(Shape)); ;} break; case 127: -#line 1725 "Gmsh.y" +#line 1726 "Gmsh.y" { List_Add((yyval.l), &(yyvsp[(2) - (2)].s)); ;} break; case 128: -#line 1729 "Gmsh.y" +#line 1730 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -5513,7 +5514,7 @@ yyreduce: break; case 129: -#line 1752 "Gmsh.y" +#line 1753 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -5539,7 +5540,7 @@ yyreduce: break; case 130: -#line 1775 "Gmsh.y" +#line 1776 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -5565,7 +5566,7 @@ yyreduce: break; case 131: -#line 1798 "Gmsh.y" +#line 1799 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -5591,7 +5592,7 @@ yyreduce: break; case 132: -#line 1826 "Gmsh.y" +#line 1827 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ Shape TheShape; @@ -5603,14 +5604,14 @@ yyreduce: break; case 133: -#line 1835 "Gmsh.y" +#line 1836 "Gmsh.y" { GModel::current()->getFields()->delete_field((int)(yyvsp[(4) - (6)].d)); ;} break; case 134: -#line 1839 "Gmsh.y" +#line 1840 "Gmsh.y" { #if !defined(HAVE_NO_POST) if(!strcmp((yyvsp[(2) - (6)].c), "View")){ @@ -5628,7 +5629,7 @@ yyreduce: break; case 135: -#line 1854 "Gmsh.y" +#line 1855 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Meshes") || !strcmp((yyvsp[(2) - (3)].c), "All")){ GModel::current()->destroy(); @@ -5647,7 +5648,7 @@ yyreduce: break; case 136: -#line 1870 "Gmsh.y" +#line 1871 "Gmsh.y" { #if !defined(HAVE_NO_POST) if(!strcmp((yyvsp[(2) - (4)].c), "Empty") && !strcmp((yyvsp[(3) - (4)].c), "Views")){ @@ -5662,7 +5663,7 @@ yyreduce: break; case 137: -#line 1887 "Gmsh.y" +#line 1888 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ Shape TheShape; @@ -5674,7 +5675,7 @@ yyreduce: break; case 138: -#line 1901 "Gmsh.y" +#line 1902 "Gmsh.y" { for(int i = 0; i < 4; i++) VisibilityShape((yyvsp[(2) - (3)].c), i, 1); @@ -5683,7 +5684,7 @@ yyreduce: break; case 139: -#line 1907 "Gmsh.y" +#line 1908 "Gmsh.y" { for(int i = 0; i < 4; i++) VisibilityShape((yyvsp[(2) - (3)].c), i, 0); @@ -5692,7 +5693,7 @@ yyreduce: break; case 140: -#line 1913 "Gmsh.y" +#line 1914 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ Shape TheShape; @@ -5704,7 +5705,7 @@ yyreduce: break; case 141: -#line 1922 "Gmsh.y" +#line 1923 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ Shape TheShape; @@ -5716,7 +5717,7 @@ yyreduce: break; case 142: -#line 1936 "Gmsh.y" +#line 1937 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Include")){ char tmpstring[1024]; @@ -5767,7 +5768,7 @@ yyreduce: break; case 143: -#line 1984 "Gmsh.y" +#line 1985 "Gmsh.y" { #if !defined(HAVE_NO_POST) if(!strcmp((yyvsp[(1) - (7)].c), "Save") && !strcmp((yyvsp[(2) - (7)].c), "View")){ @@ -5788,7 +5789,7 @@ yyreduce: break; case 144: -#line 2002 "Gmsh.y" +#line 2003 "Gmsh.y" { #if !defined(HAVE_NO_POST) if(!strcmp((yyvsp[(1) - (7)].c), "Background") && !strcmp((yyvsp[(2) - (7)].c), "Mesh") && !strcmp((yyvsp[(3) - (7)].c), "View")){ @@ -5806,7 +5807,7 @@ yyreduce: break; case 145: -#line 2017 "Gmsh.y" +#line 2018 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Sleep")){ SleepInSeconds((yyvsp[(2) - (3)].d)); @@ -5831,7 +5832,7 @@ yyreduce: break; case 146: -#line 2039 "Gmsh.y" +#line 2040 "Gmsh.y" { #if !defined(HAVE_NO_POST) try { @@ -5846,7 +5847,7 @@ yyreduce: break; case 147: -#line 2051 "Gmsh.y" +#line 2052 "Gmsh.y" { #if !defined(HAVE_NO_POST) if(!strcmp((yyvsp[(2) - (3)].c), "ElementsFromAllViews")) @@ -5873,14 +5874,14 @@ yyreduce: break; case 148: -#line 2075 "Gmsh.y" +#line 2076 "Gmsh.y" { exit(0); ;} break; case 149: -#line 2079 "Gmsh.y" +#line 2080 "Gmsh.y" { CTX.forced_bbox = 0; SetBoundingBox(); @@ -5888,7 +5889,7 @@ yyreduce: break; case 150: -#line 2084 "Gmsh.y" +#line 2085 "Gmsh.y" { CTX.forced_bbox = 1; 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)); @@ -5896,7 +5897,7 @@ yyreduce: break; case 151: -#line 2089 "Gmsh.y" +#line 2090 "Gmsh.y" { #if defined(HAVE_FLTK) Draw(); @@ -5905,7 +5906,7 @@ yyreduce: break; case 152: -#line 2101 "Gmsh.y" +#line 2102 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (6)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (6)].d); @@ -5925,7 +5926,7 @@ yyreduce: break; case 153: -#line 2118 "Gmsh.y" +#line 2119 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (8)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (8)].d); @@ -5945,7 +5946,7 @@ yyreduce: break; case 154: -#line 2135 "Gmsh.y" +#line 2136 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (8)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (8)].d); @@ -5975,7 +5976,7 @@ yyreduce: break; case 155: -#line 2162 "Gmsh.y" +#line 2163 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (10)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (10)].d); @@ -6005,7 +6006,7 @@ yyreduce: break; case 156: -#line 2189 "Gmsh.y" +#line 2190 "Gmsh.y" { if(ImbricatedLoop <= 0){ yymsg(0, "Invalid For/EndFor loop"); @@ -6039,7 +6040,7 @@ yyreduce: break; case 157: -#line 2220 "Gmsh.y" +#line 2221 "Gmsh.y" { if(!FunctionManager::Instance()->createFunction((yyvsp[(2) - (2)].c), gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -6050,7 +6051,7 @@ yyreduce: break; case 158: -#line 2228 "Gmsh.y" +#line 2229 "Gmsh.y" { if(!FunctionManager::Instance()->leaveFunction(&gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -6059,7 +6060,7 @@ yyreduce: break; case 159: -#line 2234 "Gmsh.y" +#line 2235 "Gmsh.y" { if(!FunctionManager::Instance()->enterFunction((yyvsp[(2) - (3)].c), &gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -6069,20 +6070,20 @@ yyreduce: break; case 160: -#line 2241 "Gmsh.y" +#line 2242 "Gmsh.y" { if(!(yyvsp[(3) - (4)].d)) skip_until("If", "EndIf"); ;} break; case 161: -#line 2245 "Gmsh.y" +#line 2246 "Gmsh.y" { ;} break; case 162: -#line 2254 "Gmsh.y" +#line 2255 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (5)].l), @@ -6093,7 +6094,7 @@ yyreduce: break; case 163: -#line 2262 "Gmsh.y" +#line 2263 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(ROTATE, (yyvsp[(10) - (11)].l), @@ -6104,7 +6105,7 @@ yyreduce: break; case 164: -#line 2270 "Gmsh.y" +#line 2271 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (13)].l), @@ -6115,14 +6116,14 @@ yyreduce: break; case 165: -#line 2278 "Gmsh.y" +#line 2279 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 166: -#line 2282 "Gmsh.y" +#line 2283 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (7)].l), @@ -6133,14 +6134,14 @@ yyreduce: break; case 167: -#line 2290 "Gmsh.y" +#line 2291 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 168: -#line 2294 "Gmsh.y" +#line 2295 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(ROTATE, (yyvsp[(10) - (13)].l), @@ -6151,14 +6152,14 @@ yyreduce: break; case 169: -#line 2302 "Gmsh.y" +#line 2303 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 170: -#line 2306 "Gmsh.y" +#line 2307 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (15)].l), @@ -6169,14 +6170,14 @@ yyreduce: break; case 171: -#line 2314 "Gmsh.y" +#line 2315 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 172: -#line 2318 "Gmsh.y" +#line 2319 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(BOUNDARY_LAYER, (yyvsp[(3) - (6)].l), 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., @@ -6186,14 +6187,14 @@ yyreduce: break; case 173: -#line 2325 "Gmsh.y" +#line 2326 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 174: -#line 2329 "Gmsh.y" +#line 2330 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); extr.mesh.ViewIndex = (int)(yyvsp[(4) - (10)].d); @@ -6206,7 +6207,7 @@ yyreduce: break; case 175: -#line 2341 "Gmsh.y" +#line 2342 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (8)].d), @@ -6216,7 +6217,7 @@ yyreduce: break; case 176: -#line 2348 "Gmsh.y" +#line 2349 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (8)].d), @@ -6226,7 +6227,7 @@ yyreduce: break; case 177: -#line 2355 "Gmsh.y" +#line 2356 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (8)].d), @@ -6236,7 +6237,7 @@ yyreduce: break; case 178: -#line 2362 "Gmsh.y" +#line 2363 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), @@ -6246,7 +6247,7 @@ yyreduce: break; case 179: -#line 2369 "Gmsh.y" +#line 2370 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), @@ -6256,7 +6257,7 @@ yyreduce: break; case 180: -#line 2376 "Gmsh.y" +#line 2377 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), @@ -6266,7 +6267,7 @@ yyreduce: break; case 181: -#line 2383 "Gmsh.y" +#line 2384 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (14)].d), @@ -6276,7 +6277,7 @@ yyreduce: break; case 182: -#line 2390 "Gmsh.y" +#line 2391 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (14)].d), @@ -6286,7 +6287,7 @@ yyreduce: break; case 183: -#line 2397 "Gmsh.y" +#line 2398 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (14)].d), @@ -6296,14 +6297,14 @@ yyreduce: break; case 184: -#line 2404 "Gmsh.y" +#line 2405 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 185: -#line 2408 "Gmsh.y" +#line 2409 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), @@ -6313,14 +6314,14 @@ yyreduce: break; case 186: -#line 2415 "Gmsh.y" +#line 2416 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 187: -#line 2419 "Gmsh.y" +#line 2420 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), @@ -6330,14 +6331,14 @@ yyreduce: break; case 188: -#line 2426 "Gmsh.y" +#line 2427 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 189: -#line 2430 "Gmsh.y" +#line 2431 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), @@ -6347,14 +6348,14 @@ yyreduce: break; case 190: -#line 2437 "Gmsh.y" +#line 2438 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 191: -#line 2441 "Gmsh.y" +#line 2442 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (16)].d), @@ -6364,14 +6365,14 @@ yyreduce: break; case 192: -#line 2448 "Gmsh.y" +#line 2449 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 193: -#line 2452 "Gmsh.y" +#line 2453 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (16)].d), @@ -6381,14 +6382,14 @@ yyreduce: break; case 194: -#line 2459 "Gmsh.y" +#line 2460 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 195: -#line 2463 "Gmsh.y" +#line 2464 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (16)].d), @@ -6398,14 +6399,14 @@ yyreduce: break; case 196: -#line 2470 "Gmsh.y" +#line 2471 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 197: -#line 2474 "Gmsh.y" +#line 2475 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (18)].d), @@ -6415,14 +6416,14 @@ yyreduce: break; case 198: -#line 2481 "Gmsh.y" +#line 2482 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 199: -#line 2485 "Gmsh.y" +#line 2486 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (18)].d), @@ -6432,14 +6433,14 @@ yyreduce: break; case 200: -#line 2492 "Gmsh.y" +#line 2493 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 201: -#line 2496 "Gmsh.y" +#line 2497 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (18)].d), @@ -6449,19 +6450,19 @@ yyreduce: break; case 202: -#line 2507 "Gmsh.y" +#line 2508 "Gmsh.y" { ;} break; case 203: -#line 2510 "Gmsh.y" +#line 2511 "Gmsh.y" { ;} break; case 204: -#line 2516 "Gmsh.y" +#line 2517 "Gmsh.y" { extr.mesh.ExtrudeMesh = true; extr.mesh.NbLayer = 1; @@ -6473,7 +6474,7 @@ yyreduce: break; case 205: -#line 2525 "Gmsh.y" +#line 2526 "Gmsh.y" { double d; extr.mesh.ExtrudeMesh = true; @@ -6496,7 +6497,7 @@ yyreduce: break; case 206: -#line 2545 "Gmsh.y" +#line 2546 "Gmsh.y" { yymsg(0, "Explicit region numbers in layers are deprecated"); double d; @@ -6522,14 +6523,14 @@ yyreduce: break; case 207: -#line 2568 "Gmsh.y" +#line 2569 "Gmsh.y" { extr.mesh.Recombine = true; ;} break; case 208: -#line 2572 "Gmsh.y" +#line 2573 "Gmsh.y" { int num = (int)(yyvsp[(3) - (9)].d); if(FindSurface(num)){ @@ -6551,7 +6552,7 @@ yyreduce: break; case 209: -#line 2596 "Gmsh.y" +#line 2597 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ double d; @@ -6572,7 +6573,7 @@ yyreduce: break; case 210: -#line 2614 "Gmsh.y" +#line 2615 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (9)].l)); i++){ double d; @@ -6593,7 +6594,7 @@ yyreduce: break; case 211: -#line 2632 "Gmsh.y" +#line 2633 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (9)].l)); i++){ double d; @@ -6614,7 +6615,7 @@ yyreduce: break; case 212: -#line 2650 "Gmsh.y" +#line 2651 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(4) - (8)].d)); if(!s) @@ -6646,7 +6647,7 @@ yyreduce: break; case 213: -#line 2679 "Gmsh.y" +#line 2680 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(4) - (9)].d)); if(!s) @@ -6684,7 +6685,7 @@ yyreduce: break; case 214: -#line 2714 "Gmsh.y" +#line 2715 "Gmsh.y" { yymsg(1, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)"); List_Delete((yyvsp[(7) - (8)].l)); @@ -6692,7 +6693,7 @@ yyreduce: break; case 215: -#line 2719 "Gmsh.y" +#line 2720 "Gmsh.y" { Volume *v = FindVolume((int)(yyvsp[(4) - (8)].d)); if(!v) @@ -6722,7 +6723,7 @@ yyreduce: break; case 216: -#line 2746 "Gmsh.y" +#line 2747 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ double d; @@ -6739,7 +6740,7 @@ yyreduce: break; case 217: -#line 2760 "Gmsh.y" +#line 2761 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ double d; @@ -6755,7 +6756,7 @@ yyreduce: break; case 218: -#line 2773 "Gmsh.y" +#line 2774 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ double d; @@ -6769,7 +6770,7 @@ yyreduce: break; case 219: -#line 2790 "Gmsh.y" +#line 2791 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); if(s) @@ -6778,7 +6779,7 @@ yyreduce: break; case 220: -#line 2796 "Gmsh.y" +#line 2797 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); if(s) @@ -6787,66 +6788,66 @@ yyreduce: break; case 221: -#line 2802 "Gmsh.y" +#line 2803 "Gmsh.y" { ;} break; case 222: -#line 2805 "Gmsh.y" +#line 2806 "Gmsh.y" { ;} break; case 223: -#line 2814 "Gmsh.y" +#line 2815 "Gmsh.y" { ReplaceAllDuplicates(); ;} break; case 224: -#line 2823 "Gmsh.y" +#line 2824 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 225: -#line 2824 "Gmsh.y" +#line 2825 "Gmsh.y" { (yyval.d) = (yyvsp[(2) - (3)].d); ;} break; case 226: -#line 2825 "Gmsh.y" +#line 2826 "Gmsh.y" { (yyval.d) = -(yyvsp[(2) - (2)].d); ;} break; case 227: -#line 2826 "Gmsh.y" +#line 2827 "Gmsh.y" { (yyval.d) = (yyvsp[(2) - (2)].d); ;} break; case 228: -#line 2827 "Gmsh.y" +#line 2828 "Gmsh.y" { (yyval.d) = !(yyvsp[(2) - (2)].d); ;} break; case 229: -#line 2828 "Gmsh.y" +#line 2829 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d); ;} break; case 230: -#line 2829 "Gmsh.y" +#line 2830 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d); ;} break; case 231: -#line 2830 "Gmsh.y" +#line 2831 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d); ;} break; case 232: -#line 2832 "Gmsh.y" +#line 2833 "Gmsh.y" { if(!(yyvsp[(3) - (3)].d)) yymsg(0, "Division by zero in '%g / %g'", (yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); @@ -6856,307 +6857,307 @@ yyreduce: break; case 233: -#line 2838 "Gmsh.y" +#line 2839 "Gmsh.y" { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d); ;} break; case 234: -#line 2839 "Gmsh.y" +#line 2840 "Gmsh.y" { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); ;} break; case 235: -#line 2840 "Gmsh.y" +#line 2841 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d); ;} break; case 236: -#line 2841 "Gmsh.y" +#line 2842 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d); ;} break; case 237: -#line 2842 "Gmsh.y" +#line 2843 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d); ;} break; case 238: -#line 2843 "Gmsh.y" +#line 2844 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d); ;} break; case 239: -#line 2844 "Gmsh.y" +#line 2845 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d); ;} break; case 240: -#line 2845 "Gmsh.y" +#line 2846 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d); ;} break; case 241: -#line 2846 "Gmsh.y" +#line 2847 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d); ;} break; case 242: -#line 2847 "Gmsh.y" +#line 2848 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d); ;} break; case 243: -#line 2848 "Gmsh.y" +#line 2849 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (5)].d)? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); ;} break; case 244: -#line 2849 "Gmsh.y" +#line 2850 "Gmsh.y" { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} break; case 245: -#line 2850 "Gmsh.y" +#line 2851 "Gmsh.y" { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} break; case 246: -#line 2851 "Gmsh.y" +#line 2852 "Gmsh.y" { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} break; case 247: -#line 2852 "Gmsh.y" +#line 2853 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} break; case 248: -#line 2853 "Gmsh.y" +#line 2854 "Gmsh.y" { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} break; case 249: -#line 2854 "Gmsh.y" +#line 2855 "Gmsh.y" { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} break; case 250: -#line 2855 "Gmsh.y" +#line 2856 "Gmsh.y" { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} break; case 251: -#line 2856 "Gmsh.y" +#line 2857 "Gmsh.y" { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} break; case 252: -#line 2857 "Gmsh.y" +#line 2858 "Gmsh.y" { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} break; case 253: -#line 2858 "Gmsh.y" +#line 2859 "Gmsh.y" { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} break; case 254: -#line 2859 "Gmsh.y" +#line 2860 "Gmsh.y" { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} break; case 255: -#line 2860 "Gmsh.y" +#line 2861 "Gmsh.y" { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} break; case 256: -#line 2861 "Gmsh.y" +#line 2862 "Gmsh.y" { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} break; case 257: -#line 2862 "Gmsh.y" +#line 2863 "Gmsh.y" { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} break; case 258: -#line 2863 "Gmsh.y" +#line 2864 "Gmsh.y" { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} break; case 259: -#line 2864 "Gmsh.y" +#line 2865 "Gmsh.y" { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} break; case 260: -#line 2865 "Gmsh.y" +#line 2866 "Gmsh.y" { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} break; case 261: -#line 2866 "Gmsh.y" +#line 2867 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 262: -#line 2867 "Gmsh.y" +#line 2868 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 263: -#line 2868 "Gmsh.y" +#line 2869 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (6)].d)*(yyvsp[(3) - (6)].d)+(yyvsp[(5) - (6)].d)*(yyvsp[(5) - (6)].d)); ;} break; case 264: -#line 2869 "Gmsh.y" +#line 2870 "Gmsh.y" { (yyval.d) = (yyvsp[(3) - (4)].d)*(double)rand()/(double)RAND_MAX; ;} break; case 265: -#line 2871 "Gmsh.y" +#line 2872 "Gmsh.y" { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} break; case 266: -#line 2872 "Gmsh.y" +#line 2873 "Gmsh.y" { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} break; case 267: -#line 2873 "Gmsh.y" +#line 2874 "Gmsh.y" { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} break; case 268: -#line 2874 "Gmsh.y" +#line 2875 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} break; case 269: -#line 2875 "Gmsh.y" +#line 2876 "Gmsh.y" { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} break; case 270: -#line 2876 "Gmsh.y" +#line 2877 "Gmsh.y" { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} break; case 271: -#line 2877 "Gmsh.y" +#line 2878 "Gmsh.y" { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} break; case 272: -#line 2878 "Gmsh.y" +#line 2879 "Gmsh.y" { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} break; case 273: -#line 2879 "Gmsh.y" +#line 2880 "Gmsh.y" { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} break; case 274: -#line 2880 "Gmsh.y" +#line 2881 "Gmsh.y" { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} break; case 275: -#line 2881 "Gmsh.y" +#line 2882 "Gmsh.y" { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} break; case 276: -#line 2882 "Gmsh.y" +#line 2883 "Gmsh.y" { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} break; case 277: -#line 2883 "Gmsh.y" +#line 2884 "Gmsh.y" { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} break; case 278: -#line 2884 "Gmsh.y" +#line 2885 "Gmsh.y" { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} break; case 279: -#line 2885 "Gmsh.y" +#line 2886 "Gmsh.y" { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} break; case 280: -#line 2886 "Gmsh.y" +#line 2887 "Gmsh.y" { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} break; case 281: -#line 2887 "Gmsh.y" +#line 2888 "Gmsh.y" { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} break; case 282: -#line 2888 "Gmsh.y" +#line 2889 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 283: -#line 2889 "Gmsh.y" +#line 2890 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 284: -#line 2890 "Gmsh.y" +#line 2891 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (6)].d)*(yyvsp[(3) - (6)].d)+(yyvsp[(5) - (6)].d)*(yyvsp[(5) - (6)].d)); ;} break; case 285: -#line 2891 "Gmsh.y" +#line 2892 "Gmsh.y" { (yyval.d) = (yyvsp[(3) - (4)].d)*(double)rand()/(double)RAND_MAX; ;} break; case 286: -#line 2900 "Gmsh.y" +#line 2901 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 287: -#line 2901 "Gmsh.y" +#line 2902 "Gmsh.y" { (yyval.d) = 3.141592653589793; ;} break; case 288: -#line 2902 "Gmsh.y" +#line 2903 "Gmsh.y" { (yyval.d) = Msg::GetCommRank(); ;} break; case 289: -#line 2903 "Gmsh.y" +#line 2904 "Gmsh.y" { (yyval.d) = Msg::GetCommSize(); ;} break; case 290: -#line 2904 "Gmsh.y" +#line 2905 "Gmsh.y" { (yyval.d) = Get_GmshMajorVersion(); ;} break; case 291: -#line 2905 "Gmsh.y" +#line 2906 "Gmsh.y" { (yyval.d) = Get_GmshMinorVersion(); ;} break; case 292: -#line 2906 "Gmsh.y" +#line 2907 "Gmsh.y" { (yyval.d) = Get_GmshPatchVersion(); ;} break; case 293: -#line 2911 "Gmsh.y" +#line 2912 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(1) - (1)].c); @@ -7172,7 +7173,7 @@ yyreduce: break; case 294: -#line 2927 "Gmsh.y" +#line 2928 "Gmsh.y" { char tmpstring[1024]; sprintf(tmpstring, "%s_%d", (yyvsp[(1) - (5)].c), (int)(yyvsp[(4) - (5)].d)) ; @@ -7190,7 +7191,7 @@ yyreduce: break; case 295: -#line 2942 "Gmsh.y" +#line 2943 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(1) - (4)].c); @@ -7213,7 +7214,7 @@ yyreduce: break; case 296: -#line 2962 "Gmsh.y" +#line 2963 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(2) - (4)].c); @@ -7229,7 +7230,7 @@ yyreduce: break; case 297: -#line 2975 "Gmsh.y" +#line 2976 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(1) - (2)].c); @@ -7245,7 +7246,7 @@ yyreduce: break; case 298: -#line 2988 "Gmsh.y" +#line 2989 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = (yyvsp[(1) - (5)].c); @@ -7268,7 +7269,7 @@ yyreduce: break; case 299: -#line 3011 "Gmsh.y" +#line 3012 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -7289,7 +7290,7 @@ yyreduce: break; case 300: -#line 3029 "Gmsh.y" +#line 3030 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -7310,7 +7311,7 @@ yyreduce: break; case 301: -#line 3047 "Gmsh.y" +#line 3048 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -7331,7 +7332,7 @@ yyreduce: break; case 302: -#line 3065 "Gmsh.y" +#line 3066 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -7352,7 +7353,7 @@ yyreduce: break; case 303: -#line 3083 "Gmsh.y" +#line 3084 "Gmsh.y" { (yyval.d) = Msg::GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d)); Free((yyvsp[(3) - (6)].c)); @@ -7360,70 +7361,70 @@ yyreduce: break; case 304: -#line 3091 "Gmsh.y" +#line 3092 "Gmsh.y" { memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double)); ;} break; case 305: -#line 3095 "Gmsh.y" +#line 3096 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i]; ;} break; case 306: -#line 3099 "Gmsh.y" +#line 3100 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i]; ;} break; case 307: -#line 3103 "Gmsh.y" +#line 3104 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i]; ;} break; case 308: -#line 3107 "Gmsh.y" +#line 3108 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i]; ;} break; case 309: -#line 3114 "Gmsh.y" +#line 3115 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (11)].d); (yyval.v)[1] = (yyvsp[(4) - (11)].d); (yyval.v)[2] = (yyvsp[(6) - (11)].d); (yyval.v)[3] = (yyvsp[(8) - (11)].d); (yyval.v)[4] = (yyvsp[(10) - (11)].d); ;} break; case 310: -#line 3118 "Gmsh.y" +#line 3119 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (9)].d); (yyval.v)[1] = (yyvsp[(4) - (9)].d); (yyval.v)[2] = (yyvsp[(6) - (9)].d); (yyval.v)[3] = (yyvsp[(8) - (9)].d); (yyval.v)[4] = 1.0; ;} break; case 311: -#line 3122 "Gmsh.y" +#line 3123 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (7)].d); (yyval.v)[1] = (yyvsp[(4) - (7)].d); (yyval.v)[2] = (yyvsp[(6) - (7)].d); (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0; ;} break; case 312: -#line 3126 "Gmsh.y" +#line 3127 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (7)].d); (yyval.v)[1] = (yyvsp[(4) - (7)].d); (yyval.v)[2] = (yyvsp[(6) - (7)].d); (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0; ;} break; case 313: -#line 3133 "Gmsh.y" +#line 3134 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(List_T*)); List_Add((yyval.l), &((yyvsp[(1) - (1)].l))); @@ -7431,14 +7432,14 @@ yyreduce: break; case 314: -#line 3138 "Gmsh.y" +#line 3139 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].l))); ;} break; case 315: -#line 3146 "Gmsh.y" +#line 3147 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); @@ -7446,14 +7447,14 @@ yyreduce: break; case 316: -#line 3151 "Gmsh.y" +#line 3152 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 317: -#line 3155 "Gmsh.y" +#line 3156 "Gmsh.y" { // creates an empty list (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -7461,14 +7462,14 @@ yyreduce: break; case 318: -#line 3160 "Gmsh.y" +#line 3161 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); ;} break; case 319: -#line 3164 "Gmsh.y" +#line 3165 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (4)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -7479,7 +7480,7 @@ yyreduce: break; case 320: -#line 3172 "Gmsh.y" +#line 3173 "Gmsh.y" { (yyval.l) = (yyvsp[(4) - (5)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -7490,7 +7491,7 @@ yyreduce: break; case 321: -#line 3183 "Gmsh.y" +#line 3184 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -7501,7 +7502,7 @@ yyreduce: break; case 322: -#line 3191 "Gmsh.y" +#line 3192 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (3)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -7512,7 +7513,7 @@ yyreduce: break; case 323: -#line 3199 "Gmsh.y" +#line 3200 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); for(double d = (yyvsp[(1) - (3)].d); ((yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d)) ? (d <= (yyvsp[(3) - (3)].d)) : (d >= (yyvsp[(3) - (3)].d)); ((yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d)) ? (d += 1.) : (d -= 1.)) @@ -7521,7 +7522,7 @@ yyreduce: break; case 324: -#line 3205 "Gmsh.y" +#line 3206 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!(yyvsp[(5) - (5)].d) || ((yyvsp[(1) - (5)].d) < (yyvsp[(3) - (5)].d) && (yyvsp[(5) - (5)].d) < 0) || ((yyvsp[(1) - (5)].d) > (yyvsp[(3) - (5)].d) && (yyvsp[(5) - (5)].d) > 0)){ @@ -7535,7 +7536,7 @@ yyreduce: break; case 325: -#line 3216 "Gmsh.y" +#line 3217 "Gmsh.y" { // Returns the coordinates of a point and fills a list with it. // This allows to ensure e.g. that relative point positions are @@ -7558,7 +7559,7 @@ yyreduce: break; case 326: -#line 3236 "Gmsh.y" +#line 3237 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){ @@ -7571,7 +7572,7 @@ yyreduce: break; case 327: -#line 3246 "Gmsh.y" +#line 3247 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){ @@ -7584,7 +7585,7 @@ yyreduce: break; case 328: -#line 3256 "Gmsh.y" +#line 3257 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); Symbol TheSymbol; @@ -7604,7 +7605,7 @@ yyreduce: break; case 329: -#line 3273 "Gmsh.y" +#line 3274 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); Symbol TheSymbol; @@ -7631,7 +7632,7 @@ yyreduce: break; case 330: -#line 3300 "Gmsh.y" +#line 3301 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); @@ -7639,21 +7640,21 @@ yyreduce: break; case 331: -#line 3305 "Gmsh.y" +#line 3306 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 332: -#line 3309 "Gmsh.y" +#line 3310 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].d))); ;} break; case 333: -#line 3313 "Gmsh.y" +#line 3314 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){ double d; @@ -7665,21 +7666,21 @@ yyreduce: break; case 334: -#line 3326 "Gmsh.y" +#line 3327 "Gmsh.y" { (yyval.u) = CTX.PACK_COLOR((int)(yyvsp[(2) - (9)].d), (int)(yyvsp[(4) - (9)].d), (int)(yyvsp[(6) - (9)].d), (int)(yyvsp[(8) - (9)].d)); ;} break; case 335: -#line 3330 "Gmsh.y" +#line 3331 "Gmsh.y" { (yyval.u) = CTX.PACK_COLOR((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255); ;} break; case 336: -#line 3342 "Gmsh.y" +#line 3343 "Gmsh.y" { int flag; (yyval.u) = Get_ColorForString(ColorString, -1, (yyvsp[(1) - (1)].c), &flag); @@ -7689,7 +7690,7 @@ yyreduce: break; case 337: -#line 3349 "Gmsh.y" +#line 3350 "Gmsh.y" { unsigned int (*pColOpt)(int num, int action, unsigned int value); StringXColor *pColCat; @@ -7710,14 +7711,14 @@ yyreduce: break; case 338: -#line 3370 "Gmsh.y" +#line 3371 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); ;} break; case 339: -#line 3374 "Gmsh.y" +#line 3375 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); GmshColorTable *ct = Get_ColorTable((int)(yyvsp[(3) - (6)].d)); @@ -7732,7 +7733,7 @@ yyreduce: break; case 340: -#line 3389 "Gmsh.y" +#line 3390 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); List_Add((yyval.l), &((yyvsp[(1) - (1)].u))); @@ -7740,35 +7741,35 @@ yyreduce: break; case 341: -#line 3394 "Gmsh.y" +#line 3395 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].u))); ;} break; case 342: -#line 3401 "Gmsh.y" +#line 3402 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; case 343: -#line 3405 "Gmsh.y" +#line 3406 "Gmsh.y" { Msg::Warning("Named string expressions not implemented yet"); ;} break; case 344: -#line 3412 "Gmsh.y" +#line 3413 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; case 345: -#line 3416 "Gmsh.y" +#line 3417 "Gmsh.y" { (yyval.c) = (char *)Malloc(32*sizeof(char)); time_t now; @@ -7779,7 +7780,7 @@ yyreduce: break; case 346: -#line 3424 "Gmsh.y" +#line 3425 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (6)].c))+strlen((yyvsp[(5) - (6)].c))+1)*sizeof(char)); strcpy((yyval.c), (yyvsp[(3) - (6)].c)); @@ -7790,7 +7791,7 @@ yyreduce: break; case 347: -#line 3432 "Gmsh.y" +#line 3433 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c))+1)*sizeof(char)); int i; @@ -7807,7 +7808,7 @@ yyreduce: break; case 348: -#line 3446 "Gmsh.y" +#line 3447 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c))+1)*sizeof(char)); int i; @@ -7824,14 +7825,14 @@ yyreduce: break; case 349: -#line 3460 "Gmsh.y" +#line 3461 "Gmsh.y" { (yyval.c) = (yyvsp[(3) - (4)].c); ;} break; case 350: -#line 3464 "Gmsh.y" +#line 3465 "Gmsh.y" { char tmpstring[1024]; int i = PrintListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring); @@ -7853,7 +7854,7 @@ yyreduce: break; case 351: -#line 3483 "Gmsh.y" +#line 3484 "Gmsh.y" { const char* (*pStrOpt)(int num, int action, const char *value); StringXString *pStrCat; @@ -7879,7 +7880,7 @@ yyreduce: break; case 352: -#line 3506 "Gmsh.y" +#line 3507 "Gmsh.y" { const char* (*pStrOpt)(int num, int action, const char *value); StringXString *pStrCat; @@ -7906,7 +7907,7 @@ yyreduce: /* Line 1267 of yacc.c. */ -#line 7910 "Gmsh.tab.cpp" +#line 7911 "Gmsh.tab.cpp" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -8120,7 +8121,7 @@ yyreturn: } -#line 3530 "Gmsh.y" +#line 3531 "Gmsh.y" void DeleteSymbol(void *a, void *b) diff --git a/Parser/Gmsh.tab.hpp b/Parser/Gmsh.tab.hpp index 7f8f26c5d9d26beceda77a2663a3dcc518f24258..a8ae2c507ab58c0355b83772d7ec413b516da905 100644 --- a/Parser/Gmsh.tab.hpp +++ b/Parser/Gmsh.tab.hpp @@ -298,7 +298,7 @@ typedef union YYSTYPE Shape s; List_T *l; } -/* Line 1529 of yacc.c. */ +/* Line 1489 of yacc.c. */ #line 303 "Gmsh.tab.hpp" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index 8727760792777ea574b51b93247022c02d83488f..8fe11e67a49b459ed2df59b0cd8b51b828bbc49c 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -1,5 +1,5 @@ %{ -// $Id: Gmsh.y,v 1.317 2008-06-12 09:31:41 geuzaine Exp $ +// $Id: Gmsh.y,v 1.318 2008-06-23 11:32:10 remacle Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -559,6 +559,7 @@ InterpolationMatrix : (ViewData->NbST || ViewData->NbVT) ? 3 : (ViewData->NbSQ || ViewData->NbVQ) ? 4 : (ViewData->NbSS || ViewData->NbVS) ? 6 : + (ViewData->NbSI || ViewData->NbVI) ? 9 : (ViewData->NbSH || ViewData->NbVH) ? 12 : 0; ViewData->setInterpolationScheme(type, $3, $6); diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp index 766455322c434b300b40c3e4fbbe31c45bd02d30..a8c9bc40bc2bf7bfb0294615a68ce88b98764c54 100644 --- a/Parser/Gmsh.yy.cpp +++ b/Parser/Gmsh.yy.cpp @@ -6,10 +6,29 @@ /* A lexical scanner generated by flex */ +#define yy_create_buffer gmsh_yy_create_buffer +#define yy_delete_buffer gmsh_yy_delete_buffer +#define yy_flex_debug gmsh_yy_flex_debug +#define yy_init_buffer gmsh_yy_init_buffer +#define yy_flush_buffer gmsh_yy_flush_buffer +#define yy_load_buffer_state gmsh_yy_load_buffer_state +#define yy_switch_to_buffer gmsh_yy_switch_to_buffer +#define yyin gmsh_yyin +#define yyleng gmsh_yyleng +#define yylex gmsh_yylex +#define yylineno gmsh_yylineno +#define yyout gmsh_yyout +#define yyrestart gmsh_yyrestart +#define yytext gmsh_yytext +#define yywrap gmsh_yywrap +#define yyalloc gmsh_yyalloc +#define yyrealloc gmsh_yyrealloc +#define yyfree gmsh_yyfree + #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 33 +#define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -31,7 +50,7 @@ /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ -#if __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. @@ -54,7 +73,6 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -85,6 +103,8 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif +#endif /* ! C99 */ + #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -94,11 +114,12 @@ typedef unsigned int flex_uint32_t; #else /* ! __cplusplus */ -#if __STDC__ +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) #define YY_USE_CONST -#endif /* __STDC__ */ +#endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST @@ -178,14 +199,9 @@ extern FILE *gmsh_yyin, *gmsh_yyout; #define unput(c) yyunput( c, (yytext_ptr) ) -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ - #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T -typedef unsigned int yy_size_t; +typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE @@ -835,7 +851,7 @@ int gmsh_yy_flex_debug = 0; char *gmsh_yytext; #line 1 "Gmsh.l" #line 2 "Gmsh.l" -// $Id: Gmsh.yy.cpp,v 1.367 2008-06-12 09:31:41 geuzaine Exp $ +// $Id: Gmsh.yy.cpp,v 1.368 2008-06-23 11:32:10 remacle Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -895,7 +911,7 @@ void skipline(void); #define YY_NO_UNISTD_H #endif -#line 899 "Gmsh.yy.cpp" +#line 915 "Gmsh.yy.cpp" #define INITIAL 0 @@ -913,6 +929,35 @@ void skipline(void); static int yy_init_globals (void ); +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int gmsh_yylex_destroy (void ); + +int gmsh_yyget_debug (void ); + +void gmsh_yyset_debug (int debug_flag ); + +YY_EXTRA_TYPE gmsh_yyget_extra (void ); + +void gmsh_yyset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *gmsh_yyget_in (void ); + +void gmsh_yyset_in (FILE * in_str ); + +FILE *gmsh_yyget_out (void ); + +void gmsh_yyset_out (FILE * out_str ); + +int gmsh_yyget_leng (void ); + +char *gmsh_yyget_text (void ); + +int gmsh_yyget_lineno (void ); + +void gmsh_yyset_lineno (int line_number ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ @@ -955,7 +1000,7 @@ static int input (void ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO (void) fwrite( gmsh_yytext, gmsh_yyleng, 1, gmsh_yyout ) +#define ECHO do { if (fwrite( gmsh_yytext, gmsh_yyleng, 1, gmsh_yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1051,7 +1096,7 @@ YY_DECL #line 71 "Gmsh.l" -#line 1055 "Gmsh.yy.cpp" +#line 1100 "Gmsh.yy.cpp" if ( !(yy_init) ) { @@ -1851,7 +1896,7 @@ YY_RULE_SETUP #line 242 "Gmsh.l" ECHO; YY_BREAK -#line 1855 "Gmsh.yy.cpp" +#line 1900 "Gmsh.yy.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2082,7 +2127,7 @@ static int yy_get_next_buffer (void) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); + (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -2106,6 +2151,14 @@ static int yy_get_next_buffer (void) else ret_val = EOB_ACT_CONTINUE_SCAN; + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) gmsh_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; @@ -2257,7 +2310,7 @@ static int yy_get_next_buffer (void) case EOB_ACT_END_OF_FILE: { if ( gmsh_yywrap( ) ) - return 0; + return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; @@ -2521,7 +2574,9 @@ static void gmsh_yyensure_buffer_stack (void) (yy_buffer_stack) = (struct yy_buffer_state**)gmsh_yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); - + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in gmsh_yyensure_buffer_stack()" ); + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; @@ -2539,6 +2594,8 @@ static void gmsh_yyensure_buffer_stack (void) ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in gmsh_yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); @@ -2583,7 +2640,7 @@ YY_BUFFER_STATE gmsh_yy_scan_buffer (char * base, yy_size_t size ) /** Setup the input buffer state to scan a string. The next call to gmsh_yylex() will * scan from a @e copy of @a str. - * @param str a NUL-terminated string to scan + * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use diff --git a/Post/adaptiveData.cpp b/Post/adaptiveData.cpp index 90e4d1f3b4e4671f04b480e4d2829171802f3526..8f2bbb02458f9791711df0a08b31af32f5ca1e92 100644 --- a/Post/adaptiveData.cpp +++ b/Post/adaptiveData.cpp @@ -30,16 +30,19 @@ std::list<adaptiveTriangle*> adaptiveTriangle::all; std::list<adaptiveQuadrangle*> adaptiveQuadrangle::all; std::list<adaptiveTetrahedron*> adaptiveTetrahedron::all; std::list<adaptiveHexahedron*> adaptiveHexahedron::all; +std::list<adaptivePrism*> adaptivePrism::all; int adaptiveLine::numNodes = 2; int adaptiveTriangle::numNodes = 3; int adaptiveQuadrangle::numNodes = 4; +int adaptivePrism::numNodes = 6; int adaptiveTetrahedron::numNodes = 4; int adaptiveHexahedron::numNodes = 8; int adaptiveLine::numEdges = 1; int adaptiveTriangle::numEdges = 3; int adaptiveQuadrangle::numEdges = 4; +int adaptivePrism::numEdges = 9; int adaptiveTetrahedron::numEdges = 6; int adaptiveHexahedron::numEdges = 12; @@ -407,6 +410,167 @@ void adaptiveQuadrangle::recurError(adaptiveQuadrangle *q, double AVG, double to } } +void adaptivePrism::create(int maxlevel, + Double_Matrix *coeffs, Double_Matrix *eexps) +{ + cleanElement<adaptivePrism>(); + adaptivePoint *p1 = adaptivePoint::create(0, 0, -1, coeffs, eexps); + adaptivePoint *p2 = adaptivePoint::create(1, 0, -1, coeffs, eexps); + adaptivePoint *p3 = adaptivePoint::create(0, 1, -1, coeffs, eexps); + adaptivePoint *p4 = adaptivePoint::create(0, 0, 1, coeffs, eexps); + adaptivePoint *p5 = adaptivePoint::create(1, 0, 1, coeffs, eexps); + adaptivePoint *p6 = adaptivePoint::create(0, 1, 1, coeffs, eexps); + adaptivePrism *p = new adaptivePrism(p1, p2, p3, p4, p5, p6); + recurCreate(p, maxlevel, 0, coeffs, eexps); +} + +void adaptivePrism::recurCreate(adaptivePrism *p, int maxlevel, int level, + Double_Matrix *coeffs, Double_Matrix *eexps) +{ + all.push_back(p); + if(level++ >= maxlevel) return; + + // p4 p34 p3 + // p14 pc p23 + // p1 p12 p2 + adaptivePoint *p1 = p->p[0]; + adaptivePoint *p2 = p->p[1]; + adaptivePoint *p3 = p->p[2]; + adaptivePoint *p4 = p->p[3]; + adaptivePoint *p5 = p->p[4]; + adaptivePoint *p6 = p->p[5]; + adaptivePoint *p14 = adaptivePoint::create((p1->x + p4->x) * 0.5, + (p1->y + p4->y) * 0.5, + (p1->z + p4->z) * 0.5, + coeffs, eexps); + adaptivePoint *p25 = adaptivePoint::create((p2->x + p5->x) * 0.5, + (p2->y + p5->y) * 0.5, + (p2->z + p5->z) * 0.5, + coeffs, eexps); + adaptivePoint *p36 = adaptivePoint::create((p3->x + p6->x) * 0.5, + (p3->y + p6->y) * 0.5, + (p3->z + p6->z) * 0.5, + coeffs, eexps); + adaptivePoint *p12 = adaptivePoint::create((p1->x + p2->x) * 0.5, + (p1->y + p2->y) * 0.5, + (p1->z + p2->z) * 0.5, + coeffs, eexps); + adaptivePoint *p23 = adaptivePoint::create((p2->x + p3->x) * 0.5, + (p2->y + p3->y) * 0.5, + (p2->z + p3->z) * 0.5, + coeffs, eexps); + adaptivePoint *p31 = adaptivePoint::create((p3->x + p1->x) * 0.5, + (p3->y + p1->y) * 0.5, + (p3->z + p1->z) * 0.5, + coeffs, eexps); + adaptivePoint *p1425 = adaptivePoint::create((p14->x + p25->x) * 0.5, + (p14->y + p25->y) * 0.5, + (p14->z + p25->z) * 0.5, + coeffs, eexps); + adaptivePoint *p2536 = adaptivePoint::create((p25->x + p36->x) * 0.5, + (p25->y + p36->y) * 0.5, + (p25->z + p36->z) * 0.5, + coeffs, eexps); + adaptivePoint *p3614 = adaptivePoint::create((p36->x + p14->x) * 0.5, + (p36->y + p14->y) * 0.5, + (p36->z + p14->z) * 0.5, + coeffs, eexps); + adaptivePoint *p45 = adaptivePoint::create((p4->x + p5->x) * 0.5, + (p4->y + p5->y) * 0.5, + (p4->z + p5->z) * 0.5, + coeffs, eexps); + adaptivePoint *p56 = adaptivePoint::create((p5->x + p6->x) * 0.5, + (p5->y + p6->y) * 0.5, + (p5->z + p6->z) * 0.5, + coeffs, eexps); + adaptivePoint *p64 = adaptivePoint::create((p6->x + p4->x) * 0.5, + (p6->y + p4->y) * 0.5, + (p6->z + p4->z) * 0.5, + coeffs, eexps); + p->e[0] = new adaptivePrism(p1, p12, p31, p14, p1425, p3614); + recurCreate(p->e[0], maxlevel, level, coeffs, eexps); + p->e[1] = new adaptivePrism(p2, p23, p12, p25, p2536, p1425); + recurCreate(p->e[1], maxlevel, level, coeffs, eexps); + p->e[2] = new adaptivePrism(p3, p31, p23, p36, p3614, p2536); + recurCreate(p->e[2], maxlevel, level, coeffs, eexps); + p->e[3] = new adaptivePrism(p12, p23, p31, p1425, p2536, p3614); + recurCreate(p->e[3], maxlevel, level, coeffs, eexps); + p->e[4] = new adaptivePrism(p14, p1425, p3614, p4, p45, p64); + recurCreate(p->e[4], maxlevel, level, coeffs, eexps); + p->e[5] = new adaptivePrism(p25, p2536, p1425, p5, p56, p45); + recurCreate(p->e[5], maxlevel, level, coeffs, eexps); + p->e[6] = new adaptivePrism(p36, p3614, p2536, p6, p64, p56); + recurCreate(p->e[6], maxlevel, level, coeffs, eexps); + p->e[7] = new adaptivePrism(p1425, p2536, p3614, p45, p56, p64); + recurCreate(p->e[7], maxlevel, level, coeffs, eexps); +} + +void adaptivePrism::error(double AVG, double tol) +{ + adaptivePrism *p = *all.begin(); + recurError(p, AVG, tol); +} + +void adaptivePrism::recurError(adaptivePrism *p, double AVG, double tol) +{ + if(!p->e[0]) + p->visible = true; + else { + double vr; + if(!p->e[0]->e[0]) { + double v1 = p->e[0]->V(); + double v2 = p->e[1]->V(); + double v3 = p->e[2]->V(); + double v4 = p->e[3]->V(); + double v5 = p->e[4]->V(); + double v6 = p->e[5]->V(); + double v7 = p->e[6]->V(); + double v8 = p->e[7]->V(); + vr = (v1 + v2 + v3 + v4/2 +v5 +v6 +v7 +v8/2) / 7; + double v = p->V(); + if(fabs(v - vr) > AVG * tol){ + p->visible = false; + recurError(p->e[0], AVG, tol); + recurError(p->e[1], AVG, tol); + recurError(p->e[2], AVG, tol); + recurError(p->e[3], AVG, tol); + recurError(p->e[4], AVG, tol); + recurError(p->e[5], AVG, tol); + recurError(p->e[6], AVG, tol); + recurError(p->e[7], AVG, tol); + } + else + p->visible = true; + } + else { + bool err=false; + double ve[8]; + for(int i=0; i<8; i++){ + double v1 = p->e[i]->e[0]->V(); + double v2 = p->e[i]->e[1]->V(); + double v3 = p->e[i]->e[2]->V(); + double v4 = p->e[i]->e[3]->V(); + double v5 = p->e[i]->e[4]->V(); + double v6 = p->e[i]->e[5]->V(); + double v7 = p->e[i]->e[6]->V(); + double v8 = p->e[i]->e[7]->V(); + double vr = (v1 + v2 + v3 + v4/2 +v5 +v6 +v7 +v8/2) / 7; + ve[i] = p->e[i]->V(); + err |= (fabs((ve[i] - vr)) > AVG*tol); + } + double vr=(ve[0]+ve[1]+ve[2]+ve[3]/2+ve[4]+ve[5]+ve[6]+ve[7]/2)/7; + err |= (fabs((p->V() - vr))>AVG*tol); + if(err) { + p->visible = false; + for(int i=0;i<8;i++) + recurError(p->e[i], AVG, tol); + } + else + p->visible = true; + } + } +} + void adaptiveTetrahedron::create(int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps) { @@ -815,6 +979,7 @@ void adaptiveElements<T>::initWithLowResolution(PViewData *data, int step) case 3: numEle = data->getNumTriangles(); break; case 4: numEle = data->getNumQuadrangles(); break; case 6: numEle = data->getNumTetrahedra(); break; + case 9: numEle = data->getNumPrisms(); break; case 12: numEle = data->getNumHexahedra(); break; } if(!numEle) return; @@ -1054,7 +1219,7 @@ int adaptiveElements<T>::_zoomElement(int ielem, int level, GMSH_Post_Plugin *pl adaptiveData::adaptiveData(PViewData *data) : _inData(data), _lines(0), _triangles(0), _quadrangles(0), - _tetrahedra(0), _hexahedra(0) + _tetrahedra(0), _hexahedra(0),_prisms(0) { // We could do this, but it's a bit tricky (need to set a flag in // the view to say "don't use the adaptive stuff anymore!") @@ -1088,6 +1253,11 @@ adaptiveData::adaptiveData(PViewData *data) ((numComp == 1) ? _outData->SS : _outData->VS, (numComp == 1) ? &_outData->NbSS : &_outData->NbVS, p[0], p[1], (p.size() == 4) ? p[2] : 0, (p.size() == 4) ? p[3] : 0); + if(_inData->getNumPrisms() && _inData->getInterpolationScheme(9, p) >= 2) + _prisms = new adaptiveElements<adaptivePrism> + ((numComp == 1) ? _outData->SI : _outData->VI, + (numComp == 1) ? &_outData->NbSI : &_outData->NbVI, + p[0], p[1], (p.size() == 4) ? p[2] : 0, (p.size() == 4) ? p[3] : 0); if(_inData->getNumHexahedra() && _inData->getInterpolationScheme(12, p) >= 2) _hexahedra = new adaptiveElements<adaptiveHexahedron> ((numComp == 1) ? _outData->SH : _outData->VH, @@ -1102,6 +1272,7 @@ void adaptiveData::initWithLowResolution(int step) if(_triangles) _triangles->initWithLowResolution(_inData, step); if(_quadrangles) _quadrangles->initWithLowResolution(_inData, step); if(_tetrahedra) _tetrahedra->initWithLowResolution(_inData, step); + if(_prisms) _prisms->initWithLowResolution(_inData, step); if(_hexahedra) _hexahedra->initWithLowResolution(_inData, step); _outData->finalize(); } @@ -1113,6 +1284,7 @@ void adaptiveData::changeResolution(int level, double tol, GMSH_Post_Plugin *plu if(_triangles) _triangles->changeResolution(level, tol, plug); if(_quadrangles) _quadrangles->changeResolution(level, tol, plug); if(_tetrahedra) _tetrahedra->changeResolution(level, tol, plug); + if(_prisms) _prisms->changeResolution(level, tol, plug); if(_hexahedra) _hexahedra->changeResolution(level, tol, plug); _outData->finalize(); } @@ -1123,6 +1295,7 @@ adaptiveData::~adaptiveData() if(_triangles) delete _triangles; if(_quadrangles) delete _quadrangles; if(_tetrahedra) delete _tetrahedra; + if(_prisms) delete _prisms; if(_hexahedra) delete _hexahedra; if(_inData != _outData) delete _outData; } diff --git a/Post/adaptiveData.h b/Post/adaptiveData.h index 8ae33bf032497712b4baf234f251ff269879f8fd..60ad1deb7bd4342c65c41608351687416c6f4785 100644 --- a/Post/adaptiveData.h +++ b/Post/adaptiveData.h @@ -149,6 +149,49 @@ class adaptiveQuadrangle { static void recurError(adaptiveQuadrangle *q, double AVG, double tol); }; +class adaptivePrism { + public: + bool visible; + adaptivePoint *p[6]; + adaptivePrism *e[12]; + static std::list<adaptivePrism*> all; + static int numNodes, numEdges; + public: + adaptivePrism(adaptivePoint *p1, adaptivePoint *p2, + adaptivePoint *p3, adaptivePoint *p4, + adaptivePoint *p5, adaptivePoint *p6) + : visible(false) + { + p[0] = p1; + p[1] = p2; + p[2] = p3; + p[3] = p4; + p[4] = p5; + p[5] = p6; + e[0] = e[1] = e[2] = e[3] = NULL; + e[4] = e[5] = e[6] = e[7] = NULL; + e[8] = e[9] = e[10] = e[11] = NULL; + } + inline double V() const + { + return (p[0]->val + p[1]->val + p[2]->val + p[3]->val + p[4]->val + p[5]->val) / 6.; + } + inline static void GSF(double u, double v, double w, double sf[]) + { + sf[0] = (1. - u - v) * (1 - w) / 2; + sf[1] = u * (1-w)/2; + sf[2] = v*(1-w)/2; + sf[3] = (1. - u - v)*(1+w)/2; + sf[4] = u*(1+w)/2; + sf[5] = v*(1+w)/2; + } + static void create(int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps); + static void recurCreate(adaptivePrism *p, int maxlevel, int level, + Double_Matrix *coeffs, Double_Matrix *eexps); + static void error(double AVG, double tol); + static void recurError(adaptivePrism *p, double AVG, double tol); +}; + class adaptiveTetrahedron { public: bool visible; @@ -265,6 +308,7 @@ class adaptiveData { adaptiveElements<adaptiveQuadrangle> *_quadrangles; adaptiveElements<adaptiveTetrahedron> *_tetrahedra; adaptiveElements<adaptiveHexahedron> *_hexahedra; + adaptiveElements<adaptivePrism> *_prisms; public: adaptiveData(PViewData *data); ~adaptiveData();