diff --git a/Common/Options.cpp b/Common/Options.cpp index 5aa1bef5885e93902a0544eb121b42e333e521ea..8f1d240fc43d98f418bcfe9b70a0b4d598d7dfb8 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.355 2007-09-11 14:39:03 geuzaine Exp $ +// $Id: Options.cpp,v 1.356 2007-09-11 15:28:59 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -5865,46 +5865,52 @@ double opt_view_saturate_values(OPT_ARGS_NUM) double opt_view_max_recursion_level(OPT_ARGS_NUM) { - /* GET_VIEW(0.); + + if(!data->isAdaptive()) return 0.; + + PViewDataList *l = dynamic_cast<PViewDataList*>(data); + if(!l){ + Msg(GERROR, "Adaptive views only available for list-based datasets"); + return 0.; + } + if(action & GMSH_SET) { - if(v->adaptive) - v->adaptive->setGlobalResolutionLevel(v,(int)val); + l->adaptive->setGlobalResolutionLevel(l, (int)val); + view->setChanged(true); } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - if (v->adaptive){ - WID->view_value[33]->value(v->adaptive->getGlobalResolutionLevel()); - } + WID->view_value[33]->value(l->adaptive->getGlobalResolutionLevel()); } #endif - if(v->adaptive) - return v->adaptive->getGlobalResolutionLevel(); - */ - return 0; + + return l->adaptive->getGlobalResolutionLevel(); } double opt_view_target_error(OPT_ARGS_NUM) { - /* GET_VIEW(0.); + + if(!data->isAdaptive()) return 0.; + + PViewDataList *l = dynamic_cast<PViewDataList*>(data); + if(!l){ + Msg(GERROR, "Adaptive views only available for list-based datasets"); + return 0.; + } + if(action & GMSH_SET) { - if(v->adaptive) { - v->adaptive->setTolerance(val); - v->adaptive->setGlobalResolutionLevel(v,v->adaptive->getGlobalResolutionLevel()); - } + l->adaptive->setTolerance(val); + l->adaptive->setGlobalResolutionLevel(l, l->adaptive->getGlobalResolutionLevel()); + view->setChanged(true); } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - if(v->adaptive){ - WID->view_value[34]->value(v->adaptive->getTolerance()); - } + WID->view_value[34]->value(l->adaptive->getTolerance()); } #endif - if (v->adaptive) - return v->adaptive->getTolerance(); - */ - return 1.e-2; + return l->adaptive->getTolerance(); } @@ -7607,4 +7613,3 @@ unsigned int opt_view_color_axes(OPT_ARGS_COL) #endif return opt->color.axes; } - diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index 72974b379438ee6b9d0d2c20b5028368e214eaf0..a7a7e63547bec4777e18f3f038d7aefce569c0a8 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -132,7 +132,7 @@ #line 1 "Gmsh.y" -// $Id: Gmsh.tab.cpp,v 1.332 2007-09-10 04:47:04 geuzaine Exp $ +// $Id: Gmsh.tab.cpp,v 1.333 2007-09-11 15:28:59 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -533,38 +533,38 @@ static const short yyrline[] = { 0, 161, 162, 163, 164, 165, 166, 167, 168, 171, 176, 182, 188, 203, 216, 244, 257, 266, 277, 282, 283, 284, 285, 286, 289, 292, 296, 299, 303, 448, 456, - 462, 468, 475, 484, 490, 496, 503, 511, 517, 524, - 534, 539, 546, 548, 549, 550, 551, 554, 556, 559, - 594, 633, 687, 704, 722, 733, 750, 757, 771, 788, - 814, 841, 855, 872, 886, 903, 923, 946, 956, 970, - 975, 984, 1010, 1026, 1047, 1054, 1065, 1080, 1088, 1103, - 1110, 1122, 1156, 1192, 1214, 1232, 1250, 1268, 1294, 1312, - 1338, 1358, 1376, 1394, 1420, 1437, 1456, 1474, 1512, 1516, - 1520, 1525, 1547, 1569, 1585, 1605, 1622, 1639, 1659, 1665, - 1670, 1675, 1680, 1691, 1697, 1705, 1707, 1710, 1715, 1719, - 1742, 1765, 1788, 1815, 1825, 1838, 1853, 1867, 1881, 1888, - 1894, 1903, 1916, 1965, 1981, 1997, 2016, 2026, 2048, 2052, - 2057, 2062, 2072, 2089, 2105, 2130, 2156, 2187, 2194, 2199, - 2205, 2209, 2217, 2226, 2234, 2242, 2246, 2254, 2258, 2266, - 2270, 2278, 2282, 2289, 2293, 2305, 2312, 2319, 2326, 2333, - 2340, 2347, 2354, 2361, 2368, 2372, 2379, 2383, 2390, 2394, - 2401, 2405, 2412, 2416, 2423, 2427, 2434, 2438, 2445, 2449, - 2456, 2460, 2470, 2474, 2479, 2489, 2509, 2532, 2536, 2559, - 2578, 2596, 2614, 2643, 2678, 2683, 2710, 2724, 2742, 2749, - 2755, 2758, 2766, 2776, 2778, 2779, 2780, 2781, 2782, 2783, - 2784, 2785, 2792, 2793, 2794, 2795, 2796, 2797, 2798, 2799, - 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, - 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, - 2820, 2821, 2822, 2823, 2825, 2826, 2827, 2828, 2829, 2830, - 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, 2840, - 2841, 2842, 2843, 2844, 2845, 2850, 2855, 2856, 2857, 2858, - 2859, 2860, 2864, 2880, 2895, 2915, 2928, 2941, 2964, 2982, - 3000, 3018, 3036, 3043, 3048, 3052, 3056, 3060, 3066, 3071, - 3075, 3079, 3085, 3091, 3098, 3104, 3108, 3113, 3117, 3125, - 3135, 3144, 3152, 3158, 3169, 3189, 3199, 3209, 3226, 3252, - 3258, 3262, 3266, 3278, 3283, 3295, 3302, 3322, 3327, 3341, - 3347, 3353, 3358, 3364, 3369, 3377, 3385, 3399, 3413, 3417, - 3436, 3458 + 462, 468, 475, 484, 490, 496, 503, 511, 517, 523, + 532, 537, 544, 546, 547, 548, 549, 552, 554, 557, + 592, 631, 685, 702, 720, 731, 748, 755, 769, 786, + 812, 839, 853, 870, 884, 901, 921, 944, 954, 968, + 973, 982, 1008, 1024, 1045, 1052, 1063, 1078, 1086, 1101, + 1108, 1120, 1154, 1190, 1212, 1230, 1248, 1266, 1292, 1310, + 1336, 1356, 1374, 1392, 1418, 1435, 1454, 1472, 1510, 1514, + 1518, 1523, 1545, 1567, 1583, 1603, 1620, 1637, 1657, 1663, + 1668, 1673, 1678, 1689, 1695, 1703, 1705, 1708, 1713, 1717, + 1740, 1763, 1786, 1813, 1823, 1836, 1851, 1865, 1879, 1886, + 1892, 1901, 1914, 1963, 1979, 1995, 2014, 2024, 2046, 2050, + 2055, 2060, 2070, 2087, 2103, 2128, 2154, 2185, 2192, 2197, + 2203, 2207, 2215, 2224, 2232, 2240, 2244, 2252, 2256, 2264, + 2268, 2276, 2280, 2287, 2291, 2303, 2310, 2317, 2324, 2331, + 2338, 2345, 2352, 2359, 2366, 2370, 2377, 2381, 2388, 2392, + 2399, 2403, 2410, 2414, 2421, 2425, 2432, 2436, 2443, 2447, + 2454, 2458, 2468, 2472, 2477, 2487, 2507, 2530, 2534, 2557, + 2576, 2594, 2612, 2641, 2676, 2681, 2708, 2722, 2740, 2747, + 2753, 2756, 2764, 2774, 2776, 2777, 2778, 2779, 2780, 2781, + 2782, 2783, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, + 2798, 2799, 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, + 2808, 2809, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, + 2818, 2819, 2820, 2821, 2823, 2824, 2825, 2826, 2827, 2828, + 2829, 2830, 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, + 2839, 2840, 2841, 2842, 2843, 2848, 2853, 2854, 2855, 2856, + 2857, 2858, 2862, 2878, 2893, 2913, 2926, 2939, 2962, 2980, + 2998, 3016, 3034, 3041, 3046, 3050, 3054, 3058, 3064, 3069, + 3073, 3077, 3083, 3089, 3096, 3102, 3106, 3111, 3115, 3123, + 3133, 3142, 3150, 3156, 3167, 3187, 3197, 3207, 3224, 3250, + 3256, 3260, 3264, 3276, 3281, 3293, 3300, 3320, 3325, 3339, + 3345, 3351, 3356, 3362, 3367, 3375, 3383, 3397, 3411, 3415, + 3434, 3456 }; #endif @@ -3249,58 +3249,56 @@ case 48: case 49: #line 520 "Gmsh.y" { - yyerror("TODO: reinterface adaptive views"); - //ViewData->adaptive = new Adaptive_Post_View(ViewData, $3, $6); + ViewData->adaptive = new Adaptive_Post_View(ViewData, yyvsp[-5].l, yyvsp[-2].l); ; break;} case 50: -#line 528 "Gmsh.y" +#line 527 "Gmsh.y" { - yyerror("TODO: reinterface adaptive views"); - //ViewData->adaptive = new Adaptive_Post_View(ViewData, $3, $6, $9, $12); + ViewData->adaptive = new Adaptive_Post_View(ViewData, yyvsp[-11].l, yyvsp[-8].l, yyvsp[-5].l, yyvsp[-2].l); ; break;} case 51: -#line 536 "Gmsh.y" +#line 534 "Gmsh.y" { ViewValueList = ViewData->Time; ; break;} case 52: -#line 540 "Gmsh.y" +#line 538 "Gmsh.y" { ; break;} case 53: -#line 547 "Gmsh.y" +#line 545 "Gmsh.y" { yyval.i = 0; ; break;} case 54: -#line 548 "Gmsh.y" +#line 546 "Gmsh.y" { yyval.i = 1; ; break;} case 55: -#line 549 "Gmsh.y" +#line 547 "Gmsh.y" { yyval.i = 2; ; break;} case 56: -#line 550 "Gmsh.y" +#line 548 "Gmsh.y" { yyval.i = 3; ; break;} case 57: -#line 551 "Gmsh.y" +#line 549 "Gmsh.y" { yyval.i = 4; ; break;} case 58: -#line 555 "Gmsh.y" +#line 553 "Gmsh.y" { yyval.i = 1; ; break;} case 59: -#line 556 "Gmsh.y" +#line 554 "Gmsh.y" { yyval.i = -1; ; break;} case 60: -#line 564 "Gmsh.y" +#line 562 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = yyvsp[-3].c; @@ -3333,7 +3331,7 @@ case 60: ; break;} case 61: -#line 595 "Gmsh.y" +#line 593 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = yyvsp[-6].c; @@ -3374,7 +3372,7 @@ case 61: ; break;} case 62: -#line 634 "Gmsh.y" +#line 632 "Gmsh.y" { if(List_Nbr(yyvsp[-5].l) != List_Nbr(yyvsp[-1].l)){ yymsg(GERROR, "Incompatible array dimensions in affectation"); @@ -3430,7 +3428,7 @@ case 62: ; break;} case 63: -#line 688 "Gmsh.y" +#line 686 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = yyvsp[-5].c; @@ -3449,7 +3447,7 @@ case 63: ; break;} case 64: -#line 705 "Gmsh.y" +#line 703 "Gmsh.y" { // appends to the list Symbol TheSymbol; @@ -3469,7 +3467,7 @@ case 64: ; break;} case 65: -#line 723 "Gmsh.y" +#line 721 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = yyvsp[-2].c; @@ -3482,7 +3480,7 @@ case 65: ; break;} case 66: -#line 734 "Gmsh.y" +#line 732 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = yyvsp[-5].c; @@ -3500,13 +3498,13 @@ case 66: ; break;} case 67: -#line 751 "Gmsh.y" +#line 749 "Gmsh.y" { Msg(WARNING, "Named string expressions not implemented yet"); ; break;} case 68: -#line 758 "Gmsh.y" +#line 756 "Gmsh.y" { char* (*pStrOpt)(int num, int action, char *value); StringXString *pStrCat; @@ -3522,7 +3520,7 @@ case 68: ; break;} case 69: -#line 772 "Gmsh.y" +#line 770 "Gmsh.y" { char* (*pStrOpt)(int num, int action, char *value); StringXString *pStrCat; @@ -3538,7 +3536,7 @@ case 69: ; break;} case 70: -#line 789 "Gmsh.y" +#line 787 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -3566,7 +3564,7 @@ case 70: ; break;} case 71: -#line 815 "Gmsh.y" +#line 813 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -3595,7 +3593,7 @@ case 71: ; break;} case 72: -#line 842 "Gmsh.y" +#line 840 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -3611,7 +3609,7 @@ case 72: ; break;} case 73: -#line 856 "Gmsh.y" +#line 854 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -3627,7 +3625,7 @@ case 73: ; break;} case 74: -#line 873 "Gmsh.y" +#line 871 "Gmsh.y" { unsigned int (*pColOpt)(int num, int action, unsigned int value); StringXColor *pColCat; @@ -3643,7 +3641,7 @@ case 74: ; break;} case 75: -#line 887 "Gmsh.y" +#line 885 "Gmsh.y" { unsigned int (*pColOpt)(int num, int action, unsigned int value); StringXColor *pColCat; @@ -3659,7 +3657,7 @@ case 75: ; break;} case 76: -#line 904 "Gmsh.y" +#line 902 "Gmsh.y" { GmshColorTable *ct = Get_ColorTable(0); if(!ct) @@ -3681,7 +3679,7 @@ case 76: ; break;} case 77: -#line 924 "Gmsh.y" +#line 922 "Gmsh.y" { GmshColorTable *ct = Get_ColorTable((int)yyvsp[-6].d); if(!ct) @@ -3703,7 +3701,7 @@ case 77: ; break;} case 78: -#line 947 "Gmsh.y" +#line 945 "Gmsh.y" { try { GMSH_PluginManager::instance()->setPluginOption(yyvsp[-6].c, yyvsp[-3].c, yyvsp[-1].d); @@ -3715,7 +3713,7 @@ case 78: ; break;} case 79: -#line 957 "Gmsh.y" +#line 955 "Gmsh.y" { try { GMSH_PluginManager::instance()->setPluginOption(yyvsp[-6].c, yyvsp[-3].c, yyvsp[-1].c); @@ -3727,13 +3725,13 @@ case 79: ; break;} case 80: -#line 972 "Gmsh.y" +#line 970 "Gmsh.y" { yyval.i = (int)yyvsp[0].d; ; break;} case 81: -#line 976 "Gmsh.y" +#line 974 "Gmsh.y" { yyval.i = GModel::current()->setPhysicalName(std::string(yyvsp[0].c), ++THEM->MaxPhysicalNum); @@ -3741,7 +3739,7 @@ case 81: ; break;} case 82: -#line 989 "Gmsh.y" +#line 987 "Gmsh.y" { int num = (int)yyvsp[-4].d; if(FindPoint(num)){ @@ -3765,7 +3763,7 @@ case 82: ; break;} case 83: -#line 1011 "Gmsh.y" +#line 1009 "Gmsh.y" { int num = (int)yyvsp[-4].i; if(FindPhysicalGroup(num, MSH_PHYSICAL_POINT)){ @@ -3783,7 +3781,7 @@ case 83: ; break;} case 84: -#line 1027 "Gmsh.y" +#line 1025 "Gmsh.y" { AttractorField *att = new AttractorField(); for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){ @@ -3806,7 +3804,7 @@ case 84: ; break;} case 85: -#line 1048 "Gmsh.y" +#line 1046 "Gmsh.y" { fields.insert(new LatLonField(fields.get((int)yyvsp[-1].d)), (int)yyvsp[-4].d); // dummy values @@ -3815,7 +3813,7 @@ case 85: ; break;} case 86: -#line 1055 "Gmsh.y" +#line 1053 "Gmsh.y" { int index = (int)yyvsp[-1].d; if(index >= 0 && index < PView::list.size()) @@ -3828,7 +3826,7 @@ case 86: ; break;} case 87: -#line 1066 "Gmsh.y" +#line 1064 "Gmsh.y" { double pars[] = {0, CTX.lc/10, CTX.lc, CTX.lc/100, CTX.lc/20}; for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){ @@ -3845,7 +3843,7 @@ case 87: ; break;} case 88: -#line 1081 "Gmsh.y" +#line 1079 "Gmsh.y" { std::list<Field*> *flist = new std::list<Field*>; fields.insert(new FunctionField(flist,yyvsp[-1].c), (int)yyvsp[-4].d); @@ -3855,7 +3853,7 @@ case 88: ; break;} case 89: -#line 1089 "Gmsh.y" +#line 1087 "Gmsh.y" { std::list<Field*> *flist = new std::list<Field*>; flist->resize(0); @@ -3872,7 +3870,7 @@ case 89: ; break;} case 90: -#line 1104 "Gmsh.y" +#line 1102 "Gmsh.y" { fields.insert(new StructuredField(yyvsp[-1].c), (int)yyvsp[-4].d); // dummy values @@ -3881,7 +3879,7 @@ case 90: ; break;} case 91: -#line 1111 "Gmsh.y" +#line 1109 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){ double id; @@ -3894,7 +3892,7 @@ case 91: ; break;} case 92: -#line 1123 "Gmsh.y" +#line 1121 "Gmsh.y" { double pars[] = { CTX.lc/10, CTX.lc/100., CTX.lc/20, 1, 3 }; for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){ @@ -3930,7 +3928,7 @@ case 92: ; break;} case 93: -#line 1157 "Gmsh.y" +#line 1155 "Gmsh.y" { double pars[] = { CTX.lc/10, CTX.lc/100., CTX.lc/20, 10, 3 }; for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){ @@ -3968,7 +3966,7 @@ case 93: ; break;} case 94: -#line 1193 "Gmsh.y" +#line 1191 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-3].l); i++){ double d; @@ -3989,7 +3987,7 @@ case 94: ; break;} case 95: -#line 1215 "Gmsh.y" +#line 1213 "Gmsh.y" { int num = (int)yyvsp[-4].d; if(FindCurve(num)){ @@ -4009,7 +4007,7 @@ case 95: ; break;} case 96: -#line 1233 "Gmsh.y" +#line 1231 "Gmsh.y" { int num = (int)yyvsp[-4].d; if(FindCurve(num)){ @@ -4029,7 +4027,7 @@ case 96: ; break;} case 97: -#line 1251 "Gmsh.y" +#line 1249 "Gmsh.y" { int num = (int)yyvsp[-4].d; if(FindCurve(num)){ @@ -4049,7 +4047,7 @@ case 97: ; break;} case 98: -#line 1269 "Gmsh.y" +#line 1267 "Gmsh.y" { int num = (int)yyvsp[-6].d; if(FindCurve(num)){ @@ -4077,7 +4075,7 @@ case 98: ; break;} case 99: -#line 1295 "Gmsh.y" +#line 1293 "Gmsh.y" { int num = (int)yyvsp[-4].d; if(FindCurve(num)){ @@ -4097,7 +4095,7 @@ case 99: ; break;} case 100: -#line 1313 "Gmsh.y" +#line 1311 "Gmsh.y" { int num = (int)yyvsp[-6].d; if(FindCurve(num)){ @@ -4125,7 +4123,7 @@ case 100: ; break;} case 101: -#line 1340 "Gmsh.y" +#line 1338 "Gmsh.y" { int num = (int)yyvsp[-14].d; if(FindCurve(num)){ @@ -4146,7 +4144,7 @@ case 101: ; break;} case 102: -#line 1359 "Gmsh.y" +#line 1357 "Gmsh.y" { int num = (int)yyvsp[-4].d; if(FindCurve(num)){ @@ -4166,7 +4164,7 @@ case 102: ; break;} case 103: -#line 1377 "Gmsh.y" +#line 1375 "Gmsh.y" { int num = (int)yyvsp[-4].d; if(FindCurve(num)){ @@ -4186,7 +4184,7 @@ case 103: ; break;} case 104: -#line 1395 "Gmsh.y" +#line 1393 "Gmsh.y" { int num = (int)yyvsp[-8].d; if(List_Nbr(yyvsp[-5].l) + (int)yyvsp[-1].d + 1 != List_Nbr(yyvsp[-3].l)){ @@ -4214,7 +4212,7 @@ case 104: ; break;} case 105: -#line 1421 "Gmsh.y" +#line 1419 "Gmsh.y" { int num = (int)yyvsp[-4].d; if(FindEdgeLoop(num)){ @@ -4233,7 +4231,7 @@ case 105: ; break;} case 106: -#line 1438 "Gmsh.y" +#line 1436 "Gmsh.y" { int num = (int)yyvsp[-4].i; if(FindPhysicalGroup(num, MSH_PHYSICAL_LINE)){ @@ -4251,7 +4249,7 @@ case 106: ; break;} case 107: -#line 1457 "Gmsh.y" +#line 1455 "Gmsh.y" { int num = (int)yyvsp[-4].d; if(FindSurface(num)){ @@ -4271,7 +4269,7 @@ case 107: ; break;} case 108: -#line 1475 "Gmsh.y" +#line 1473 "Gmsh.y" { int num = (int)yyvsp[-4].d, type = 0; if(FindSurface(num)){ @@ -4311,26 +4309,26 @@ case 108: ; break;} case 109: -#line 1513 "Gmsh.y" +#line 1511 "Gmsh.y" { myGmshSurface = 0; ; break;} case 110: -#line 1517 "Gmsh.y" +#line 1515 "Gmsh.y" { myGmshSurface = gmshSurface :: surfaceByTag ( (int) yyvsp[-1].d); ; break;} case 111: -#line 1521 "Gmsh.y" +#line 1519 "Gmsh.y" { int num = (int)yyvsp[-6].d, type = 0; myGmshSurface = gmshParametricSurface::NewParametricSurface ((int)yyvsp[-6].d,yyvsp[-3].c,yyvsp[-2].c,yyvsp[-1].c); ; break;} case 112: -#line 1526 "Gmsh.y" +#line 1524 "Gmsh.y" { int num = (int)yyvsp[-4].d, type = 0; if (List_Nbr(yyvsp[-1].l) != 2){ @@ -4354,7 +4352,7 @@ case 112: ; break;} case 113: -#line 1548 "Gmsh.y" +#line 1546 "Gmsh.y" { int num = (int)yyvsp[-4].d, type = 0; if (List_Nbr(yyvsp[-1].l) != 2){ @@ -4378,7 +4376,7 @@ case 113: ; break;} case 114: -#line 1570 "Gmsh.y" +#line 1568 "Gmsh.y" { int num = (int)yyvsp[-4].d; if(FindSurfaceLoop(num)){ @@ -4396,7 +4394,7 @@ case 114: ; break;} case 115: -#line 1586 "Gmsh.y" +#line 1584 "Gmsh.y" { int num = (int)yyvsp[-4].i; if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){ @@ -4414,7 +4412,7 @@ case 115: ; break;} case 116: -#line 1606 "Gmsh.y" +#line 1604 "Gmsh.y" { int num = (int)yyvsp[-4].d; if(FindVolume(num)){ @@ -4433,7 +4431,7 @@ case 116: ; break;} case 117: -#line 1623 "Gmsh.y" +#line 1621 "Gmsh.y" { int num = (int)yyvsp[-4].d; if(FindVolume(num)){ @@ -4452,7 +4450,7 @@ case 117: ; break;} case 118: -#line 1640 "Gmsh.y" +#line 1638 "Gmsh.y" { int num = (int)yyvsp[-4].i; if(FindPhysicalGroup(num, MSH_PHYSICAL_VOLUME)){ @@ -4470,35 +4468,35 @@ case 118: ; break;} case 119: -#line 1661 "Gmsh.y" +#line 1659 "Gmsh.y" { TranslateShapes(yyvsp[-3].v[0], yyvsp[-3].v[1], yyvsp[-3].v[2], yyvsp[-1].l); yyval.l = yyvsp[-1].l; ; break;} case 120: -#line 1666 "Gmsh.y" +#line 1664 "Gmsh.y" { RotateShapes(yyvsp[-8].v[0], yyvsp[-8].v[1], yyvsp[-8].v[2], yyvsp[-6].v[0], yyvsp[-6].v[1], yyvsp[-6].v[2], yyvsp[-4].d, yyvsp[-1].l); yyval.l = yyvsp[-1].l; ; break;} case 121: -#line 1671 "Gmsh.y" +#line 1669 "Gmsh.y" { SymmetryShapes(yyvsp[-3].v[0], yyvsp[-3].v[1], yyvsp[-3].v[2], yyvsp[-3].v[3], yyvsp[-1].l); yyval.l = yyvsp[-1].l; ; break;} case 122: -#line 1676 "Gmsh.y" +#line 1674 "Gmsh.y" { DilatShapes(yyvsp[-6].v[0], yyvsp[-6].v[1], yyvsp[-6].v[2], yyvsp[-4].d, yyvsp[-1].l); yyval.l = yyvsp[-1].l; ; break;} case 123: -#line 1681 "Gmsh.y" +#line 1679 "Gmsh.y" { yyval.l = List_Create(3, 3, sizeof(Shape)); for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){ @@ -4511,7 +4509,7 @@ case 123: ; break;} case 124: -#line 1692 "Gmsh.y" +#line 1690 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); IntersectCurvesWithSurface(yyvsp[-5].l, (int)yyvsp[-1].d, yyval.l); @@ -4519,7 +4517,7 @@ case 124: ; break;} case 125: -#line 1698 "Gmsh.y" +#line 1696 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); BoundaryShapes(yyvsp[-1].l, yyval.l); @@ -4527,27 +4525,27 @@ case 125: ; break;} case 126: -#line 1706 "Gmsh.y" +#line 1704 "Gmsh.y" { yyval.l = yyvsp[0].l; ; break;} case 127: -#line 1707 "Gmsh.y" +#line 1705 "Gmsh.y" { yyval.l = yyvsp[0].l; ; break;} case 128: -#line 1712 "Gmsh.y" +#line 1710 "Gmsh.y" { yyval.l = List_Create(3, 3, sizeof(Shape)); ; break;} case 129: -#line 1716 "Gmsh.y" +#line 1714 "Gmsh.y" { List_Add(yyval.l, &yyvsp[0].s); ; break;} case 130: -#line 1720 "Gmsh.y" +#line 1718 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-2].l); i++){ double d; @@ -4572,7 +4570,7 @@ case 130: ; break;} case 131: -#line 1743 "Gmsh.y" +#line 1741 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-2].l); i++){ double d; @@ -4597,7 +4595,7 @@ case 131: ; break;} case 132: -#line 1766 "Gmsh.y" +#line 1764 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-2].l); i++){ double d; @@ -4622,7 +4620,7 @@ case 132: ; break;} case 133: -#line 1789 "Gmsh.y" +#line 1787 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-2].l); i++){ double d; @@ -4647,7 +4645,7 @@ case 133: ; break;} case 134: -#line 1817 "Gmsh.y" +#line 1815 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){ Shape TheShape; @@ -4658,7 +4656,7 @@ case 134: ; break;} case 135: -#line 1826 "Gmsh.y" +#line 1824 "Gmsh.y" { if(!strcmp(yyvsp[-4].c, "View")){ int index = (int)yyvsp[-2].d; @@ -4673,7 +4671,7 @@ case 135: ; break;} case 136: -#line 1839 "Gmsh.y" +#line 1837 "Gmsh.y" { if(!strcmp(yyvsp[-1].c, "Meshes") || !strcmp(yyvsp[-1].c, "All")){ GModel::current()->destroy(); @@ -4690,7 +4688,7 @@ case 136: ; break;} case 137: -#line 1854 "Gmsh.y" +#line 1852 "Gmsh.y" { if(!strcmp(yyvsp[-2].c, "Empty") && !strcmp(yyvsp[-1].c, "Views")){ for(int i = PView::list.size() - 1; i >= 0; i--) @@ -4702,7 +4700,7 @@ case 137: ; break;} case 138: -#line 1869 "Gmsh.y" +#line 1867 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){ Shape TheShape; @@ -4713,7 +4711,7 @@ case 138: ; break;} case 139: -#line 1883 "Gmsh.y" +#line 1881 "Gmsh.y" { for(int i = 0; i < 4; i++) VisibilityShape(yyvsp[-1].c, i, 1); @@ -4721,7 +4719,7 @@ case 139: ; break;} case 140: -#line 1889 "Gmsh.y" +#line 1887 "Gmsh.y" { for(int i = 0; i < 4; i++) VisibilityShape(yyvsp[-1].c, i, 0); @@ -4729,7 +4727,7 @@ case 140: ; break;} case 141: -#line 1895 "Gmsh.y" +#line 1893 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){ Shape TheShape; @@ -4740,7 +4738,7 @@ case 141: ; break;} case 142: -#line 1904 "Gmsh.y" +#line 1902 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){ Shape TheShape; @@ -4751,7 +4749,7 @@ case 142: ; break;} case 143: -#line 1918 "Gmsh.y" +#line 1916 "Gmsh.y" { if(!strcmp(yyvsp[-2].c, "Include")){ char tmpstring[1024]; @@ -4801,7 +4799,7 @@ case 143: ; break;} case 144: -#line 1966 "Gmsh.y" +#line 1964 "Gmsh.y" { if(!strcmp(yyvsp[-6].c, "Save") && !strcmp(yyvsp[-5].c, "View")){ int index = (int)yyvsp[-3].d; @@ -4819,7 +4817,7 @@ case 144: ; break;} case 145: -#line 1982 "Gmsh.y" +#line 1980 "Gmsh.y" { if(!strcmp(yyvsp[-6].c, "Background") && !strcmp(yyvsp[-5].c, "Mesh") && !strcmp(yyvsp[-4].c, "View")){ int index = (int)yyvsp[-2].d; @@ -4837,7 +4835,7 @@ case 145: ; break;} case 146: -#line 1998 "Gmsh.y" +#line 1996 "Gmsh.y" { if(!strcmp(yyvsp[-2].c, "Sleep")){ SleepInSeconds(yyvsp[-1].d); @@ -4858,7 +4856,7 @@ case 146: ; break;} case 147: -#line 2017 "Gmsh.y" +#line 2015 "Gmsh.y" { try { GMSH_PluginManager::instance()->action(yyvsp[-4].c, yyvsp[-1].c, 0); @@ -4870,7 +4868,7 @@ case 147: ; break;} case 148: -#line 2027 "Gmsh.y" +#line 2025 "Gmsh.y" { if(!strcmp(yyvsp[-1].c, "ElementsFromAllViews")) PView::combine(false, 1, CTX.post.combine_remove_orig); @@ -4894,27 +4892,27 @@ case 148: ; break;} case 149: -#line 2049 "Gmsh.y" +#line 2047 "Gmsh.y" { exit(0); ; break;} case 150: -#line 2053 "Gmsh.y" +#line 2051 "Gmsh.y" { CTX.forced_bbox = 0; SetBoundingBox(); ; break;} case 151: -#line 2058 "Gmsh.y" +#line 2056 "Gmsh.y" { CTX.forced_bbox = 1; SetBoundingBox(yyvsp[-12].d, yyvsp[-10].d, yyvsp[-8].d, yyvsp[-6].d, yyvsp[-4].d, yyvsp[-2].d); ; break;} case 152: -#line 2063 "Gmsh.y" +#line 2061 "Gmsh.y" { #if defined(HAVE_FLTK) Draw(); @@ -4922,7 +4920,7 @@ case 152: ; break;} case 153: -#line 2075 "Gmsh.y" +#line 2073 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = yyvsp[-3].d; LoopControlVariablesTab[ImbricatedLoop][1] = yyvsp[-1].d; @@ -4939,7 +4937,7 @@ case 153: ; break;} case 154: -#line 2090 "Gmsh.y" +#line 2088 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = yyvsp[-5].d; LoopControlVariablesTab[ImbricatedLoop][1] = yyvsp[-3].d; @@ -4957,7 +4955,7 @@ case 154: ; break;} case 155: -#line 2106 "Gmsh.y" +#line 2104 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = yyvsp[-3].d; LoopControlVariablesTab[ImbricatedLoop][1] = yyvsp[-1].d; @@ -4984,7 +4982,7 @@ case 155: ; break;} case 156: -#line 2131 "Gmsh.y" +#line 2129 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = yyvsp[-5].d; LoopControlVariablesTab[ImbricatedLoop][1] = yyvsp[-3].d; @@ -5012,7 +5010,7 @@ case 156: ; break;} case 157: -#line 2157 "Gmsh.y" +#line 2155 "Gmsh.y" { if(ImbricatedLoop <= 0){ yymsg(GERROR, "Invalid For/EndFor loop"); @@ -5045,7 +5043,7 @@ case 157: ; break;} case 158: -#line 2188 "Gmsh.y" +#line 2186 "Gmsh.y" { if(!FunctionManager::Instance()->createFunction(yyvsp[0].c, yyin, yyname, yylineno)) yymsg(GERROR, "Redefinition of function %s", yyvsp[0].c); @@ -5054,14 +5052,14 @@ case 158: ; break;} case 159: -#line 2195 "Gmsh.y" +#line 2193 "Gmsh.y" { if(!FunctionManager::Instance()->leaveFunction(&yyin, yyname, yylineno)) yymsg(GERROR, "Error while exiting function"); ; break;} case 160: -#line 2200 "Gmsh.y" +#line 2198 "Gmsh.y" { if(!FunctionManager::Instance()->enterFunction(yyvsp[-1].c, &yyin, yyname, yylineno)) yymsg(GERROR, "Unknown function %s", yyvsp[-1].c); @@ -5069,18 +5067,18 @@ case 160: ; break;} case 161: -#line 2206 "Gmsh.y" +#line 2204 "Gmsh.y" { if(!yyvsp[-1].d) skip_until("If", "EndIf"); ; break;} case 162: -#line 2210 "Gmsh.y" +#line 2208 "Gmsh.y" { ; break;} case 163: -#line 2219 "Gmsh.y" +#line 2217 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE, yyvsp[-1].l, @@ -5090,7 +5088,7 @@ case 163: ; break;} case 164: -#line 2227 "Gmsh.y" +#line 2225 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(ROTATE, yyvsp[-1].l, @@ -5100,7 +5098,7 @@ case 164: ; break;} case 165: -#line 2235 "Gmsh.y" +#line 2233 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, yyvsp[-1].l, @@ -5110,13 +5108,13 @@ case 165: ; break;} case 166: -#line 2243 "Gmsh.y" +#line 2241 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ; break;} case 167: -#line 2247 "Gmsh.y" +#line 2245 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE, yyvsp[-3].l, @@ -5126,13 +5124,13 @@ case 167: ; break;} case 168: -#line 2255 "Gmsh.y" +#line 2253 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ; break;} case 169: -#line 2259 "Gmsh.y" +#line 2257 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(ROTATE, yyvsp[-3].l, @@ -5142,13 +5140,13 @@ case 169: ; break;} case 170: -#line 2267 "Gmsh.y" +#line 2265 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ; break;} case 171: -#line 2271 "Gmsh.y" +#line 2269 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, yyvsp[-3].l, @@ -5158,13 +5156,13 @@ case 171: ; break;} case 172: -#line 2279 "Gmsh.y" +#line 2277 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ; break;} case 173: -#line 2283 "Gmsh.y" +#line 2281 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(BOUNDARY_LAYER, yyvsp[-3].l, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., @@ -5173,13 +5171,13 @@ case 173: ; break;} case 174: -#line 2290 "Gmsh.y" +#line 2288 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ; break;} case 175: -#line 2294 "Gmsh.y" +#line 2292 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); extr.mesh.ViewIndex = (int)yyvsp[-6].d; @@ -5191,7 +5189,7 @@ case 175: ; break;} case 176: -#line 2306 "Gmsh.y" +#line 2304 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_POINT, (int)yyvsp[-4].d, @@ -5200,7 +5198,7 @@ case 176: ; break;} case 177: -#line 2313 "Gmsh.y" +#line 2311 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)yyvsp[-4].d, @@ -5209,7 +5207,7 @@ case 177: ; break;} case 178: -#line 2320 "Gmsh.y" +#line 2318 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)yyvsp[-4].d, @@ -5218,7 +5216,7 @@ case 178: ; break;} case 179: -#line 2327 "Gmsh.y" +#line 2325 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_POINT, (int)yyvsp[-8].d, @@ -5227,7 +5225,7 @@ case 179: ; break;} case 180: -#line 2334 "Gmsh.y" +#line 2332 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)yyvsp[-8].d, @@ -5236,7 +5234,7 @@ case 180: ; break;} case 181: -#line 2341 "Gmsh.y" +#line 2339 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)yyvsp[-8].d, @@ -5245,7 +5243,7 @@ case 181: ; break;} case 182: -#line 2348 "Gmsh.y" +#line 2346 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)yyvsp[-10].d, @@ -5254,7 +5252,7 @@ case 182: ; break;} case 183: -#line 2355 "Gmsh.y" +#line 2353 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)yyvsp[-10].d, @@ -5263,7 +5261,7 @@ case 183: ; break;} case 184: -#line 2362 "Gmsh.y" +#line 2360 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)yyvsp[-10].d, @@ -5272,13 +5270,13 @@ case 184: ; break;} case 185: -#line 2369 "Gmsh.y" +#line 2367 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ; break;} case 186: -#line 2373 "Gmsh.y" +#line 2371 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_POINT, (int)yyvsp[-8].d, @@ -5287,13 +5285,13 @@ case 186: ; break;} case 187: -#line 2380 "Gmsh.y" +#line 2378 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ; break;} case 188: -#line 2384 "Gmsh.y" +#line 2382 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)yyvsp[-8].d, @@ -5302,13 +5300,13 @@ case 188: ; break;} case 189: -#line 2391 "Gmsh.y" +#line 2389 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ; break;} case 190: -#line 2395 "Gmsh.y" +#line 2393 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)yyvsp[-8].d, @@ -5317,13 +5315,13 @@ case 190: ; break;} case 191: -#line 2402 "Gmsh.y" +#line 2400 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ; break;} case 192: -#line 2406 "Gmsh.y" +#line 2404 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_POINT, (int)yyvsp[-12].d, @@ -5332,13 +5330,13 @@ case 192: ; break;} case 193: -#line 2413 "Gmsh.y" +#line 2411 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ; break;} case 194: -#line 2417 "Gmsh.y" +#line 2415 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)yyvsp[-12].d, @@ -5347,13 +5345,13 @@ case 194: ; break;} case 195: -#line 2424 "Gmsh.y" +#line 2422 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ; break;} case 196: -#line 2428 "Gmsh.y" +#line 2426 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)yyvsp[-12].d, @@ -5362,13 +5360,13 @@ case 196: ; break;} case 197: -#line 2435 "Gmsh.y" +#line 2433 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ; break;} case 198: -#line 2439 "Gmsh.y" +#line 2437 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)yyvsp[-14].d, @@ -5377,13 +5375,13 @@ case 198: ; break;} case 199: -#line 2446 "Gmsh.y" +#line 2444 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ; break;} case 200: -#line 2450 "Gmsh.y" +#line 2448 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)yyvsp[-14].d, @@ -5392,13 +5390,13 @@ case 200: ; break;} case 201: -#line 2457 "Gmsh.y" +#line 2455 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ; break;} case 202: -#line 2461 "Gmsh.y" +#line 2459 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)yyvsp[-14].d, @@ -5407,17 +5405,17 @@ case 202: ; break;} case 203: -#line 2472 "Gmsh.y" +#line 2470 "Gmsh.y" { ; break;} case 204: -#line 2475 "Gmsh.y" +#line 2473 "Gmsh.y" { ; break;} case 205: -#line 2481 "Gmsh.y" +#line 2479 "Gmsh.y" { extr.mesh.ExtrudeMesh = true; extr.mesh.NbLayer = 1; @@ -5428,7 +5426,7 @@ case 205: ; break;} case 206: -#line 2490 "Gmsh.y" +#line 2488 "Gmsh.y" { double d; extr.mesh.ExtrudeMesh = true; @@ -5450,7 +5448,7 @@ case 206: ; break;} case 207: -#line 2510 "Gmsh.y" +#line 2508 "Gmsh.y" { yymsg(GERROR, "Explicit region numbers in layers are deprecated"); double d; @@ -5475,13 +5473,13 @@ case 207: ; break;} case 208: -#line 2533 "Gmsh.y" +#line 2531 "Gmsh.y" { extr.mesh.Recombine = true; ; break;} case 209: -#line 2537 "Gmsh.y" +#line 2535 "Gmsh.y" { int num = (int)yyvsp[-6].d; if(FindSurface(num)){ @@ -5502,7 +5500,7 @@ case 209: ; break;} case 210: -#line 2561 "Gmsh.y" +#line 2559 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-3].l); i++){ double d; @@ -5522,7 +5520,7 @@ case 210: ; break;} case 211: -#line 2579 "Gmsh.y" +#line 2577 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-6].l); i++){ double d; @@ -5542,7 +5540,7 @@ case 211: ; break;} case 212: -#line 2597 "Gmsh.y" +#line 2595 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-6].l); i++){ double d; @@ -5562,7 +5560,7 @@ case 212: ; break;} case 213: -#line 2615 "Gmsh.y" +#line 2613 "Gmsh.y" { Surface *s = FindSurface((int)yyvsp[-4].d); if(!s) @@ -5593,7 +5591,7 @@ case 213: ; break;} case 214: -#line 2644 "Gmsh.y" +#line 2642 "Gmsh.y" { Surface *s = FindSurface((int)yyvsp[-5].d); if(!s) @@ -5630,14 +5628,14 @@ case 214: ; break;} case 215: -#line 2679 "Gmsh.y" +#line 2677 "Gmsh.y" { yymsg(WARNING, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)"); List_Delete(yyvsp[-1].l); ; break;} case 216: -#line 2684 "Gmsh.y" +#line 2682 "Gmsh.y" { Volume *v = FindVolume((int)yyvsp[-4].d); if(!v) @@ -5666,7 +5664,7 @@ case 216: ; break;} case 217: -#line 2711 "Gmsh.y" +#line 2709 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-3].l); i++){ double d; @@ -5682,7 +5680,7 @@ case 217: ; break;} case 218: -#line 2725 "Gmsh.y" +#line 2723 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[-1].l); i++){ double d; @@ -5697,7 +5695,7 @@ case 218: ; break;} case 219: -#line 2744 "Gmsh.y" +#line 2742 "Gmsh.y" { Surface *s = FindSurface((int)yyvsp[-2].d); if(s) @@ -5705,7 +5703,7 @@ case 219: ; break;} case 220: -#line 2750 "Gmsh.y" +#line 2748 "Gmsh.y" { Surface *s = FindSurface((int)yyvsp[-2].d); if(s) @@ -5713,55 +5711,55 @@ case 220: ; break;} case 221: -#line 2756 "Gmsh.y" +#line 2754 "Gmsh.y" { ; break;} case 222: -#line 2759 "Gmsh.y" +#line 2757 "Gmsh.y" { ; break;} case 223: -#line 2768 "Gmsh.y" +#line 2766 "Gmsh.y" { ReplaceAllDuplicates(); ; break;} case 224: -#line 2777 "Gmsh.y" +#line 2775 "Gmsh.y" { yyval.d = yyvsp[0].d; ; break;} case 225: -#line 2778 "Gmsh.y" +#line 2776 "Gmsh.y" { yyval.d = yyvsp[-1].d; ; break;} case 226: -#line 2779 "Gmsh.y" +#line 2777 "Gmsh.y" { yyval.d = -yyvsp[0].d; ; break;} case 227: -#line 2780 "Gmsh.y" +#line 2778 "Gmsh.y" { yyval.d = yyvsp[0].d; ; break;} case 228: -#line 2781 "Gmsh.y" +#line 2779 "Gmsh.y" { yyval.d = !yyvsp[0].d; ; break;} case 229: -#line 2782 "Gmsh.y" +#line 2780 "Gmsh.y" { yyval.d = yyvsp[-2].d - yyvsp[0].d; ; break;} case 230: -#line 2783 "Gmsh.y" +#line 2781 "Gmsh.y" { yyval.d = yyvsp[-2].d + yyvsp[0].d; ; break;} case 231: -#line 2784 "Gmsh.y" +#line 2782 "Gmsh.y" { yyval.d = yyvsp[-2].d * yyvsp[0].d; ; break;} case 232: -#line 2786 "Gmsh.y" +#line 2784 "Gmsh.y" { if(!yyvsp[0].d) yymsg(GERROR, "Division by zero in '%g / %g'", yyvsp[-2].d, yyvsp[0].d); @@ -5770,247 +5768,247 @@ case 232: ; break;} case 233: -#line 2792 "Gmsh.y" +#line 2790 "Gmsh.y" { yyval.d = (int)yyvsp[-2].d % (int)yyvsp[0].d; ; break;} case 234: -#line 2793 "Gmsh.y" +#line 2791 "Gmsh.y" { yyval.d = pow(yyvsp[-2].d, yyvsp[0].d); ; break;} case 235: -#line 2794 "Gmsh.y" +#line 2792 "Gmsh.y" { yyval.d = yyvsp[-2].d < yyvsp[0].d; ; break;} case 236: -#line 2795 "Gmsh.y" +#line 2793 "Gmsh.y" { yyval.d = yyvsp[-2].d > yyvsp[0].d; ; break;} case 237: -#line 2796 "Gmsh.y" +#line 2794 "Gmsh.y" { yyval.d = yyvsp[-2].d <= yyvsp[0].d; ; break;} case 238: -#line 2797 "Gmsh.y" +#line 2795 "Gmsh.y" { yyval.d = yyvsp[-2].d >= yyvsp[0].d; ; break;} case 239: -#line 2798 "Gmsh.y" +#line 2796 "Gmsh.y" { yyval.d = yyvsp[-2].d == yyvsp[0].d; ; break;} case 240: -#line 2799 "Gmsh.y" +#line 2797 "Gmsh.y" { yyval.d = yyvsp[-2].d != yyvsp[0].d; ; break;} case 241: -#line 2800 "Gmsh.y" +#line 2798 "Gmsh.y" { yyval.d = yyvsp[-2].d && yyvsp[0].d; ; break;} case 242: -#line 2801 "Gmsh.y" +#line 2799 "Gmsh.y" { yyval.d = yyvsp[-2].d || yyvsp[0].d; ; break;} case 243: -#line 2802 "Gmsh.y" +#line 2800 "Gmsh.y" { yyval.d = yyvsp[-4].d? yyvsp[-2].d : yyvsp[0].d; ; break;} case 244: -#line 2803 "Gmsh.y" +#line 2801 "Gmsh.y" { yyval.d = exp(yyvsp[-1].d); ; break;} case 245: -#line 2804 "Gmsh.y" +#line 2802 "Gmsh.y" { yyval.d = log(yyvsp[-1].d); ; break;} case 246: -#line 2805 "Gmsh.y" +#line 2803 "Gmsh.y" { yyval.d = log10(yyvsp[-1].d); ; break;} case 247: -#line 2806 "Gmsh.y" +#line 2804 "Gmsh.y" { yyval.d = sqrt(yyvsp[-1].d); ; break;} case 248: -#line 2807 "Gmsh.y" +#line 2805 "Gmsh.y" { yyval.d = sin(yyvsp[-1].d); ; break;} case 249: -#line 2808 "Gmsh.y" +#line 2806 "Gmsh.y" { yyval.d = asin(yyvsp[-1].d); ; break;} case 250: -#line 2809 "Gmsh.y" +#line 2807 "Gmsh.y" { yyval.d = cos(yyvsp[-1].d); ; break;} case 251: -#line 2810 "Gmsh.y" +#line 2808 "Gmsh.y" { yyval.d = acos(yyvsp[-1].d); ; break;} case 252: -#line 2811 "Gmsh.y" +#line 2809 "Gmsh.y" { yyval.d = tan(yyvsp[-1].d); ; break;} case 253: -#line 2812 "Gmsh.y" +#line 2810 "Gmsh.y" { yyval.d = atan(yyvsp[-1].d); ; break;} case 254: -#line 2813 "Gmsh.y" +#line 2811 "Gmsh.y" { yyval.d = atan2(yyvsp[-3].d, yyvsp[-1].d);; break;} case 255: -#line 2814 "Gmsh.y" +#line 2812 "Gmsh.y" { yyval.d = sinh(yyvsp[-1].d); ; break;} case 256: -#line 2815 "Gmsh.y" +#line 2813 "Gmsh.y" { yyval.d = cosh(yyvsp[-1].d); ; break;} case 257: -#line 2816 "Gmsh.y" +#line 2814 "Gmsh.y" { yyval.d = tanh(yyvsp[-1].d); ; break;} case 258: -#line 2817 "Gmsh.y" +#line 2815 "Gmsh.y" { yyval.d = fabs(yyvsp[-1].d); ; break;} case 259: -#line 2818 "Gmsh.y" +#line 2816 "Gmsh.y" { yyval.d = floor(yyvsp[-1].d); ; break;} case 260: -#line 2819 "Gmsh.y" +#line 2817 "Gmsh.y" { yyval.d = ceil(yyvsp[-1].d); ; break;} case 261: -#line 2820 "Gmsh.y" +#line 2818 "Gmsh.y" { yyval.d = fmod(yyvsp[-3].d, yyvsp[-1].d); ; break;} case 262: -#line 2821 "Gmsh.y" +#line 2819 "Gmsh.y" { yyval.d = fmod(yyvsp[-3].d, yyvsp[-1].d); ; break;} case 263: -#line 2822 "Gmsh.y" +#line 2820 "Gmsh.y" { yyval.d = sqrt(yyvsp[-3].d*yyvsp[-3].d+yyvsp[-1].d*yyvsp[-1].d); ; break;} case 264: -#line 2823 "Gmsh.y" +#line 2821 "Gmsh.y" { yyval.d = yyvsp[-1].d*(double)rand()/(double)RAND_MAX; ; break;} case 265: -#line 2825 "Gmsh.y" +#line 2823 "Gmsh.y" { yyval.d = exp(yyvsp[-1].d); ; break;} case 266: -#line 2826 "Gmsh.y" +#line 2824 "Gmsh.y" { yyval.d = log(yyvsp[-1].d); ; break;} case 267: -#line 2827 "Gmsh.y" +#line 2825 "Gmsh.y" { yyval.d = log10(yyvsp[-1].d); ; break;} case 268: -#line 2828 "Gmsh.y" +#line 2826 "Gmsh.y" { yyval.d = sqrt(yyvsp[-1].d); ; break;} case 269: -#line 2829 "Gmsh.y" +#line 2827 "Gmsh.y" { yyval.d = sin(yyvsp[-1].d); ; break;} case 270: -#line 2830 "Gmsh.y" +#line 2828 "Gmsh.y" { yyval.d = asin(yyvsp[-1].d); ; break;} case 271: -#line 2831 "Gmsh.y" +#line 2829 "Gmsh.y" { yyval.d = cos(yyvsp[-1].d); ; break;} case 272: -#line 2832 "Gmsh.y" +#line 2830 "Gmsh.y" { yyval.d = acos(yyvsp[-1].d); ; break;} case 273: -#line 2833 "Gmsh.y" +#line 2831 "Gmsh.y" { yyval.d = tan(yyvsp[-1].d); ; break;} case 274: -#line 2834 "Gmsh.y" +#line 2832 "Gmsh.y" { yyval.d = atan(yyvsp[-1].d); ; break;} case 275: -#line 2835 "Gmsh.y" +#line 2833 "Gmsh.y" { yyval.d = atan2(yyvsp[-3].d, yyvsp[-1].d);; break;} case 276: -#line 2836 "Gmsh.y" +#line 2834 "Gmsh.y" { yyval.d = sinh(yyvsp[-1].d); ; break;} case 277: -#line 2837 "Gmsh.y" +#line 2835 "Gmsh.y" { yyval.d = cosh(yyvsp[-1].d); ; break;} case 278: -#line 2838 "Gmsh.y" +#line 2836 "Gmsh.y" { yyval.d = tanh(yyvsp[-1].d); ; break;} case 279: -#line 2839 "Gmsh.y" +#line 2837 "Gmsh.y" { yyval.d = fabs(yyvsp[-1].d); ; break;} case 280: -#line 2840 "Gmsh.y" +#line 2838 "Gmsh.y" { yyval.d = floor(yyvsp[-1].d); ; break;} case 281: -#line 2841 "Gmsh.y" +#line 2839 "Gmsh.y" { yyval.d = ceil(yyvsp[-1].d); ; break;} case 282: -#line 2842 "Gmsh.y" +#line 2840 "Gmsh.y" { yyval.d = fmod(yyvsp[-3].d, yyvsp[-1].d); ; break;} case 283: -#line 2843 "Gmsh.y" +#line 2841 "Gmsh.y" { yyval.d = fmod(yyvsp[-3].d, yyvsp[-1].d); ; break;} case 284: -#line 2844 "Gmsh.y" +#line 2842 "Gmsh.y" { yyval.d = sqrt(yyvsp[-3].d*yyvsp[-3].d+yyvsp[-1].d*yyvsp[-1].d); ; break;} case 285: -#line 2845 "Gmsh.y" +#line 2843 "Gmsh.y" { yyval.d = yyvsp[-1].d*(double)rand()/(double)RAND_MAX; ; break;} case 286: -#line 2854 "Gmsh.y" +#line 2852 "Gmsh.y" { yyval.d = yyvsp[0].d; ; break;} case 287: -#line 2855 "Gmsh.y" +#line 2853 "Gmsh.y" { yyval.d = 3.141592653589793; ; break;} case 288: -#line 2856 "Gmsh.y" +#line 2854 "Gmsh.y" { yyval.d = ParUtil::Instance()->rank(); ; break;} case 289: -#line 2857 "Gmsh.y" +#line 2855 "Gmsh.y" { yyval.d = ParUtil::Instance()->size(); ; break;} case 290: -#line 2858 "Gmsh.y" +#line 2856 "Gmsh.y" { yyval.d = Get_GmshMajorVersion(); ; break;} case 291: -#line 2859 "Gmsh.y" +#line 2857 "Gmsh.y" { yyval.d = Get_GmshMinorVersion(); ; break;} case 292: -#line 2860 "Gmsh.y" +#line 2858 "Gmsh.y" { yyval.d = Get_GmshPatchVersion(); ; break;} case 293: -#line 2865 "Gmsh.y" +#line 2863 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = yyvsp[0].c; @@ -6025,7 +6023,7 @@ case 293: ; break;} case 294: -#line 2881 "Gmsh.y" +#line 2879 "Gmsh.y" { char tmpstring[1024]; sprintf(tmpstring, "%s_%d", yyvsp[-4].c, (int)yyvsp[-1].d) ; @@ -6042,7 +6040,7 @@ case 294: ; break;} case 295: -#line 2896 "Gmsh.y" +#line 2894 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = yyvsp[-3].c; @@ -6064,7 +6062,7 @@ case 295: ; break;} case 296: -#line 2916 "Gmsh.y" +#line 2914 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = yyvsp[-2].c; @@ -6079,7 +6077,7 @@ case 296: ; break;} case 297: -#line 2929 "Gmsh.y" +#line 2927 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = yyvsp[-1].c; @@ -6094,7 +6092,7 @@ case 297: ; break;} case 298: -#line 2942 "Gmsh.y" +#line 2940 "Gmsh.y" { Symbol TheSymbol; TheSymbol.Name = yyvsp[-4].c; @@ -6116,7 +6114,7 @@ case 298: ; break;} case 299: -#line 2965 "Gmsh.y" +#line 2963 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -6136,7 +6134,7 @@ case 299: ; break;} case 300: -#line 2983 "Gmsh.y" +#line 2981 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -6156,7 +6154,7 @@ case 300: ; break;} case 301: -#line 3001 "Gmsh.y" +#line 2999 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -6176,7 +6174,7 @@ case 301: ; break;} case 302: -#line 3019 "Gmsh.y" +#line 3017 "Gmsh.y" { double (*pNumOpt)(int num, int action, double value); StringXNumber *pNumCat; @@ -6196,107 +6194,107 @@ case 302: ; break;} case 303: -#line 3037 "Gmsh.y" +#line 3035 "Gmsh.y" { yyval.d = GetValue(yyvsp[-3].c, yyvsp[-1].d); Free(yyvsp[-3].c); ; break;} case 304: -#line 3045 "Gmsh.y" +#line 3043 "Gmsh.y" { memcpy(yyval.v, yyvsp[0].v, 5*sizeof(double)); ; break;} case 305: -#line 3049 "Gmsh.y" +#line 3047 "Gmsh.y" { for(int i = 0; i < 5; i++) yyval.v[i] = -yyvsp[0].v[i]; ; break;} case 306: -#line 3053 "Gmsh.y" +#line 3051 "Gmsh.y" { for(int i = 0; i < 5; i++) yyval.v[i] = yyvsp[0].v[i]; ; break;} case 307: -#line 3057 "Gmsh.y" +#line 3055 "Gmsh.y" { for(int i = 0; i < 5; i++) yyval.v[i] = yyvsp[-2].v[i] - yyvsp[0].v[i]; ; break;} case 308: -#line 3061 "Gmsh.y" +#line 3059 "Gmsh.y" { for(int i = 0; i < 5; i++) yyval.v[i] = yyvsp[-2].v[i] + yyvsp[0].v[i]; ; break;} case 309: -#line 3068 "Gmsh.y" +#line 3066 "Gmsh.y" { yyval.v[0] = yyvsp[-9].d; yyval.v[1] = yyvsp[-7].d; yyval.v[2] = yyvsp[-5].d; yyval.v[3] = yyvsp[-3].d; yyval.v[4] = yyvsp[-1].d; ; break;} case 310: -#line 3072 "Gmsh.y" +#line 3070 "Gmsh.y" { yyval.v[0] = yyvsp[-7].d; yyval.v[1] = yyvsp[-5].d; yyval.v[2] = yyvsp[-3].d; yyval.v[3] = yyvsp[-1].d; yyval.v[4] = 1.0; ; break;} case 311: -#line 3076 "Gmsh.y" +#line 3074 "Gmsh.y" { yyval.v[0] = yyvsp[-5].d; yyval.v[1] = yyvsp[-3].d; yyval.v[2] = yyvsp[-1].d; yyval.v[3] = 0.0; yyval.v[4] = 1.0; ; break;} case 312: -#line 3080 "Gmsh.y" +#line 3078 "Gmsh.y" { yyval.v[0] = yyvsp[-5].d; yyval.v[1] = yyvsp[-3].d; yyval.v[2] = yyvsp[-1].d; yyval.v[3] = 0.0; yyval.v[4] = 1.0; ; break;} case 313: -#line 3087 "Gmsh.y" +#line 3085 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(List_T*)); List_Add(yyval.l, &(yyvsp[0].l)); ; break;} case 314: -#line 3092 "Gmsh.y" +#line 3090 "Gmsh.y" { List_Add(yyval.l, &(yyvsp[0].l)); ; break;} case 315: -#line 3100 "Gmsh.y" +#line 3098 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(double)); List_Add(yyval.l, &(yyvsp[0].d)); ; break;} case 316: -#line 3105 "Gmsh.y" +#line 3103 "Gmsh.y" { yyval.l = yyvsp[0].l; ; break;} case 317: -#line 3109 "Gmsh.y" +#line 3107 "Gmsh.y" { // creates an empty list yyval.l = List_Create(2, 1, sizeof(double)); ; break;} case 318: -#line 3114 "Gmsh.y" +#line 3112 "Gmsh.y" { yyval.l = yyvsp[-1].l; ; break;} case 319: -#line 3118 "Gmsh.y" +#line 3116 "Gmsh.y" { yyval.l = yyvsp[-1].l; for(int i = 0; i < List_Nbr(yyval.l); i++){ @@ -6306,7 +6304,7 @@ case 319: ; break;} case 320: -#line 3126 "Gmsh.y" +#line 3124 "Gmsh.y" { yyval.l = yyvsp[-1].l; for(int i = 0; i < List_Nbr(yyval.l); i++){ @@ -6316,7 +6314,7 @@ case 320: ; break;} case 321: -#line 3137 "Gmsh.y" +#line 3135 "Gmsh.y" { yyval.l = yyvsp[0].l; for(int i = 0; i < List_Nbr(yyval.l); i++){ @@ -6326,7 +6324,7 @@ case 321: ; break;} case 322: -#line 3145 "Gmsh.y" +#line 3143 "Gmsh.y" { yyval.l = yyvsp[0].l; for(int i = 0; i < List_Nbr(yyval.l); i++){ @@ -6336,7 +6334,7 @@ case 322: ; break;} case 323: -#line 3153 "Gmsh.y" +#line 3151 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(double)); for(double d = yyvsp[-2].d; (yyvsp[-2].d < yyvsp[0].d) ? (d <= yyvsp[0].d) : (d >= yyvsp[0].d); (yyvsp[-2].d < yyvsp[0].d) ? (d += 1.) : (d -= 1.)) @@ -6344,7 +6342,7 @@ case 323: ; break;} case 324: -#line 3159 "Gmsh.y" +#line 3157 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(double)); if(!yyvsp[0].d || (yyvsp[-4].d < yyvsp[-2].d && yyvsp[0].d < 0) || (yyvsp[-4].d > yyvsp[-2].d && yyvsp[0].d > 0)){ @@ -6357,7 +6355,7 @@ case 324: ; break;} case 325: -#line 3170 "Gmsh.y" +#line 3168 "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 @@ -6379,7 +6377,7 @@ case 325: ; break;} case 326: -#line 3190 "Gmsh.y" +#line 3188 "Gmsh.y" { yyval.l = List_Create(List_Nbr(yyvsp[0].l), 1, sizeof(double)); for(int i = 0; i < List_Nbr(yyvsp[0].l); i++){ @@ -6391,7 +6389,7 @@ case 326: ; break;} case 327: -#line 3200 "Gmsh.y" +#line 3198 "Gmsh.y" { yyval.l = List_Create(List_Nbr(yyvsp[0].l), 1, sizeof(double)); for(int i = 0; i < List_Nbr(yyvsp[0].l); i++){ @@ -6403,7 +6401,7 @@ case 327: ; break;} case 328: -#line 3210 "Gmsh.y" +#line 3208 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(double)); Symbol TheSymbol; @@ -6422,7 +6420,7 @@ case 328: ; break;} case 329: -#line 3227 "Gmsh.y" +#line 3225 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(double)); Symbol TheSymbol; @@ -6448,26 +6446,26 @@ case 329: ; break;} case 330: -#line 3254 "Gmsh.y" +#line 3252 "Gmsh.y" { yyval.l = List_Create(2, 1, sizeof(double)); List_Add(yyval.l, &(yyvsp[0].d)); ; break;} case 331: -#line 3259 "Gmsh.y" +#line 3257 "Gmsh.y" { yyval.l = yyvsp[0].l; ; break;} case 332: -#line 3263 "Gmsh.y" +#line 3261 "Gmsh.y" { List_Add(yyval.l, &(yyvsp[0].d)); ; break;} case 333: -#line 3267 "Gmsh.y" +#line 3265 "Gmsh.y" { for(int i = 0; i < List_Nbr(yyvsp[0].l); i++){ double d; @@ -6478,19 +6476,19 @@ case 333: ; break;} case 334: -#line 3280 "Gmsh.y" +#line 3278 "Gmsh.y" { yyval.u = CTX.PACK_COLOR((int)yyvsp[-7].d, (int)yyvsp[-5].d, (int)yyvsp[-3].d, (int)yyvsp[-1].d); ; break;} case 335: -#line 3284 "Gmsh.y" +#line 3282 "Gmsh.y" { yyval.u = CTX.PACK_COLOR((int)yyvsp[-5].d, (int)yyvsp[-3].d, (int)yyvsp[-1].d, 255); ; break;} case 336: -#line 3296 "Gmsh.y" +#line 3294 "Gmsh.y" { int flag; yyval.u = Get_ColorForString(ColorString, -1, yyvsp[0].c, &flag); @@ -6499,7 +6497,7 @@ case 336: ; break;} case 337: -#line 3303 "Gmsh.y" +#line 3301 "Gmsh.y" { unsigned int (*pColOpt)(int num, int action, unsigned int value); StringXColor *pColCat; @@ -6519,13 +6517,13 @@ case 337: ; break;} case 338: -#line 3324 "Gmsh.y" +#line 3322 "Gmsh.y" { yyval.l = yyvsp[-1].l; ; break;} case 339: -#line 3328 "Gmsh.y" +#line 3326 "Gmsh.y" { yyval.l = List_Create(256, 10, sizeof(unsigned int)); GmshColorTable *ct = Get_ColorTable((int)yyvsp[-3].d); @@ -6539,38 +6537,38 @@ case 339: ; break;} case 340: -#line 3343 "Gmsh.y" +#line 3341 "Gmsh.y" { yyval.l = List_Create(256, 10, sizeof(unsigned int)); List_Add(yyval.l, &(yyvsp[0].u)); ; break;} case 341: -#line 3348 "Gmsh.y" +#line 3346 "Gmsh.y" { List_Add(yyval.l, &(yyvsp[0].u)); ; break;} case 342: -#line 3355 "Gmsh.y" +#line 3353 "Gmsh.y" { yyval.c = yyvsp[0].c; ; break;} case 343: -#line 3359 "Gmsh.y" +#line 3357 "Gmsh.y" { Msg(WARNING, "Named string expressions not implemented yet"); ; break;} case 344: -#line 3366 "Gmsh.y" +#line 3364 "Gmsh.y" { yyval.c = yyvsp[0].c; ; break;} case 345: -#line 3370 "Gmsh.y" +#line 3368 "Gmsh.y" { yyval.c = (char *)Malloc(32*sizeof(char)); time_t now; @@ -6580,7 +6578,7 @@ case 345: ; break;} case 346: -#line 3378 "Gmsh.y" +#line 3376 "Gmsh.y" { yyval.c = (char *)Malloc((strlen(yyvsp[-3].c)+strlen(yyvsp[-1].c)+1)*sizeof(char)); strcpy(yyval.c, yyvsp[-3].c); @@ -6590,7 +6588,7 @@ case 346: ; break;} case 347: -#line 3386 "Gmsh.y" +#line 3384 "Gmsh.y" { yyval.c = (char *)Malloc((strlen(yyvsp[-1].c)+1)*sizeof(char)); int i; @@ -6606,7 +6604,7 @@ case 347: ; break;} case 348: -#line 3400 "Gmsh.y" +#line 3398 "Gmsh.y" { yyval.c = (char *)Malloc((strlen(yyvsp[-1].c)+1)*sizeof(char)); int i; @@ -6622,13 +6620,13 @@ case 348: ; break;} case 349: -#line 3414 "Gmsh.y" +#line 3412 "Gmsh.y" { yyval.c = yyvsp[-1].c; ; break;} case 350: -#line 3418 "Gmsh.y" +#line 3416 "Gmsh.y" { char tmpstring[1024]; int i = PrintListOfDouble(yyvsp[-3].c, yyvsp[-1].l, tmpstring); @@ -6649,7 +6647,7 @@ case 350: ; break;} case 351: -#line 3437 "Gmsh.y" +#line 3435 "Gmsh.y" { char* (*pStrOpt)(int num, int action, char *value); StringXString *pStrCat; @@ -6673,7 +6671,7 @@ case 351: ; break;} case 352: -#line 3459 "Gmsh.y" +#line 3457 "Gmsh.y" { char* (*pStrOpt)(int num, int action, char *value); StringXString *pStrCat; @@ -6918,7 +6916,7 @@ yyerrhandle: } return 1; } -#line 3482 "Gmsh.y" +#line 3480 "Gmsh.y" void DeleteSymbol(void *a, void *b){ diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index 9707365f5e93a7d6c4eaf5796d5a34dda529b186..3f12bfbb27e95346e76edbc92a1ff94220cddcce 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -1,5 +1,5 @@ %{ -// $Id: Gmsh.y,v 1.286 2007-09-10 04:47:06 geuzaine Exp $ +// $Id: Gmsh.y,v 1.287 2007-09-11 15:29:01 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -518,16 +518,14 @@ InterpolationMatrix : tInterpolationScheme '{' RecursiveListOfListOfDouble '}' '{' RecursiveListOfListOfDouble '}' tEND { - yyerror("TODO: reinterface adaptive views"); - //ViewData->adaptive = new Adaptive_Post_View(ViewData, $3, $6); + ViewData->adaptive = new Adaptive_Post_View(ViewData, $3, $6); } | tInterpolationScheme '{' RecursiveListOfListOfDouble '}' '{' RecursiveListOfListOfDouble '}' '{' RecursiveListOfListOfDouble '}' '{' RecursiveListOfListOfDouble '}' tEND { - yyerror("TODO: reinterface adaptive views"); - //ViewData->adaptive = new Adaptive_Post_View(ViewData, $3, $6, $9, $12); + ViewData->adaptive = new Adaptive_Post_View(ViewData, $3, $6, $9, $12); } ; diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp index 8f8cf6f1b26a06f6c83150330429b148167036c9..8b289b343f7f89c29523d260da03bae2a59c127a 100644 --- a/Parser/Gmsh.yy.cpp +++ b/Parser/Gmsh.yy.cpp @@ -2,7 +2,7 @@ /* A lexical scanner generated by flex */ /* Scanner skeleton version: - * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.331 2007-09-10 04:47:06 geuzaine Exp $ + * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.332 2007-09-11 15:29:01 geuzaine Exp $ */ #define FLEX_SCANNER @@ -757,7 +757,7 @@ char *yytext; #line 1 "Gmsh.l" #define INITIAL 0 #line 2 "Gmsh.l" -// $Id: Gmsh.yy.cpp,v 1.331 2007-09-10 04:47:06 geuzaine Exp $ +// $Id: Gmsh.yy.cpp,v 1.332 2007-09-11 15:29:01 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // diff --git a/Plugin/Levelset.cpp b/Plugin/Levelset.cpp index 09c32d7fdddd05318e0b1946ad8da3d041e81d18..87a1b66c5be8f5ddf3ee444372ff9210070cac2e 100644 --- a/Plugin/Levelset.cpp +++ b/Plugin/Levelset.cpp @@ -1,4 +1,4 @@ -// $Id: Levelset.cpp,v 1.34 2007-09-11 14:01:55 geuzaine Exp $ +// $Id: Levelset.cpp,v 1.35 2007-09-11 15:29:01 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -546,8 +546,10 @@ PView *GMSH_LevelsetPlugin::execute(PView *v) if(dv->isAdaptive()){ dv->adaptive->setTolerance(_targetError); - if(dv->NbST || dv->NbSS || dv->NbSQ || dv->NbSH) - dv->setAdaptiveResolutionLevel(_recurLevel, this); + if(dv->NbST || dv->NbSS || dv->NbSQ || dv->NbSH){ + dv->adaptive->setAdaptiveResolutionLevel(dv, _recurLevel, this); + v->setChanged(true); + } } if(_valueView < 0) { diff --git a/Plugin/Makefile b/Plugin/Makefile index 71596eef71edf4e928a8589de474b040df463b04..041be8d1a919f7d12652a18720eeb0664b1c2795 100644 --- a/Plugin/Makefile +++ b/Plugin/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.131 2007-09-11 14:01:55 geuzaine Exp $ +# $Id: Makefile,v 1.132 2007-09-11 15:29:01 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -125,14 +125,13 @@ CutMap.o: CutMap.cpp CutMap.h Levelset.h Plugin.h ../Common/Options.h \ ../Post/ColorTable.h ../Post/PViewDataList.h ../Post/PViewData.h \ ../Post/AdaptiveViews.h ../DataStr/List.h ../Common/GmshMatrix.h \ ../Common/Context.h -Smooth.o: Smooth.cpp Plugin.h ../Common/Options.h ../Post/ColorTable.h \ - ../Common/Message.h ../Post/PView.h ../Common/VertexArray.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \ - ../Numeric/Numeric.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Post/PViewOptions.h ../Post/ColorTable.h \ - ../Post/PViewDataList.h ../Post/PViewData.h ../Post/AdaptiveViews.h \ - ../DataStr/List.h ../Common/GmshMatrix.h Smooth.h ../Post/Views.h \ - ../Post/ColorTable.h ../Post/AdaptiveViews.h ../Common/Context.h +Smooth.o: Smooth.cpp Smooth.h Plugin.h ../Common/Options.h \ + ../Post/ColorTable.h ../Common/Message.h ../Post/PView.h \ + ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/PViewData.h \ + ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Post/PViewOptions.h \ + ../Post/ColorTable.h ../Post/PViewDataList.h ../Post/PViewData.h \ + ../Post/AdaptiveViews.h ../DataStr/List.h ../Common/GmshMatrix.h CutParametric.o: CutParametric.cpp ../Post/OctreePost.h \ ../Common/Octree.h ../Common/OctreeInternals.h CutParametric.h Plugin.h \ ../Common/Options.h ../Post/ColorTable.h ../Common/Message.h \ diff --git a/Plugin/Smooth.cpp b/Plugin/Smooth.cpp index e9a9a0f5d0a64515b925f3ad3d6dbe6afdb10806..024f6f0075217ad0209f875e97f1c18e3eecd9bf 100644 --- a/Plugin/Smooth.cpp +++ b/Plugin/Smooth.cpp @@ -1,4 +1,4 @@ -// $Id: Smooth.cpp,v 1.27 2007-09-11 14:01:55 geuzaine Exp $ +// $Id: Smooth.cpp,v 1.28 2007-09-11 15:29:02 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -19,13 +19,7 @@ // // Please report all bugs and problems to <gmsh@geuz.org>. -#include "Plugin.h" #include "Smooth.h" -#include "List.h" -#include "Views.h" -#include "Context.h" - -extern Context_T CTX; StringXNumber SmoothOptions_Number[] = { {GMSH_FULLRC, "iView", NULL, -1.} diff --git a/Post/AdaptiveViews.cpp b/Post/AdaptiveViews.cpp index 9c1493ddfc6c25594fbc93d84ef269c1d9f2ca13..1d6ff861361361e3b6d00c65bfffe1bf7815cdbd 100644 --- a/Post/AdaptiveViews.cpp +++ b/Post/AdaptiveViews.cpp @@ -25,27 +25,19 @@ #include "AdaptiveViews.h" #include "Plugin.h" #include "OS.h" -#include "Views.h" // A recursive effective implementation -void adapt_triangle::GSF (const double u, const double v, double w, double sf[]) -{ - sf[0] = 1. - u - v; - sf[1] = u; - sf[2] = v; -} - - -void computeShapeFunctions(Double_Matrix * coeffs, Double_Matrix * eexps, +void computeShapeFunctions(Double_Matrix *coeffs, Double_Matrix *eexps, double u, double v, double w, double *sf); -std::set < adapt_point > adapt_point::all_points; -std::list < adapt_edge * >adapt_edge::all_elems; -std::list < adapt_triangle * >adapt_triangle::all_elems; -std::list < adapt_tet * >adapt_tet::all_elems; -std::list < adapt_quad * >adapt_quad::all_elems; -std::list < adapt_hex * >adapt_hex::all_elems; +std::set<adapt_point> adapt_point::all_points; +std::list<adapt_edge*> adapt_edge::all_elems; +std::list<adapt_triangle*> adapt_triangle::all_elems; +std::list<adapt_tet*> adapt_tet::all_elems; +std::list<adapt_quad*> adapt_quad::all_elems; +std::list<adapt_hex*> adapt_hex::all_elems; + #define MAX_NB_NOD 8 int adapt_edge::nbNod = 2; int adapt_triangle::nbNod = 3; @@ -54,7 +46,7 @@ int adapt_quad::nbNod = 4; int adapt_hex::nbNod = 8; adapt_point *adapt_point::New(double x, double y, double z, - Double_Matrix * coeffs, Double_Matrix * eexps) + Double_Matrix *coeffs, Double_Matrix *eexps) { adapt_point p; p.x = x; @@ -66,28 +58,28 @@ adapt_point *adapt_point::New(double x, double y, double z, it = all_points.find(p); double *kkk = (double *)(it->shape_functions); computeShapeFunctions(coeffs, eexps, x, y, z, kkk); - return (adapt_point *) & (*it); + return (adapt_point *) &(*it); } else - return (adapt_point *) & (*it); + return (adapt_point *) &(*it); } -void adapt_edge::Create(int maxlevel, Double_Matrix * coeffs, - Double_Matrix * eexps) +void adapt_edge::Create(int maxlevel, Double_Matrix *coeffs, + Double_Matrix *eexps) { int level = 0; - cleanElement < adapt_edge > (); + cleanElement<adapt_edge>(); adapt_point *p1 = adapt_point::New(-1, 0, 0, coeffs, eexps); adapt_point *p2 = adapt_point::New(1, 0, 0, coeffs, eexps); adapt_edge *t = new adapt_edge(p1, p2); Recur_Create(t, maxlevel, level, coeffs, eexps); } -void adapt_triangle::Create(int maxlevel, Double_Matrix * coeffs, - Double_Matrix * eexps) +void adapt_triangle::Create(int maxlevel, Double_Matrix *coeffs, + Double_Matrix *eexps) { int level = 0; - cleanElement < adapt_triangle > (); + cleanElement<adapt_triangle>(); adapt_point *p1 = adapt_point::New(0, 0, 0, coeffs, eexps); adapt_point *p2 = adapt_point::New(0, 1, 0, coeffs, eexps); adapt_point *p3 = adapt_point::New(1, 0, 0, coeffs, eexps); @@ -96,11 +88,11 @@ void adapt_triangle::Create(int maxlevel, Double_Matrix * coeffs, } -void adapt_quad::Create(int maxlevel, Double_Matrix * coeffs, - Double_Matrix * eexps) +void adapt_quad::Create(int maxlevel, Double_Matrix *coeffs, + Double_Matrix *eexps) { int level = 0; - cleanElement < adapt_quad > (); + cleanElement<adapt_quad>(); adapt_point *p1 = adapt_point::New(-1, -1, 0, coeffs, eexps); adapt_point *p2 = adapt_point::New(1, -1, 0, coeffs, eexps); adapt_point *p3 = adapt_point::New(1, 1, 0, coeffs, eexps); @@ -109,11 +101,11 @@ void adapt_quad::Create(int maxlevel, Double_Matrix * coeffs, Recur_Create(q, maxlevel, level, coeffs, eexps); } -void adapt_tet::Create(int maxlevel, Double_Matrix * coeffs, - Double_Matrix * eexps) +void adapt_tet::Create(int maxlevel, Double_Matrix *coeffs, + Double_Matrix *eexps) { int level = 0; - cleanElement < adapt_tet > (); + cleanElement<adapt_tet>(); adapt_point *p1 = adapt_point::New(0, 0, 0, coeffs, eexps); adapt_point *p2 = adapt_point::New(0, 1, 0, coeffs, eexps); adapt_point *p3 = adapt_point::New(1, 0, 0, coeffs, eexps); @@ -122,11 +114,11 @@ void adapt_tet::Create(int maxlevel, Double_Matrix * coeffs, Recur_Create(t, maxlevel, level, coeffs, eexps); } -void adapt_hex::Create(int maxlevel, Double_Matrix * coeffs, - Double_Matrix * eexps) +void adapt_hex::Create(int maxlevel, Double_Matrix *coeffs, + Double_Matrix *eexps) { int level = 0; - cleanElement < adapt_hex > (); + cleanElement<adapt_hex>(); adapt_point *p1 = adapt_point::New(-1, -1, -1, coeffs, eexps); adapt_point *p2 = adapt_point::New(-1, 1, -1, coeffs, eexps); adapt_point *p3 = adapt_point::New(1, 1, -1, coeffs, eexps); @@ -139,8 +131,8 @@ void adapt_hex::Create(int maxlevel, Double_Matrix * coeffs, Recur_Create(h, maxlevel, level, coeffs, eexps); } -void adapt_edge::Recur_Create(adapt_edge * e, int maxlevel, int level, - Double_Matrix * coeffs, Double_Matrix * eexps) +void adapt_edge::Recur_Create(adapt_edge *e, int maxlevel, int level, + Double_Matrix *coeffs, Double_Matrix *eexps) { all_elems.push_back(e); if(level++ >= maxlevel) @@ -152,9 +144,8 @@ void adapt_edge::Recur_Create(adapt_edge * e, int maxlevel, int level, adapt_point *p1 = e->p[0]; adapt_point *p2 = e->p[1]; - adapt_point *p12 = - adapt_point::New((p1->x + p2->x) * 0.5, (p1->y + p2->y) * 0.5, - (p1->z + p2->z) * 0.5, coeffs, eexps); + adapt_point *p12 = adapt_point::New((p1->x + p2->x) * 0.5, (p1->y + p2->y) * 0.5, + (p1->z + p2->z) * 0.5, coeffs, eexps); adapt_edge *e1 = new adapt_edge(p1, p12); Recur_Create(e1, maxlevel, level, coeffs, eexps); adapt_edge *e2 = new adapt_edge(p12, p2); @@ -163,9 +154,9 @@ void adapt_edge::Recur_Create(adapt_edge * e, int maxlevel, int level, e->e[1] = e2; } -void adapt_triangle::Recur_Create(adapt_triangle * t, int maxlevel, int level, - Double_Matrix * coeffs, - Double_Matrix * eexps) +void adapt_triangle::Recur_Create(adapt_triangle *t, int maxlevel, int level, + Double_Matrix *coeffs, + Double_Matrix *eexps) { all_elems.push_back(t); if(level++ >= maxlevel) @@ -204,8 +195,8 @@ void adapt_triangle::Recur_Create(adapt_triangle * t, int maxlevel, int level, -void adapt_quad::Recur_Create(adapt_quad * q, int maxlevel, int level, - Double_Matrix * coeffs, Double_Matrix * eexps) +void adapt_quad::Recur_Create(adapt_quad *q, int maxlevel, int level, + Double_Matrix *coeffs, Double_Matrix *eexps) { all_elems.push_back(q); if(level++ >= maxlevel) @@ -248,8 +239,8 @@ void adapt_quad::Recur_Create(adapt_quad * q, int maxlevel, int level, q->e[3] = q4; } -void adapt_tet::Recur_Create(adapt_tet * t, int maxlevel, int level, - Double_Matrix * coeffs, Double_Matrix * eexps) +void adapt_tet::Recur_Create(adapt_tet *t, int maxlevel, int level, + Double_Matrix *coeffs, Double_Matrix *eexps) { all_elems.push_back(t); if(level++ >= maxlevel) @@ -300,8 +291,8 @@ void adapt_tet::Recur_Create(adapt_tet * t, int maxlevel, int level, t->e[7] = t8; } -void adapt_hex::Recur_Create(adapt_hex * h, int maxlevel, int level, - Double_Matrix * coeffs, Double_Matrix * eexps) +void adapt_hex::Recur_Create(adapt_hex *h, int maxlevel, int level, + Double_Matrix *coeffs, Double_Matrix *eexps) { all_elems.push_back(h); if(level++ >= maxlevel) @@ -416,7 +407,7 @@ void adapt_hex::Error(double AVG, double tol) Recur_Error(h, AVG, tol); } -void adapt_edge::Recur_Error(adapt_edge * e, double AVG, double tol) +void adapt_edge::Recur_Error(adapt_edge *e, double AVG, double tol) { if(!e->e[0]) e->visible = true; @@ -427,9 +418,7 @@ void adapt_edge::Recur_Error(adapt_edge * e, double AVG, double tol) double v2 = e->e[1]->V(); vr = (v1 + v2) / 2.; double v = e->V(); - if(fabs(v - vr) > AVG * tol) - //if (fabs(v - vr) > ((fabs(v) + fabs(vr) + AVG * tol) * tol)) - { + if(fabs(v - vr) > AVG * tol){ e->visible = false; Recur_Error(e->e[0], AVG, tol); Recur_Error(e->e[1], AVG, tol); @@ -460,7 +449,7 @@ void adapt_edge::Recur_Error(adapt_edge * e, double AVG, double tol) } } -void adapt_triangle::Recur_Error(adapt_triangle * t, double AVG, double tol) +void adapt_triangle::Recur_Error(adapt_triangle *t, double AVG, double tol) { if(!t->e[0]) t->visible = true; @@ -473,9 +462,7 @@ void adapt_triangle::Recur_Error(adapt_triangle * t, double AVG, double tol) double v4 = t->e[3]->V(); vr = (2 * v1 + 2 * v2 + 2 * v3 + v4) / 7.; double v = t->V(); - if(fabs(v - vr) > AVG * tol) - //if (fabs(v - vr) > ((fabs(v) + fabs(vr) + AVG * tol) * tol)) - { + if(fabs(v - vr) > AVG * tol){ t->visible = false; Recur_Error(t->e[0], AVG, tol); Recur_Error(t->e[1], AVG, tol); @@ -511,13 +498,7 @@ void adapt_triangle::Recur_Error(adapt_triangle * t, double AVG, double tol) fabs(t->e[1]->V() - vr2) > AVG * tol || fabs(t->e[2]->V() - vr3) > AVG * tol || fabs(t->e[3]->V() - vr4) > AVG * tol || - fabs(t->V() - vr) > AVG * tol) - //if (fabs(t->e[0]->V() - vr1) > (fabs(t->e[0]->V())+fabs(vr1)+AVG * tol)*tol || - // fabs(t->e[1]->V() - vr2) > (fabs(t->e[1]->V())+fabs(vr2)+AVG * tol)*tol || - // fabs(t->e[2]->V() - vr3) > (fabs(t->e[2]->V())+fabs(vr3)+AVG * tol)*tol || - // fabs(t->e[3]->V() - vr4) > (fabs(t->e[3]->V())+fabs(vr4)+AVG * tol)*tol || - // fabs(t->V() - vr) > (fabs(t->V())+fabs(vr)+AVG * tol) *tol) - { + fabs(t->V() - vr) > AVG * tol){ t->visible = false; Recur_Error(t->e[0], AVG, tol); Recur_Error(t->e[1], AVG, tol); @@ -531,7 +512,7 @@ void adapt_triangle::Recur_Error(adapt_triangle * t, double AVG, double tol) } -void adapt_quad::Recur_Error(adapt_quad * q, double AVG, double tol) +void adapt_quad::Recur_Error(adapt_quad *q, double AVG, double tol) { if(!q->e[0]) q->visible = true; @@ -544,9 +525,7 @@ void adapt_quad::Recur_Error(adapt_quad * q, double AVG, double tol) double v4 = q->e[3]->V(); vr = (v1 + v2 + v3 + v4) / 4.; double v = q->V(); - if(fabs(v - vr) > AVG * tol) - //if (fabs(v - vr) > ((fabs(v) + fabs(vr) + AVG * tol) * tol)) - { + if(fabs(v - vr) > AVG * tol){ q->visible = false; Recur_Error(q->e[0], AVG, tol); Recur_Error(q->e[1], AVG, tol); @@ -582,13 +561,7 @@ void adapt_quad::Recur_Error(adapt_quad * q, double AVG, double tol) fabs(q->e[1]->V() - vr2) > AVG * tol || fabs(q->e[2]->V() - vr3) > AVG * tol || fabs(q->e[3]->V() - vr4) > AVG * tol || - fabs(q->V() - vr) > AVG * tol) - //if (fabs(t->e[0]->V() - vr1) > (fabs(t->e[0]->V())+fabs(vr1)+AVG * tol)*tol || - // fabs(t->e[1]->V() - vr2) > (fabs(t->e[1]->V())+fabs(vr2)+AVG * tol)*tol || - // fabs(t->e[2]->V() - vr3) > (fabs(t->e[2]->V())+fabs(vr3)+AVG * tol)*tol || - // fabs(t->e[3]->V() - vr4) > (fabs(t->e[3]->V())+fabs(vr4)+AVG * tol)*tol || - // fabs(t->V() - vr) > (fabs(t->V())+fabs(vr)+AVG * tol) *tol) - { + fabs(q->V() - vr) > AVG * tol){ q->visible = false; Recur_Error(q->e[0], AVG, tol); Recur_Error(q->e[1], AVG, tol); @@ -601,7 +574,7 @@ void adapt_quad::Recur_Error(adapt_quad * q, double AVG, double tol) } } -void adapt_tet::Recur_Error(adapt_tet * t, double AVG, double tol) +void adapt_tet::Recur_Error(adapt_tet *t, double AVG, double tol) { if(!t->e[0]) t->visible = true; @@ -669,7 +642,7 @@ void adapt_tet::Recur_Error(adapt_tet * t, double AVG, double tol) } } -void adapt_hex::Recur_Error(adapt_hex * h, double AVG, double tol) +void adapt_hex::Recur_Error(adapt_hex *h, double AVG, double tol) { if(!h->e[0]) h->visible = true; @@ -704,12 +677,11 @@ void adapt_hex::Recur_Error(adapt_hex * h, double AVG, double tol) static double t0, t1, t2, t3; template < class ELEM > -int Adaptive_Post_View::zoomElement(Post_View * view, - int ielem, +int Adaptive_Post_View::zoomElement(int ielem, int level, int levelmax, - GMSH_Post_Plugin * plug, - List_T * theList, int *counter) + GMSH_Post_Plugin *plug, + List_T *theList, int *counter) { const int nbNod = ELEM::nbNod; @@ -720,8 +692,6 @@ int Adaptive_Post_View::zoomElement(Post_View * view, const int N = _coefs->size1(); - // printf("%d coefs %d nod %d points %d %d %d %d\n",N,nbNod,adapt_point::all_points.size(),_STposX->size1(),_STposX->size2(),_STval->size1(),_STval->size2()); - Double_Vector val(N), res(adapt_point::all_points.size()); Double_Vector valx(N), resx(adapt_point::all_points.size()); Double_Vector valy(N), resy(adapt_point::all_points.size()); @@ -735,7 +705,7 @@ int Adaptive_Post_View::zoomElement(Post_View * view, xyz(k, 2) = (*_STposZ)(ielem, k); } - for (int k = 0; k < N; ++k){ + for(int k = 0; k < N; ++k){ val(k) = (*_STval)(ielem, k); } @@ -757,10 +727,10 @@ int Adaptive_Post_View::zoomElement(Post_View * view, double c1 = Cpu(); int kk = 0; - for (; it !=ite; ++it){ + for(; it !=ite; ++it){ adapt_point *p = (adapt_point*) &(*it); p->val = res(kk); - if (_STvalX){ + if(_STvalX){ p->valx = resx(kk); p->valy = resy(kk); p->valz = resz(kk); @@ -769,14 +739,14 @@ int Adaptive_Post_View::zoomElement(Post_View * view, p->X = XYZ(kk, 0); p->Y = XYZ(kk, 1); p->Z = XYZ(kk, 2); - if (minval > p->val) minval = p->val; - if (maxval < p->val) maxval = p->val; + if(minval > p->val) minval = p->val; + if(maxval < p->val) maxval = p->val; kk++; } double c2 = Cpu(); - typename std::list < ELEM * >::iterator itt = ELEM::all_elems.begin(); - typename std::list < ELEM * >::iterator itte = ELEM::all_elems.end(); + typename std::list<ELEM*>::iterator itt = ELEM::all_elems.begin(); + typename std::list<ELEM*>::iterator itte = ELEM::all_elems.end(); for(; itt != itte; itt++) { (*itt)->visible = false; @@ -835,21 +805,16 @@ int Adaptive_Post_View::zoomElement(Post_View * view, We first do the adaptive stuff at level 2 and will only process elements that have reached the maximal recursion level - We compute first the matrix at max recursion level (those should be stored - on disk once in the GMSHPLUGINSHOME directory, i'll do that at some point). + We compute first the matrix at max recursion level (those should be + stored on disk once in the GMSHPLUGINSHOME directory, i'll do that + at some point). */ -void Adaptive_Post_View::setAdaptiveResolutionLevel(Post_View * view, - int level, - GMSH_Post_Plugin * plug) +void Adaptive_Post_View::setAdaptiveResolutionLevel(PViewDataList *data, int level, + GMSH_Post_Plugin *plug) { - if(presentTol == tol && presentZoomLevel == level && !plug) - return; - -// printf -// ("calling setAdaptive with level = %d and plug = %p tol %g presentTol %g\n", -// level, (void *)plug, tol, presentTol); + if(presentTol == tol && presentZoomLevel == level && !plug) return; int *done = new int[_STposX->size1()]; for(int i = 0; i < _STposX->size1(); ++i) @@ -858,88 +823,85 @@ void Adaptive_Post_View::setAdaptiveResolutionLevel(Post_View * view, int nbelm = _STposX->size1(); int TYP = 0; - if(view->NbSL) { + if(data->NbSL) { TYP = 7; - List_Delete(view->SL); - view->NbSL = 0; - view->SL = List_Create(nbelm * 8, nbelm, sizeof(double)); + List_Delete(data->SL); + data->NbSL = 0; + data->SL = List_Create(nbelm * 8, nbelm, sizeof(double)); } - if (view->NbVT) { + if(data->NbVT) { TYP = 5; - List_Delete(view->VT); - view->NbVT = 0; - view->VT =List_Create ( nbelm * 36, nbelm , sizeof(double)); + List_Delete(data->VT); + data->NbVT = 0; + data->VT = List_Create(nbelm * 36, nbelm , sizeof(double)); } - else if(view->NbST) { + else if(data->NbST) { TYP = 1; - List_Delete(view->ST); - view->NbST = 0; - view->ST = List_Create(nbelm * 4, nbelm, sizeof(double)); + List_Delete(data->ST); + data->NbST = 0; + data->ST = List_Create(nbelm * 4, nbelm, sizeof(double)); } - if(view->NbSS) { + if(data->NbSS) { TYP = 3; - List_Delete(view->SS); - view->NbSS = 0; - view->SS = List_Create(nbelm * 4, nbelm, sizeof(double)); + List_Delete(data->SS); + data->NbSS = 0; + data->SS = List_Create(nbelm * 4, nbelm, sizeof(double)); } - if(view->NbSQ) { + if(data->NbSQ) { TYP = 2; - List_Delete(view->SQ); - view->NbSQ = 0; - view->SQ = List_Create(nbelm * 20, nbelm * 20, sizeof(double)); + List_Delete(data->SQ); + data->NbSQ = 0; + data->SQ = List_Create(nbelm * 20, nbelm * 20, sizeof(double)); } - if(view->NbVQ) { + if(data->NbVQ) { TYP = 6; - List_Delete(view->VQ); - view->NbVQ = 0; - view->VQ = List_Create(nbelm * 60, nbelm * 20, sizeof(double)); + List_Delete(data->VQ); + data->NbVQ = 0; + data->VQ = List_Create(nbelm * 60, nbelm * 20, sizeof(double)); } - if(view->NbSH) { + if(data->NbSH) { TYP = 4; - List_Delete(view->SH); - view->NbSH = 0; - view->SH = List_Create(nbelm * 4, nbelm, sizeof(double)); + List_Delete(data->SH); + data->NbSH = 0; + data->SH = List_Create(nbelm * 4, nbelm, sizeof(double)); } - view->NbTimeStep = 1; + data->NbTimeStep = 1; t0 = t1 = t2 = t3 = 0; - while (1){ + while(1){ if(TYP == 7) - setAdaptiveResolutionLevel_TEMPL < adapt_edge > (view, level_act, level, plug, - &(view->SL), &(view->NbSL), done); - if (TYP == 1) - setAdaptiveResolutionLevel_TEMPL <adapt_triangle> (view, level_act, level, plug, - &(view->ST), &(view->NbST), done); - if (TYP == 5) - setAdaptiveResolutionLevel_TEMPL <adapt_triangle> (view, level_act, level, plug, - &(view->VT), &(view->NbVT), done); - if (TYP == 2) - setAdaptiveResolutionLevel_TEMPL <adapt_quad> (view, level_act, level, plug, - &(view->SQ), &(view->NbSQ), done); - if (TYP == 6) - setAdaptiveResolutionLevel_TEMPL <adapt_quad> (view, level_act, level, plug, - &(view->VQ), &(view->NbVQ), done); - if (TYP == 4) - setAdaptiveResolutionLevel_TEMPL <adapt_hex> (view, level_act, level, plug, - &(view->SH), &(view->NbSH), done); - if (TYP == 3) - setAdaptiveResolutionLevel_TEMPL <adapt_tet> (view, level_act, level, plug, - &(view->SS), &(view->NbSS), done); + setAdaptiveResolutionLevel_TEMPL<adapt_edge>(level_act, level, plug, + &(data->SL), &(data->NbSL), done); + if(TYP == 1) + setAdaptiveResolutionLevel_TEMPL<adapt_triangle>(level_act, level, plug, + &(data->ST), &(data->NbST), done); + if(TYP == 5) + setAdaptiveResolutionLevel_TEMPL<adapt_triangle>(level_act, level, plug, + &(data->VT), &(data->NbVT), done); + if(TYP == 2) + setAdaptiveResolutionLevel_TEMPL<adapt_quad>(level_act, level, plug, + &(data->SQ), &(data->NbSQ), done); + if(TYP == 6) + setAdaptiveResolutionLevel_TEMPL<adapt_quad>(level_act, level, plug, + &(data->VQ), &(data->NbVQ), done); + if(TYP == 4) + setAdaptiveResolutionLevel_TEMPL<adapt_hex>(level_act, level, plug, + &(data->SH), &(data->NbSH), done); + if(TYP == 3) + setAdaptiveResolutionLevel_TEMPL<adapt_tet>(level_act, level, plug, + &(data->SS), &(data->NbSS), done); int nbDone = 0; - for(int i=0; i < _STposX->size1(); ++i) nbDone += done[i]; - // printf("adaptive %d %d %d %d\n", level, level_act, nbDone, _STposX->size1()); - if (nbDone ==_STposX->size1()) break; - if (level_act >= level) break; - level_act ++; + for(int i = 0; i < _STposX->size1(); ++i) nbDone += done[i]; + // printf("adaptive %d %d %d %d\n", level, level_act, nbDone, _STposX->size1()); + if(nbDone == _STposX->size1()) break; + if(level_act >= level) break; + level_act++; } - // recompute min/max, etc.: - view->Min = VAL_INF; - view->Max = -VAL_INF; - //FIXME xxxxxxxxxxxxxxxxxxx EndView(view, 0, view->FileName, view->Name); - view->Changed = 1; + data->finalize(); + presentZoomLevel = level; presentTol = tol; @@ -947,18 +909,13 @@ void Adaptive_Post_View::setAdaptiveResolutionLevel(Post_View * view, delete[]done; } -template < class ELEM > -void Adaptive_Post_View::setAdaptiveResolutionLevel_TEMPL(Post_View * view, - int level, - int levelmax, - GMSH_Post_Plugin * - plug, - List_T ** myList, - int *counter, - int *done) +template<class ELEM> +void Adaptive_Post_View::setAdaptiveResolutionLevel_TEMPL(int level, int levelmax, + GMSH_Post_Plugin *plug, + List_T **myList, + int *counter, int *done) { const int N = _coefs->size1(); - const int nbelm = _STposX->size1(); double sf[100]; @@ -977,17 +934,15 @@ void Adaptive_Post_View::setAdaptiveResolutionLevel_TEMPL(Post_View * view, for(; it != ite; ++it) { adapt_point *p = (adapt_point *) & (*it); for(int k = 0; k < N; ++k) { - (*_Interpolate) (kk, k) = p->shape_functions[k]; + (*_Interpolate)(kk, k) = p->shape_functions[k]; } - if (_coefsGeom) - { - computeShapeFunctions(_coefsGeom, _eexpsGeom, p->x, p->y, p->z, sf); - } - else - { - ELEM::GSF(p->x, p->y, p->z, sf); - } + if(_coefsGeom){ + computeShapeFunctions(_coefsGeom, _eexpsGeom, p->x, p->y, p->z, sf); + } + else{ + ELEM::GSF(p->x, p->y, p->z, sf); + } for(int k = 0; k < _STposX->size2(); k++) (*_Geometry) (kk, k) = sf[k]; kk++; @@ -995,156 +950,144 @@ void Adaptive_Post_View::setAdaptiveResolutionLevel_TEMPL(Post_View * view, for(int i = 0; i < nbelm; ++i) { if(!done[i]) - done[i] = - zoomElement < ELEM > (view, i, level, levelmax, plug, *myList, - counter); + done[i] = zoomElement<ELEM>(i, level, levelmax, plug, *myList, counter); } } -void computeShapeFunctions(Double_Matrix * coeffs, Double_Matrix * eexps, +void computeShapeFunctions(Double_Matrix *coeffs, Double_Matrix *eexps, double u, double v, double w, double *sf) { static double powsuvw[256]; for(int j = 0; j < coeffs->size2(); ++j) { - double powu = (*eexps) (j, 0); - double powv = (*eexps) (j, 1); - double poww = (*eexps) (j, 2); + double powu = (*eexps)(j, 0); + double powv = (*eexps)(j, 1); + double poww = (*eexps)(j, 2); powsuvw[j] = pow(u, powu) * pow(v, powv) * pow(w, poww); } for(int i = 0; i < coeffs->size1(); ++i) { sf[i] = 0.0; for(int j = 0; j < coeffs->size2(); ++j) { - sf[i] += (*coeffs) (i, j) * powsuvw[j]; + sf[i] += (*coeffs)(i, j) * powsuvw[j]; } } } -void Adaptive_Post_View::initWithLowResolution(Post_View * view) +void Adaptive_Post_View::initWithLowResolution(PViewDataList *data) { List_T *myList; int nbelm; int nbnod; - int nbComp = 1; - // printf("%d\n",view->NbST); - - - if (view->NbST){ - myList = view->ST; - nbelm = view->NbST; + if(data->NbST){ + myList = data->ST; + nbelm = data->NbST; nbnod = 3; } - else if(view->NbSL){ - myList = view->SL; - nbelm = view->NbSL; + else if(data->NbSL){ + myList = data->SL; + nbelm = data->NbSL; nbnod = 2; } - else if (view->NbVT){ - myList = view->VT; - nbelm = view->NbVT; + else if(data->NbVT){ + myList = data->VT; + nbelm = data->NbVT; nbnod = 3; nbComp = 3; } - else if (view->NbVQ){ - myList = view->VQ; - nbelm = view->NbVQ; + else if(data->NbVQ){ + myList = data->VQ; + nbelm = data->NbVQ; nbnod = 4; nbComp = 3; } - else if (view->NbSS){ - myList = view->SS; - nbelm = view->NbSS; + else if(data->NbSS){ + myList = data->SS; + nbelm = data->NbSS; nbnod = 4; } - else if (view->NbSQ){ - myList = view->SQ; - nbelm = view->NbSQ; + else if(data->NbSQ){ + myList = data->SQ; + nbelm = data->NbSQ; nbnod = 4; } - else if (view->NbSH){ - myList = view->SH; - nbelm = view->NbSH; + else if(data->NbSH){ + myList = data->SH; + nbelm = data->NbSH; nbnod = 8; } else return; // if there exists a polynomial representation // of the geometry , then use it - if (_coefsGeom) - { - nbnod = _coefsGeom -> size1 (); - // printf("THERE IS A GEOMETRY !!!!!!!! nbNod = %d\n",nbnod); - } - else - { - printf("coucouc2\n"); - } + if(_coefsGeom){ + nbnod = _coefsGeom->size1(); + } minval = VAL_INF; maxval = -VAL_INF; int nb = List_Nbr(myList) / (nbelm); - _STposX = new Double_Matrix ( nbelm , nbnod ); - _STposY = new Double_Matrix ( nbelm , nbnod ); - _STposZ = new Double_Matrix ( nbelm , nbnod ); - _STval = new Double_Matrix ( nbelm , (nb-3*nbnod)/nbComp ); + _STposX = new Double_Matrix(nbelm, nbnod); + _STposY = new Double_Matrix(nbelm, nbnod); + _STposZ = new Double_Matrix(nbelm, nbnod); + _STval = new Double_Matrix(nbelm, (nb - 3 * nbnod) / nbComp); - if (nbComp == 3){ - _STvalX = new Double_Matrix ( nbelm , (nb-3*nbnod)/nbComp ); - _STvalY = new Double_Matrix ( nbelm , (nb-3*nbnod)/nbComp ); - _STvalZ = new Double_Matrix ( nbelm , (nb-3*nbnod)/nbComp ); + if(nbComp == 3){ + _STvalX = new Double_Matrix(nbelm, (nb - 3 * nbnod) / nbComp); + _STvalY = new Double_Matrix(nbelm, (nb - 3 * nbnod) / nbComp); + _STvalZ = new Double_Matrix(nbelm, (nb - 3 * nbnod) / nbComp); } - /// Store non interpolated data - - int k=0; - for (int i=0;i<List_Nbr(myList);i+=nb){ - double *x = (double*)List_Pointer_Fast (myList,i); - double *y = (double*)List_Pointer_Fast (myList,i+nbnod); - double *z = (double*)List_Pointer_Fast (myList,i+2*nbnod); - for (int NN=0;NN<nbnod;NN++){ - (*_STposX) ( k , NN) = x[NN]; - (*_STposY) ( k , NN) = y[NN]; - (*_STposZ) ( k , NN) = z[NN]; + + // Store non interpolated data + int k = 0; + for(int i = 0; i < List_Nbr(myList); i+= nb){ + double *x = (double*)List_Pointer_Fast(myList, i); + double *y = (double*)List_Pointer_Fast(myList, i + nbnod); + double *z = (double*)List_Pointer_Fast(myList, i + 2 * nbnod); + for(int NN = 0; NN < nbnod; NN++){ + (*_STposX)(k, NN) = x[NN]; + (*_STposY)(k, NN) = y[NN]; + (*_STposZ)(k, NN) = z[NN]; } - double *val = (double*)List_Pointer_Fast (myList,i+3*nbnod); - if (nbComp == 1){ - for (int j=0;j<(nb-3*nbnod)/nbComp;j++){ - (*_STval)(k,j)=val[j]; + double *val = (double*)List_Pointer_Fast(myList, i + 3 * nbnod); + if(nbComp == 1){ + for(int j = 0; j < (nb - 3 * nbnod) / nbComp; j++){ + (*_STval)(k, j) = val[j]; } } - else if (nbComp == 3){ - int size = (nb-3*nbnod)/3; - for (int j=0;j<size;j++){ - int index1 = j; - int index2 = j+size; - int index3 = j+2*size; + else if(nbComp == 3){ + int size = (nb - 3 * nbnod) / 3; + for(int j = 0; j < size; j++){ + int index1 = j; + int index2 = j + size; + int index3 = j + 2 * size; // adaptation of the visualization mesh bases on the norm squared of the vector - (*_STval)(k,j)=(val[index1]*val[index1] + val[index2]*val[index2] + - val[index3]*val[index3]); - (*_STvalX)(k,j)=val[index1]; - (*_STvalY)(k,j)=val[index2]; - (*_STvalZ)(k,j)=val[index3]; + (*_STval)(k, j) = (val[index1] * val[index1] + val[index2] * val[index2] + + val[index3] * val[index3]); + (*_STvalX)(k, j) = val[index1]; + (*_STvalY)(k, j) = val[index2]; + (*_STvalZ)(k, j) = val[index3]; } } k++; } - setAdaptiveResolutionLevel(view, 0); + setAdaptiveResolutionLevel(data, 0); } -Adaptive_Post_View::Adaptive_Post_View(Post_View * view, - List_T * _c, - List_T * _pol, - List_T * _cGeom, - List_T * _polGeom) - :tol(1.e-3),_coefsGeom(0),_eexpsGeom(0) +Adaptive_Post_View::Adaptive_Post_View(PViewDataList *data, + List_T *_c, + List_T *_pol, + List_T *_cGeom, + List_T *_polGeom) + :tol(1.e-3), _coefsGeom(0), _eexpsGeom(0) { _Interpolate = _Geometry = 0; - _coefs = new Double_Matrix ( List_Nbr (_c) , List_Nbr (_c) ); - _eexps = new Double_Matrix ( List_Nbr (_c) , 3 ); + _coefs = new Double_Matrix(List_Nbr(_c), List_Nbr(_c)); + _eexps = new Double_Matrix(List_Nbr(_c), 3); _STvalX = _STvalY = _STvalZ =0; @@ -1158,46 +1101,38 @@ Adaptive_Post_View::Adaptive_Post_View(Post_View * view, List_Read(*eexp, 1, &dpowv); List_Read(*eexp, 2, &dpoww); - (*_eexps) (i, 0) = dpowu; - (*_eexps) (i, 1) = dpowv; - (*_eexps) (i, 2) = dpoww; + (*_eexps)(i, 0) = dpowu; + (*_eexps)(i, 1) = dpowv; + (*_eexps)(i, 2) = dpoww; for(int j = 0; j < List_Nbr(*line); ++j) { double val; List_Read(*line, j, &val); - (*_coefs) (i, j) = val; + (*_coefs)(i, j) = val; } } - if (_cGeom && _polGeom) - { - - printf("coucou %d \n",List_Nbr (_cGeom)); - - _coefsGeom = new Double_Matrix ( List_Nbr (_cGeom) , List_Nbr (_cGeom) ); - _eexpsGeom = new Double_Matrix ( List_Nbr (_cGeom) , 3 ); - for(int i = 0; i < List_Nbr(_cGeom); ++i) { - List_T **line = (List_T **) List_Pointer_Fast(_cGeom, i); - List_T **eexp = (List_T **) List_Pointer_Fast(_polGeom, i); - - double dpowu, dpowv, dpoww; - - List_Read(*eexp, 0, &dpowu); - List_Read(*eexp, 1, &dpowv); - List_Read(*eexp, 2, &dpoww); - - (*_eexpsGeom) (i, 0) = dpowu; - (*_eexpsGeom) (i, 1) = dpowv; - (*_eexpsGeom) (i, 2) = dpoww; - - for(int j = 0; j < List_Nbr(*line); ++j) { - double val; - List_Read(*line, j, &val); - (*_coefsGeom) (i, j) = val; - } - } - } - initWithLowResolution(view); + if(_cGeom && _polGeom){ + _coefsGeom = new Double_Matrix(List_Nbr(_cGeom), List_Nbr(_cGeom)); + _eexpsGeom = new Double_Matrix(List_Nbr(_cGeom), 3); + for(int i = 0; i < List_Nbr(_cGeom); ++i) { + List_T **line = (List_T **) List_Pointer_Fast(_cGeom, i); + List_T **eexp = (List_T **) List_Pointer_Fast(_polGeom, i); + double dpowu, dpowv, dpoww; + List_Read(*eexp, 0, &dpowu); + List_Read(*eexp, 1, &dpowv); + List_Read(*eexp, 2, &dpoww); + (*_eexpsGeom)(i, 0) = dpowu; + (*_eexpsGeom)(i, 1) = dpowv; + (*_eexpsGeom)(i, 2) = dpoww; + for(int j = 0; j < List_Nbr(*line); ++j) { + double val; + List_Read(*line, j, &val); + (*_coefsGeom)(i, j) = val; + } + } + } + initWithLowResolution(data); } Adaptive_Post_View::~Adaptive_Post_View() @@ -1209,18 +1144,19 @@ Adaptive_Post_View::~Adaptive_Post_View() delete _STposZ; delete _STval; - if (_coefsGeom) + if(_coefsGeom) delete _coefsGeom; - if (_eexpsGeom) + if(_eexpsGeom) delete _eexpsGeom; if(_Interpolate) delete _Interpolate; if(_Geometry) delete _Geometry; - cleanElement < adapt_edge > (); - cleanElement < adapt_triangle > (); - cleanElement < adapt_tet > (); - cleanElement < adapt_hex > (); - cleanElement < adapt_quad > (); + + cleanElement<adapt_edge>(); + cleanElement<adapt_triangle>(); + cleanElement<adapt_tet>(); + cleanElement<adapt_hex>(); + cleanElement<adapt_quad>(); } diff --git a/Post/AdaptiveViews.h b/Post/AdaptiveViews.h index aea8958e27a02f708c7d9e8796eba4cda9b5fd80..1cf2c75731ed1094d420517db1b196c2e0cfe07e 100644 --- a/Post/AdaptiveViews.h +++ b/Post/AdaptiveViews.h @@ -27,7 +27,7 @@ #define MAX_LEVEL_OF_ZOOM 8 -class Post_View; +class PViewDataList; class GMSH_Post_Plugin; // On a triangle, we suppose that there exists an interpolation scheme @@ -37,17 +37,17 @@ class GMSH_Post_Plugin; class adapt_point { -public : + public: double x,y,z; double X,Y,Z,val,valx,valy,valz; double shape_functions[128]; - static adapt_point * New (double x, double y, double z, - Double_Matrix *coeffs, Double_Matrix *eexps); - void print () const + static adapt_point *New(double x, double y, double z, + Double_Matrix *coeffs, Double_Matrix *eexps); + void print() const { - printf("p %g %g\n" ,x,y); + printf("p %g %g\n", x, y); } - bool operator < (const adapt_point & other) const + bool operator < (const adapt_point &other) const { if(other.x < x) return true; if(other.x > x) return false; @@ -61,65 +61,70 @@ public : class adapt_edge { -public: - adapt_edge (adapt_point *p1,adapt_point *p2) + public: + adapt_edge(adapt_point *p1,adapt_point *p2) : visible(false) { p[0] = p1; p[1] = p2; e[0] = e[1] = 0; } - inline double V () const + inline double V() const { - return (p[0]->val + p[1]->val)/2.; + return (p[0]->val + p[1]->val) / 2.; } - inline static void GSF (const double u, const double v, double w, double sf[]) + inline static void GSF(const double u, const double v, double w, double sf[]) { - sf[0] = (1-u)/2.; - sf[1] = (1+u)/2.; + sf[0] = (1 - u) / 2.; + sf[1] = (1 + u) / 2.; } - void print () + void print() { printf("p1 %g %g p2 %g %g\n", p[0]->x, p[0]->y, p[1]->x, p[1]->y); } - static void Create (int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps) ; - static void Recur_Create (adapt_edge *e, int maxlevel, int level, - Double_Matrix *coeffs, Double_Matrix *eexps); - static void Error (double AVG , double tol ); - static void Recur_Error (adapt_edge *e, double AVG, double tol); + static void Create(int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps); + static void Recur_Create(adapt_edge *e, int maxlevel, int level, + Double_Matrix *coeffs, Double_Matrix *eexps); + static void Error(double AVG, double tol); + static void Recur_Error(adapt_edge *e, double AVG, double tol); bool visible; adapt_point *p[2]; - adapt_edge *e[2]; + adapt_edge *e[2]; static std::list<adapt_edge*> all_elems; static int nbNod; }; class adapt_triangle { -public: - adapt_triangle (adapt_point *p1, adapt_point *p2, adapt_point *p3) - : visible (false) + public: + adapt_triangle(adapt_point *p1, adapt_point *p2, adapt_point *p3) + : visible(false) { p[0] = p1; p[1] = p2; p[2] = p3; e[0] = e[1] = e[2] = e[3] = 0; } - inline double V () const + inline double V() const { - return (p[0]->val + p[1]->val + p[2]->val)/3.; + return (p[0]->val + p[1]->val + p[2]->val) / 3.; } - static void GSF (const double u, const double v, double w, double sf[]); - void print () + static void GSF(const double u, const double v, double w, double sf[]) + { + sf[0] = 1. - u - v; + sf[1] = u; + sf[2] = v; + } + void print() { printf("p1 %g %g p2 %g %g p3 %g %g\n", p[0]->x, p[0]->y, p[1]->x, p[1]->y, p[2]->x, p[2]->y); } - static void Create (int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps); - static void Recur_Create (adapt_triangle *t, int maxlevel, int level, - Double_Matrix *coeffs, Double_Matrix *eexps); - static void Error (double AVG, double tol); - static void Recur_Error (adapt_triangle *t, double AVG, double tol); + static void Create(int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps); + static void Recur_Create(adapt_triangle *t, int maxlevel, int level, + Double_Matrix *coeffs, Double_Matrix *eexps); + static void Error(double AVG, double tol); + static void Recur_Error(adapt_triangle *t, double AVG, double tol); bool visible; adapt_point *p[3]; adapt_triangle *e[4]; @@ -127,15 +132,11 @@ public: static int nbNod; }; - - - - class adapt_quad { -public: - adapt_quad (adapt_point *p1, adapt_point *p2, adapt_point *p3, adapt_point *p4) - : visible (false) + public: + adapt_quad(adapt_point *p1, adapt_point *p2, adapt_point *p3, adapt_point *p4) + : visible(false) { p[0] = p1; p[1] = p2; @@ -143,11 +144,11 @@ public: p[3] = p4; e[0] = e[1] = e[2] = e[3] = 0; } - inline double V () const + inline double V() const { - return (p[0]->val + p[1]->val + p[2]->val + p[3]->val)/4.; + return (p[0]->val + p[1]->val + p[2]->val + p[3]->val) / 4.; } - inline static void GSF (const double u, const double v, double w, double sf[]) + inline static void GSF(const double u, const double v, double w, double sf[]) { sf[0] = 0.25 * (1. - u) * (1. - v); sf[1] = 0.25 * (1. + u) * (1. - v); @@ -159,11 +160,11 @@ public: printf("p1 %g %g p2 %g %g p3 %g %g\n", p[0]->x, p[0]->y, p[1]->x, p[1]->y, p[2]->x, p[2]->y); } - static void Create (int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps); - static void Recur_Create (adapt_quad *q, int maxlevel, int level, - Double_Matrix *coeffs, Double_Matrix *eexps); - static void Error (double AVG, double tol); - static void Recur_Error (adapt_quad *q, double AVG, double tol); + static void Create(int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps); + static void Recur_Create(adapt_quad *q, int maxlevel, int level, + Double_Matrix *coeffs, Double_Matrix *eexps); + static void Error(double AVG, double tol); + static void Recur_Error(adapt_quad *q, double AVG, double tol); bool visible; adapt_point *p[4]; adapt_quad *e[4]; @@ -173,9 +174,9 @@ public: class adapt_tet { -public: - adapt_tet (adapt_point *p1, adapt_point *p2, adapt_point *p3, adapt_point *p4) - : visible (false) + public: + adapt_tet(adapt_point *p1, adapt_point *p2, adapt_point *p3, adapt_point *p4) + : visible(false) { p[0] = p1; p[1] = p2; @@ -184,27 +185,27 @@ public: e[0] = e[1] = e[2] = e[3] = 0; e[4] = e[5] = e[6] = e[7] = 0; } - inline static void GSF (const double u, const double v, double w, double sf[]) + inline static void GSF(const double u, const double v, double w, double sf[]) { sf[0] = 1. - u - v - w; sf[1] = u; sf[2] = v; sf[3] = w; } - inline double V () const + inline double V() const { - return (p[0]->val + p[1]->val + p[2]->val + p[3]->val)/4.; + return (p[0]->val + p[1]->val + p[2]->val + p[3]->val) / 4.; } - void print () + void print() { printf("p1 %g %g p2 %g %g p3 %g %g\n", p[0]->x, p[0]->y, p[1]->x, p[1]->y, p[2]->x, p[2]->y); } - static void Create (int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps); - static void Recur_Create (adapt_tet *t, int maxlevel, int level, - Double_Matrix *coeffs, Double_Matrix *eexps); - static void Error (double AVG, double tol); - static void Recur_Error (adapt_tet *t, double AVG, double tol); + static void Create(int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps); + static void Recur_Create(adapt_tet *t, int maxlevel, int level, + Double_Matrix *coeffs, Double_Matrix *eexps); + static void Error(double AVG, double tol); + static void Recur_Error(adapt_tet *t, double AVG, double tol); bool visible; adapt_point *p[4]; adapt_tet *e[8]; @@ -214,10 +215,10 @@ public: class adapt_hex { -public: - adapt_hex (adapt_point *p1, adapt_point *p2, adapt_point *p3, adapt_point *p4, - adapt_point *p5, adapt_point *p6, adapt_point *p7, adapt_point *p8) - : visible (false) + public: + adapt_hex(adapt_point *p1, adapt_point *p2, adapt_point *p3, adapt_point *p4, + adapt_point *p5, adapt_point *p6, adapt_point *p7, adapt_point *p8) + : visible(false) { p[0] = p1; p[1] = p2; @@ -230,7 +231,7 @@ public: e[0] = e[1] = e[2] = e[3] = 0; e[4] = e[5] = e[6] = e[7] = 0; } - inline static void GSF (const double u, const double v, double w, double sf[]) + inline static void GSF(const double u, const double v, double w, double sf[]) { sf[0] = 0.125 * (1 - u) * (1 - v) * (1 - w); sf[1] = 0.125 * (1 + u) * (1 - v) * (1 - w); @@ -241,21 +242,21 @@ public: sf[6] = 0.125 * (1 + u) * (1 + v) * (1 + w); sf[7] = 0.125 * (1 - u) * (1 + v) * (1 + w); } - inline double V () const + inline double V() const { return (p[0]->val + p[1]->val + p[2]->val+ p[3]->val + - p[4]->val + p[5]->val + p[6]->val+ p[7]->val)/8.; + p[4]->val + p[5]->val + p[6]->val+ p[7]->val) / 8.; } - void print () + void print() { printf("p1 %g %g p2 %g %g p3 %g %g\n", p[0]->x, p[0]->y, p[1]->x, p[1]->y, p[2]->x, p[2]->y); } - static void Create (int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps); - static void Recur_Create (adapt_hex *h, int maxlevel, int level, - Double_Matrix *coeffs, Double_Matrix *eexps); - static void Error (double AVG, double tol); - static void Recur_Error (adapt_hex *h, double AVG, double tol); + static void Create(int maxlevel, Double_Matrix *coeffs, Double_Matrix *eexps); + static void Recur_Create(adapt_hex *h, int maxlevel, int level, + Double_Matrix *coeffs, Double_Matrix *eexps); + static void Error(double AVG, double tol); + static void Recur_Error(adapt_hex *h, double AVG, double tol); bool visible; adapt_point *p[8]; adapt_hex *e[8]; @@ -284,32 +285,33 @@ class Adaptive_Post_View Double_Matrix * _Interpolate; Double_Matrix * _Geometry; public: - Adaptive_Post_View (Post_View *view, List_T *_coeffs, List_T *_eexps, List_T *_coeffsGeom=0, List_T *_eexpsGeom=0); - ~Adaptive_Post_View (); - int getGlobalResolutionLevel () const { return presentZoomLevel; } - void setGlobalResolutionLevel (Post_View * view, int level) + Adaptive_Post_View(PViewDataList *data, List_T *_coeffs, List_T *_eexps, + List_T *_coeffsGeom=0, List_T *_eexpsGeom=0); + ~Adaptive_Post_View(); + int getGlobalResolutionLevel() const { return presentZoomLevel; } + void setGlobalResolutionLevel(PViewDataList *data, int level) { - setAdaptiveResolutionLevel(view, level); + setAdaptiveResolutionLevel(data, level); } + void setAdaptiveResolutionLevel(PViewDataList *data, int levelmax, + GMSH_Post_Plugin *plug = 0); template <class ELEM> - void setAdaptiveResolutionLevel_TEMPL(Post_View * view, int level, int lemvelmax, + void setAdaptiveResolutionLevel_TEMPL(int level, int lemvelmax, GMSH_Post_Plugin *plug, List_T **myList, int *counter, int *done); - void setAdaptiveResolutionLevel (Post_View * view , int levelmax, - GMSH_Post_Plugin *plug = 0); - void initWithLowResolution (Post_View *view); - void setTolerance (const double eps) { tol=eps; } - double getTolerance () const { return tol; } + void initWithLowResolution(PViewDataList *data); + void setTolerance(const double eps) { tol = eps; } + double getTolerance() const { return tol; } template <class ELEM> - int zoomElement (Post_View * view, int ielem, int level, int levelmax, - GMSH_Post_Plugin *plug, List_T *theList, int *counter); + int zoomElement(int ielem, int level, int levelmax, + GMSH_Post_Plugin *plug, List_T *theList, int *counter); }; template <class ELEM> void cleanElement () { - typename std::list<ELEM*>::iterator it = ELEM::all_elems.begin(); - typename std::list<ELEM*>::iterator ite = ELEM::all_elems.end(); + typename std::list<ELEM*>::iterator it = ELEM::all_elems.begin(); + typename std::list<ELEM*>::iterator ite = ELEM::all_elems.end(); for (; it != ite; ++it){ delete *it; } diff --git a/Post/Makefile b/Post/Makefile index e332e02453b878a0d09c41afc531ba28b08c9d12..d60279f65f1fdf8fb118a9e7f25feab07b8b5316 100644 --- a/Post/Makefile +++ b/Post/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.14 2007-09-11 14:01:55 geuzaine Exp $ +# $Id: Makefile,v 1.15 2007-09-11 15:29:02 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -99,7 +99,7 @@ AdaptiveViews.o: AdaptiveViews.cpp AdaptiveViews.h ../DataStr/List.h \ ../Common/SmoothData.h ../Numeric/Numeric.h ../Post/PViewData.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Post/PViewOptions.h \ ../Post/ColorTable.h ../Post/PViewDataList.h ../Post/PViewData.h \ - ../Post/AdaptiveViews.h ../Common/OS.h Views.h ColorTable.h + ../Post/AdaptiveViews.h ../Common/OS.h OctreePost.o: OctreePost.cpp ../Common/Octree.h \ ../Common/OctreeInternals.h OctreePost.h ../DataStr/List.h PView.h \ ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ diff --git a/Post/PViewDataList.cpp b/Post/PViewDataList.cpp index f7f9cc2b40a09c936f27d0ae27dd1fae0b24a934..0f9739e4c4758b4470c01b40d0860493d55e9e21 100644 --- a/Post/PViewDataList.cpp +++ b/Post/PViewDataList.cpp @@ -1,4 +1,4 @@ -// $Id: PViewDataList.cpp,v 1.6 2007-09-11 14:01:55 geuzaine Exp $ +// $Id: PViewDataList.cpp,v 1.7 2007-09-11 15:29:02 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -885,12 +885,3 @@ bool PViewDataList::combineTime(nameData &nd) return finalize(); } -void PViewDataList::setGlobalResolutionLevel(int level) -{ - //if(adaptive) adaptive->setGlobalResolutionLevel(this, level); -} - -void PViewDataList::setAdaptiveResolutionLevel(int level, GMSH_Post_Plugin *plugin) -{ - //if(adaptive) adaptive->setAdaptiveResolutionLevel(this, level, plugin); -} diff --git a/Post/PViewDataList.h b/Post/PViewDataList.h index 8f8599f95329181ba73df3de9ab859784d414237..3fd82c689e71e1946a8114ed8508306e7014fb70 100644 --- a/Post/PViewDataList.h +++ b/Post/PViewDataList.h @@ -104,8 +104,6 @@ class PViewDataList : public PViewData { bool combineTime(nameData &nd); bool combineSpace(nameData &nd); bool isAdaptive(){ return adaptive ? true : false; } - void setGlobalResolutionLevel(int level); - void setAdaptiveResolutionLevel(int level, GMSH_Post_Plugin *plugin=0); // specific to list-based data sets void getRawData(int type, List_T **l, int **ne, int *nc, int *nn); diff --git a/Post/Views.h b/Post/Views.h deleted file mode 100644 index 3e73693db2f38b9ff939bf40121b66103a93befd..0000000000000000000000000000000000000000 --- a/Post/Views.h +++ /dev/null @@ -1,208 +0,0 @@ -#ifndef _VIEWS_H_ -#define _VIEWS_H_ - -// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to <gmsh@geuz.org>. - -#include <map> -#include "ColorTable.h" -#include "List.h" -#include "VertexArray.h" -#include "SmoothData.h" -#include "AdaptiveViews.h" - -#define VIEW_NB_ELEMENT_TYPES (8*3) -#define VAL_INF 1.e200 - -#define POST_POINT 0 -#define POST_LINE 1 -#define POST_TRIANGLE 2 -#define POST_QUADRANGLE 3 -#define POST_TETRAHEDRON 4 -#define POST_HEXAHEDRON 5 -#define POST_PRISM 6 -#define POST_PYRAMID 7 - -class Post_View{ - public : - // intrinsic to a view - int Num, Index, Changed, AliasOf, Links, Dirty; - char FileName[256], Name[256]; - - // the data - int DataSize; // size(double) or sizeof(float) - int NbTimeStep, ScalarOnly, TextOnly; - double Min, Max, BBox[6], *TimeStepMin, *TimeStepMax; - List_T *Time; - int NbSP, NbVP, NbTP; - List_T *SP, *VP, *TP; // points - int NbSL, NbVL, NbTL, NbSL2, NbVL2, NbTL2; - List_T *SL, *VL, *TL, *SL2, *VL2, *TL2; // lines - int NbST, NbVT, NbTT, NbST2, NbVT2, NbTT2; - List_T *ST, *VT, *TT, *ST2, *VT2, *TT2; // triangles - int NbSQ, NbVQ, NbTQ, NbSQ2, NbVQ2, NbTQ2; - List_T *SQ, *VQ, *TQ, *SQ2, *VQ2, *TQ2; // quadrangles - int NbSS, NbVS, NbTS, NbSS2, NbVS2, NbTS2; - List_T *SS, *VS, *TS, *SS2, *VS2, *TS2; // tetrahedra - int NbSH, NbVH, NbTH, NbSH2, NbVH2, NbTH2; - List_T *SH, *VH, *TH, *SH2, *VH2, *TH2; // hexahedra - int NbSI, NbVI, NbTI, NbSI2, NbVI2, NbTI2; - List_T *SI, *VI, *TI, *SI2, *VI2, *TI2; // prisms - int NbSY, NbVY, NbTY, NbSY2, NbVY2, NbTY2; - List_T *SY, *VY, *TY, *SY2, *VY2, *TY2; // pyramids - int NbT2, NbT3; - List_T *T2D, *T2C, *T3D, *T3C; // 2D and 3D text strings - std::map < int , List_T * > *Grains; // For LMGC90, grains shapes - std::map < int , int > *DisplayListsOfGrains; // For LMGC90, grains shapes - - - // vertex arrays to draw triangles and lines efficiently - VertexArray *TriVertexArray, *LinVertexArray; - - // options - int Type; - int Position[2], Size[2], AutoPosition; - char Format[256]; - int Axes, AxesAutoPosition, AxesTics[3]; - char AxesFormat[3][256], AxesLabel[3][256]; - double AxesPosition[6]; - double CustomMin, CustomMax; - double Offset[3], Raise[3], Transform[3][3], DisplacementFactor, Explode; - double ArrowSize, ArrowRelHeadRadius, ArrowRelStemRadius, ArrowRelStemLength; - double Normals, Tangents; - int Visible, IntervalsType, NbIso, ArrowSizeProportional; - int Light, LightTwoSide, LightLines, SmoothNormals; - double AngleSmoothNormals; - int SaturateValues, FakeTransparency; - int ShowElement, ShowTime, ShowScale; - int ScaleType, RangeType; - int VectorType, TensorType, GlyphLocation; - int TimeStep; - int DrawStrings; - int DrawPoints, DrawLines, DrawTriangles, DrawQuadrangles; - int DrawTetrahedra, DrawHexahedra, DrawPrisms, DrawPyramids; - int DrawScalars, DrawVectors, DrawTensors; - int Boundary, PointType, LineType; - double PointSize, LineWidth; - GmshColorTable CT; - int UseStipple, Stipple[10][2]; - char StippleString[10][32]; - int ExternalViewIndex, ViewIndexForGenRaise; - int UseGenRaise; - double GenRaiseFactor; - char GenRaiseX[256], GenRaiseY[256], GenRaiseZ[256]; - void *GenRaise_f[3]; - - // color options - struct{ - unsigned int point, line, triangle, quadrangle; - unsigned int tetrahedron, hexahedron, prism, pyramid; - unsigned int tangents, normals; - unsigned int text2d, text3d, axes; - } color; - - // dynamic - double (*GVFI)(double min, double max, int nb, int index); - int (*GIFV)(double min, double max, int nb, double value); - int ExternalElementIndex; - double ExternalMin, ExternalMax; - double TmpBBox[6]; // dynamically computed during drawing - - // smooth the view - void smooth(); - // smooth normals - smooth_normals *normals; - void reset_normals(); - - // some generic access functions - int empty(); - void get_raw_data(int type, List_T **list, int **nbe, int *nbc, int *nbn); - - // transforms curved elements into linear ones - void splitCurvedElements(); - - // If the view is high order, coeffs are interpreated as - // coefficients of a high order interpolation. So, a pre-pro - // is done at the end of the view that sets the view to the - // minimal resolution. Then, we can interactively modify the - // resolution. - Adaptive_Post_View *adaptive; - void setGlobalResolutionLevel(int level) - { - if (adaptive) - adaptive->setGlobalResolutionLevel(this, level); - } - void setAdaptiveResolutionLevel (int level, GMSH_Post_Plugin *plug = 0) - { - if (adaptive) - adaptive->setAdaptiveResolutionLevel(this, level, plug); - } - -}; - -// Type -#define DRAW_POST_3D 1 -#define DRAW_POST_2D_SPACE 2 -#define DRAW_POST_2D_TIME 3 - -// IntervalsType -#define DRAW_POST_ISO 1 -#define DRAW_POST_CONTINUOUS 2 -#define DRAW_POST_DISCRETE 3 -#define DRAW_POST_NUMERIC 4 - -// VectorType -#define DRAW_POST_SEGMENT 1 -#define DRAW_POST_ARROW 2 -#define DRAW_POST_PYRAMID 3 -#define DRAW_POST_ARROW3D 4 -#define DRAW_POST_DISPLACEMENT 5 - -// GlyphLocation -#define DRAW_POST_LOCATE_COG 1 -#define DRAW_POST_LOCATE_VERTEX 2 - -// TensorType -#define DRAW_POST_VONMISES 1 -#define DRAW_POST_LMGC90 2 -#define DRAW_POST_LMGC90_TYPE 3 -#define DRAW_POST_LMGC90_COORD 4 -#define DRAW_POST_LMGC90_PRES 5 -#define DRAW_POST_LMGC90_SN 6 -#define DRAW_POST_LMGC90_DEPX 7 -#define DRAW_POST_LMGC90_DEPY 8 -#define DRAW_POST_LMGC90_DEPZ 9 -#define DRAW_POST_LMGC90_DEPAV 10 -#define DRAW_POST_LMGC90_DEPNORM 11 -// RangeType -#define DRAW_POST_RANGE_DEFAULT 1 -#define DRAW_POST_RANGE_CUSTOM 2 -#define DRAW_POST_RANGE_PER_STEP 3 - -// ScaleType -#define DRAW_POST_LINEAR 1 -#define DRAW_POST_LOGARITHMIC 2 -#define DRAW_POST_DOUBLELOGARITHMIC 3 // for vorticity e.g. - -// Public functions - -Post_View *BeginView(int alloc); -void EndView(Post_View *v, int AddInUI, char *FileName, char *Name); - -#endif