From 5949440faae50c1c44411c19fdcf6e4bcf31510e Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Tue, 28 Feb 2017 21:35:47 +0000 Subject: [PATCH] Delete should be done "in order", to not break logic of dependencies in old GEO engine --- Parser/Gmsh.tab.cpp | 761 ++++++++++++++++++++++---------------------- Parser/Gmsh.y | 17 +- 2 files changed, 390 insertions(+), 388 deletions(-) diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index 61bc443527..b68ac716f8 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -1383,40 +1383,40 @@ static const yytype_uint16 yyrline[] = 2144, 2159, 2170, 2183, 2195, 2207, 2219, 2256, 2267, 2283, 2284, 2289, 2292, 2296, 2307, 2318, 2329, 2345, 2364, 2385, 2400, 2416, 2434, 2485, 2506, 2528, 2551, 2656, 2672, 2707, - 2721, 2727, 2742, 2770, 2787, 2793, 2804, 2823, 2829, 2835, - 2841, 2847, 2853, 2864, 2937, 2955, 2972, 2987, 3020, 3032, - 3056, 3060, 3065, 3072, 3077, 3087, 3092, 3098, 3106, 3110, - 3114, 3123, 3187, 3203, 3220, 3237, 3259, 3281, 3316, 3324, - 3332, 3338, 3345, 3352, 3372, 3398, 3410, 3422, 3438, 3454, - 3463, 3462, 3477, 3476, 3491, 3490, 3505, 3504, 3517, 3530, - 3544, 3558, 3577, 3580, 3586, 3598, 3618, 3622, 3626, 3630, - 3634, 3638, 3642, 3646, 3655, 3668, 3669, 3670, 3671, 3672, - 3676, 3677, 3678, 3681, 3699, 3716, 3733, 3736, 3752, 3755, - 3772, 3775, 3781, 3784, 3791, 3794, 3801, 3818, 3859, 3903, - 3942, 3967, 3976, 4006, 4032, 4058, 4090, 4117, 4143, 4169, - 4195, 4221, 4243, 4249, 4255, 4261, 4267, 4273, 4299, 4325, - 4342, 4359, 4376, 4388, 4394, 4400, 4412, 4416, 4426, 4437, - 4438, 4439, 4443, 4449, 4461, 4479, 4507, 4508, 4509, 4510, - 4511, 4512, 4513, 4514, 4515, 4522, 4523, 4524, 4525, 4526, - 4527, 4528, 4529, 4530, 4531, 4532, 4533, 4534, 4535, 4536, - 4537, 4538, 4539, 4540, 4541, 4542, 4543, 4544, 4545, 4546, - 4547, 4548, 4549, 4550, 4551, 4552, 4553, 4554, 4563, 4564, - 4565, 4566, 4567, 4568, 4569, 4570, 4571, 4572, 4573, 4578, - 4577, 4585, 4587, 4592, 4598, 4622, 4640, 4658, 4663, 4669, - 4685, 4691, 4697, 4716, 4737, 4770, 4794, 4797, 4803, 4814, - 4824, 4829, 4840, 4849, 4854, 4859, 4888, 4887, 4917, 4919, - 4924, 4933, 4935, 4941, 4942, 4948, 4952, 4956, 4960, 4964, - 4971, 4975, 4979, 4983, 4990, 4995, 5002, 5007, 5011, 5016, - 5020, 5028, 5039, 5043, 5055, 5063, 5071, 5078, 5088, 5111, - 5117, 5123, 5129, 5135, 5146, 5157, 5168, 5179, 5185, 5191, - 5197, 5203, 5213, 5223, 5233, 5246, 5258, 5262, 5266, 5270, - 5288, 5296, 5304, 5333, 5343, 5362, 5367, 5371, 5375, 5387, - 5391, 5403, 5420, 5430, 5434, 5449, 5454, 5461, 5465, 5478, - 5492, 5509, 5535, 5539, 5547, 5553, 5559, 5565, 5574, 5578, - 5582, 5590, 5596, 5602, 5610, 5618, 5625, 5633, 5648, 5662, - 5676, 5688, 5704, 5713, 5722, 5732, 5743, 5751, 5759, 5763, - 5782, 5789, 5795, 5802, 5810, 5809, 5819, 5843, 5845, 5851, - 5856, 5864, 5873, 5886, 5889, 5893 + 2722, 2728, 2743, 2771, 2788, 2794, 2805, 2824, 2830, 2836, + 2842, 2848, 2854, 2865, 2938, 2956, 2973, 2988, 3021, 3033, + 3057, 3061, 3066, 3073, 3078, 3088, 3093, 3099, 3107, 3111, + 3115, 3124, 3188, 3204, 3221, 3238, 3260, 3282, 3317, 3325, + 3333, 3339, 3346, 3353, 3373, 3399, 3411, 3423, 3439, 3455, + 3464, 3463, 3478, 3477, 3492, 3491, 3506, 3505, 3518, 3531, + 3545, 3559, 3578, 3581, 3587, 3599, 3619, 3623, 3627, 3631, + 3635, 3639, 3643, 3647, 3656, 3669, 3670, 3671, 3672, 3673, + 3677, 3678, 3679, 3682, 3700, 3717, 3734, 3737, 3753, 3756, + 3773, 3776, 3782, 3785, 3792, 3795, 3802, 3819, 3860, 3904, + 3943, 3968, 3977, 4007, 4033, 4059, 4091, 4118, 4144, 4170, + 4196, 4222, 4244, 4250, 4256, 4262, 4268, 4274, 4300, 4326, + 4343, 4360, 4377, 4389, 4395, 4401, 4413, 4417, 4427, 4438, + 4439, 4440, 4444, 4450, 4462, 4480, 4508, 4509, 4510, 4511, + 4512, 4513, 4514, 4515, 4516, 4523, 4524, 4525, 4526, 4527, + 4528, 4529, 4530, 4531, 4532, 4533, 4534, 4535, 4536, 4537, + 4538, 4539, 4540, 4541, 4542, 4543, 4544, 4545, 4546, 4547, + 4548, 4549, 4550, 4551, 4552, 4553, 4554, 4555, 4564, 4565, + 4566, 4567, 4568, 4569, 4570, 4571, 4572, 4573, 4574, 4579, + 4578, 4586, 4588, 4593, 4599, 4623, 4641, 4659, 4664, 4670, + 4686, 4692, 4698, 4717, 4738, 4771, 4795, 4798, 4804, 4815, + 4825, 4830, 4841, 4850, 4855, 4860, 4889, 4888, 4918, 4920, + 4925, 4934, 4936, 4942, 4943, 4949, 4953, 4957, 4961, 4965, + 4972, 4976, 4980, 4984, 4991, 4996, 5003, 5008, 5012, 5017, + 5021, 5029, 5040, 5044, 5056, 5064, 5072, 5079, 5089, 5112, + 5118, 5124, 5130, 5136, 5147, 5158, 5169, 5180, 5186, 5192, + 5198, 5204, 5214, 5224, 5234, 5247, 5259, 5263, 5267, 5271, + 5289, 5297, 5305, 5334, 5344, 5363, 5368, 5372, 5376, 5388, + 5392, 5404, 5421, 5431, 5435, 5450, 5455, 5462, 5466, 5479, + 5493, 5510, 5536, 5540, 5548, 5554, 5560, 5566, 5575, 5579, + 5583, 5591, 5597, 5603, 5611, 5619, 5626, 5634, 5649, 5663, + 5677, 5689, 5705, 5714, 5723, 5733, 5744, 5752, 5760, 5764, + 5783, 5790, 5796, 5803, 5811, 5810, 5820, 5844, 5846, 5852, + 5857, 5865, 5874, 5887, 5890, 5894 }; #endif @@ -8732,22 +8732,23 @@ yyreduce: case 219: #line 2708 "Gmsh.y" { - std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(3) - (4)].l), tags); - for(int dim = 0; dim < 4; dim++){ - for(unsigned int i = 0; i < tags[dim].size(); i++){ - if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ - GModel::current()->getOCCInternals()->remove(dim, tags[dim][i]); - } - GModel::current()->getGEOInternals()->remove(dim, tags[dim][i]); - GModel::current()->remove(dim, tags[dim][i]); + // don't use per-dimension vectors here, in order to respect the input + // ordering when deleting (important in GEO for dependencies, e.g. cannot + // delete boundary before the bounded entity) + for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ + Shape s; List_Read((yyvsp[(3) - (4)].l), i, &s); int dim = s.Type / 100 - 1; + if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ + GModel::current()->getOCCInternals()->remove(dim, s.Num); } + GModel::current()->getGEOInternals()->remove(dim, s.Num); + GModel::current()->remove(dim, s.Num); } List_Delete((yyvsp[(3) - (4)].l)); ;} break; case 220: -#line 2722 "Gmsh.y" +#line 2723 "Gmsh.y" { #if defined(HAVE_MESH) GModel::current()->getFields()->deleteField((int)(yyvsp[(4) - (6)].d)); @@ -8756,7 +8757,7 @@ yyreduce: break; case 221: -#line 2728 "Gmsh.y" +#line 2729 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(2) - (6)].c), "View")){ @@ -8774,7 +8775,7 @@ yyreduce: break; case 222: -#line 2743 "Gmsh.y" +#line 2744 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Meshes") || !strcmp((yyvsp[(2) - (3)].c), "All")){ ClearProject(); @@ -8805,7 +8806,7 @@ yyreduce: break; case 223: -#line 2771 "Gmsh.y" +#line 2772 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(2) - (4)].c), "Empty") && !strcmp((yyvsp[(3) - (4)].c), "Views")){ @@ -8820,7 +8821,7 @@ yyreduce: break; case 224: -#line 2788 "Gmsh.y" +#line 2789 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(4) - (5)].l), tags); setColor(tags, (yyvsp[(2) - (5)].u), false); @@ -8829,7 +8830,7 @@ yyreduce: break; case 225: -#line 2794 "Gmsh.y" +#line 2795 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(5) - (6)].l), tags); setColor(tags, (yyvsp[(3) - (6)].u), true); @@ -8838,7 +8839,7 @@ yyreduce: break; case 226: -#line 2805 "Gmsh.y" +#line 2806 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(4) - (5)].l), tags); for(int dim = 0; dim < 4; dim++){ @@ -8855,7 +8856,7 @@ yyreduce: break; case 227: -#line 2824 "Gmsh.y" +#line 2825 "Gmsh.y" { std::string what = (yyvsp[(2) - (3)].c); setVisibility(-1, 1, false); @@ -8864,7 +8865,7 @@ yyreduce: break; case 228: -#line 2830 "Gmsh.y" +#line 2831 "Gmsh.y" { std::string what = (yyvsp[(2) - (3)].c); setVisibility(-1, 0, false); @@ -8873,7 +8874,7 @@ yyreduce: break; case 229: -#line 2836 "Gmsh.y" +#line 2837 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(3) - (4)].l), tags); setVisibility(tags, 1, false); @@ -8882,7 +8883,7 @@ yyreduce: break; case 230: -#line 2842 "Gmsh.y" +#line 2843 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(4) - (5)].l), tags); setVisibility(tags, 1, true); @@ -8891,7 +8892,7 @@ yyreduce: break; case 231: -#line 2848 "Gmsh.y" +#line 2849 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(3) - (4)].l), tags); setVisibility(tags, 0, false); @@ -8900,7 +8901,7 @@ yyreduce: break; case 232: -#line 2854 "Gmsh.y" +#line 2855 "Gmsh.y" { std::vector<int> tags[4]; ListOfShapes2Vectors((yyvsp[(4) - (5)].l), tags); setVisibility(tags, 0, true); @@ -8909,7 +8910,7 @@ yyreduce: break; case 233: -#line 2865 "Gmsh.y" +#line 2866 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Include")){ std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(2) - (3)].c)); @@ -8985,7 +8986,7 @@ yyreduce: break; case 234: -#line 2938 "Gmsh.y" +#line 2939 "Gmsh.y" { int n = List_Nbr((yyvsp[(3) - (5)].l)); if(n == 1){ @@ -9006,7 +9007,7 @@ yyreduce: break; case 235: -#line 2956 "Gmsh.y" +#line 2957 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(1) - (7)].c), "Save") && !strcmp((yyvsp[(2) - (7)].c), "View")){ @@ -9026,7 +9027,7 @@ yyreduce: break; case 236: -#line 2973 "Gmsh.y" +#line 2974 "Gmsh.y" { #if defined(HAVE_POST) && defined(HAVE_MESH) if(!strcmp((yyvsp[(1) - (7)].c), "Background") && !strcmp((yyvsp[(2) - (7)].c), "Mesh") && !strcmp((yyvsp[(3) - (7)].c), "View")){ @@ -9044,7 +9045,7 @@ yyreduce: break; case 237: -#line 2988 "Gmsh.y" +#line 2989 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Sleep")){ SleepInSeconds((yyvsp[(2) - (3)].d)); @@ -9080,7 +9081,7 @@ yyreduce: break; case 238: -#line 3021 "Gmsh.y" +#line 3022 "Gmsh.y" { #if defined(HAVE_PLUGINS) try { @@ -9095,7 +9096,7 @@ yyreduce: break; case 239: -#line 3033 "Gmsh.y" +#line 3034 "Gmsh.y" { #if defined(HAVE_POST) if(!strcmp((yyvsp[(2) - (3)].c), "ElementsFromAllViews")) @@ -9122,14 +9123,14 @@ yyreduce: break; case 240: -#line 3057 "Gmsh.y" +#line 3058 "Gmsh.y" { Msg::Exit(0); ;} break; case 241: -#line 3061 "Gmsh.y" +#line 3062 "Gmsh.y" { gmsh_yyerrorstate = 999; // this will be checked when yyparse returns YYABORT; @@ -9137,7 +9138,7 @@ yyreduce: break; case 242: -#line 3066 "Gmsh.y" +#line 3067 "Gmsh.y" { // force sync if(GModel::current()->getOCCInternals()) @@ -9147,7 +9148,7 @@ yyreduce: break; case 243: -#line 3073 "Gmsh.y" +#line 3074 "Gmsh.y" { new GModel(); GModel::current(GModel::list.size() - 1); @@ -9155,7 +9156,7 @@ yyreduce: break; case 244: -#line 3078 "Gmsh.y" +#line 3079 "Gmsh.y" { CTX::instance()->forcedBBox = 0; if(GModel::current()->getOCCInternals() && @@ -9168,7 +9169,7 @@ yyreduce: break; case 245: -#line 3088 "Gmsh.y" +#line 3089 "Gmsh.y" { CTX::instance()->forcedBBox = 1; SetBoundingBox((yyvsp[(3) - (15)].d), (yyvsp[(5) - (15)].d), (yyvsp[(7) - (15)].d), (yyvsp[(9) - (15)].d), (yyvsp[(11) - (15)].d), (yyvsp[(13) - (15)].d)); @@ -9176,7 +9177,7 @@ yyreduce: break; case 246: -#line 3093 "Gmsh.y" +#line 3094 "Gmsh.y" { #if defined(HAVE_OPENGL) drawContext::global()->draw(); @@ -9185,7 +9186,7 @@ yyreduce: break; case 247: -#line 3099 "Gmsh.y" +#line 3100 "Gmsh.y" { #if defined(HAVE_OPENGL) CTX::instance()->mesh.changed = ENT_ALL; @@ -9196,21 +9197,21 @@ yyreduce: break; case 248: -#line 3107 "Gmsh.y" +#line 3108 "Gmsh.y" { GModel::current()->createTopologyFromMesh(); ;} break; case 249: -#line 3111 "Gmsh.y" +#line 3112 "Gmsh.y" { GModel::current()->createTopologyFromMesh(1); ;} break; case 250: -#line 3115 "Gmsh.y" +#line 3116 "Gmsh.y" { if(GModel::current()->getOCCInternals() && GModel::current()->getOCCInternals()->getChanged()) @@ -9222,7 +9223,7 @@ yyreduce: break; case 251: -#line 3125 "Gmsh.y" +#line 3126 "Gmsh.y" { int lock = CTX::instance()->lock; CTX::instance()->lock = 0; @@ -9283,7 +9284,7 @@ yyreduce: break; case 252: -#line 3188 "Gmsh.y" +#line 3189 "Gmsh.y" { #if defined(HAVE_POPPLER) std::vector<int> is; @@ -9298,7 +9299,7 @@ yyreduce: break; case 253: -#line 3204 "Gmsh.y" +#line 3205 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (6)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (6)].d); @@ -9318,7 +9319,7 @@ yyreduce: break; case 254: -#line 3221 "Gmsh.y" +#line 3222 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (8)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (8)].d); @@ -9338,7 +9339,7 @@ yyreduce: break; case 255: -#line 3238 "Gmsh.y" +#line 3239 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (8)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (8)].d); @@ -9363,7 +9364,7 @@ yyreduce: break; case 256: -#line 3260 "Gmsh.y" +#line 3261 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (10)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (10)].d); @@ -9388,7 +9389,7 @@ yyreduce: break; case 257: -#line 3282 "Gmsh.y" +#line 3283 "Gmsh.y" { if(ImbricatedLoop <= 0){ yymsg(0, "Invalid For/EndFor loop"); @@ -9426,7 +9427,7 @@ yyreduce: break; case 258: -#line 3317 "Gmsh.y" +#line 3318 "Gmsh.y" { if(!FunctionManager::Instance()->createFunction (std::string((yyvsp[(2) - (2)].c)), gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -9437,7 +9438,7 @@ yyreduce: break; case 259: -#line 3325 "Gmsh.y" +#line 3326 "Gmsh.y" { if(!FunctionManager::Instance()->createFunction (std::string((yyvsp[(2) - (2)].c)), gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -9448,7 +9449,7 @@ yyreduce: break; case 260: -#line 3333 "Gmsh.y" +#line 3334 "Gmsh.y" { if(!FunctionManager::Instance()->leaveFunction (&gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -9457,7 +9458,7 @@ yyreduce: break; case 261: -#line 3339 "Gmsh.y" +#line 3340 "Gmsh.y" { if(!FunctionManager::Instance()->enterFunction (std::string((yyvsp[(2) - (3)].c)), &gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -9467,7 +9468,7 @@ yyreduce: break; case 262: -#line 3346 "Gmsh.y" +#line 3347 "Gmsh.y" { if(!FunctionManager::Instance()->enterFunction (std::string((yyvsp[(2) - (3)].c)), &gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -9477,7 +9478,7 @@ yyreduce: break; case 263: -#line 3353 "Gmsh.y" +#line 3354 "Gmsh.y" { ImbricatedTest++; if(ImbricatedTest > MAX_RECUR_TESTS-1){ @@ -9500,7 +9501,7 @@ yyreduce: break; case 264: -#line 3373 "Gmsh.y" +#line 3374 "Gmsh.y" { if(ImbricatedTest > 0){ if (statusImbricatedTests[ImbricatedTest]){ @@ -9529,7 +9530,7 @@ yyreduce: break; case 265: -#line 3399 "Gmsh.y" +#line 3400 "Gmsh.y" { if(ImbricatedTest > 0){ if(statusImbricatedTests[ImbricatedTest]){ @@ -9544,7 +9545,7 @@ yyreduce: break; case 266: -#line 3411 "Gmsh.y" +#line 3412 "Gmsh.y" { ImbricatedTest--; if(ImbricatedTest < 0) @@ -9553,7 +9554,7 @@ yyreduce: break; case 267: -#line 3423 "Gmsh.y" +#line 3424 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -9572,7 +9573,7 @@ yyreduce: break; case 268: -#line 3439 "Gmsh.y" +#line 3440 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -9591,7 +9592,7 @@ yyreduce: break; case 269: -#line 3455 "Gmsh.y" +#line 3456 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (13)].l), @@ -9602,7 +9603,7 @@ yyreduce: break; case 270: -#line 3463 "Gmsh.y" +#line 3464 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -9611,7 +9612,7 @@ yyreduce: break; case 271: -#line 3469 "Gmsh.y" +#line 3470 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (7)].l), @@ -9622,7 +9623,7 @@ yyreduce: break; case 272: -#line 3477 "Gmsh.y" +#line 3478 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -9631,7 +9632,7 @@ yyreduce: break; case 273: -#line 3483 "Gmsh.y" +#line 3484 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(ROTATE, (yyvsp[(10) - (13)].l), @@ -9642,7 +9643,7 @@ yyreduce: break; case 274: -#line 3491 "Gmsh.y" +#line 3492 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -9651,7 +9652,7 @@ yyreduce: break; case 275: -#line 3497 "Gmsh.y" +#line 3498 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (15)].l), @@ -9662,7 +9663,7 @@ yyreduce: break; case 276: -#line 3505 "Gmsh.y" +#line 3506 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; extr.mesh.QuadToTri = NO_QUADTRI; @@ -9671,7 +9672,7 @@ yyreduce: break; case 277: -#line 3511 "Gmsh.y" +#line 3512 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(BOUNDARY_LAYER, (yyvsp[(3) - (6)].l), 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., @@ -9681,7 +9682,7 @@ yyreduce: break; case 278: -#line 3518 "Gmsh.y" +#line 3519 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -9697,7 +9698,7 @@ yyreduce: break; case 279: -#line 3531 "Gmsh.y" +#line 3532 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -9714,7 +9715,7 @@ yyreduce: break; case 280: -#line 3545 "Gmsh.y" +#line 3546 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -9731,7 +9732,7 @@ yyreduce: break; case 281: -#line 3559 "Gmsh.y" +#line 3560 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -9750,19 +9751,19 @@ yyreduce: break; case 282: -#line 3578 "Gmsh.y" +#line 3579 "Gmsh.y" { ;} break; case 283: -#line 3581 "Gmsh.y" +#line 3582 "Gmsh.y" { ;} break; case 284: -#line 3587 "Gmsh.y" +#line 3588 "Gmsh.y" { int n = (int)fabs((yyvsp[(3) - (5)].d)); if(n){ // we accept n==0 to easily disable layers @@ -9777,7 +9778,7 @@ yyreduce: break; case 285: -#line 3599 "Gmsh.y" +#line 3600 "Gmsh.y" { extr.mesh.ExtrudeMesh = true; extr.mesh.NbLayer = List_Nbr((yyvsp[(3) - (7)].l)); @@ -9800,56 +9801,56 @@ yyreduce: break; case 286: -#line 3619 "Gmsh.y" +#line 3620 "Gmsh.y" { extr.mesh.ScaleLast = true; ;} break; case 287: -#line 3623 "Gmsh.y" +#line 3624 "Gmsh.y" { extr.mesh.Recombine = true; ;} break; case 288: -#line 3627 "Gmsh.y" +#line 3628 "Gmsh.y" { extr.mesh.Recombine = (yyvsp[(2) - (3)].d) ? true : false; ;} break; case 289: -#line 3631 "Gmsh.y" +#line 3632 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_ADDVERTS_1; ;} break; case 290: -#line 3635 "Gmsh.y" +#line 3636 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_ADDVERTS_1_RECOMB; ;} break; case 291: -#line 3639 "Gmsh.y" +#line 3640 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_NOVERTS_1; ;} break; case 292: -#line 3643 "Gmsh.y" +#line 3644 "Gmsh.y" { extr.mesh.QuadToTri = QUADTRI_NOVERTS_1_RECOMB; ;} break; case 293: -#line 3647 "Gmsh.y" +#line 3648 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(6) - (9)].l), tags); int num = (int)(yyvsp[(3) - (9)].d); @@ -9861,7 +9862,7 @@ yyreduce: break; case 294: -#line 3656 "Gmsh.y" +#line 3657 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (6)].c), "Index")) extr.mesh.BoundaryLayerIndex = (yyvsp[(4) - (6)].d); @@ -9872,47 +9873,47 @@ yyreduce: break; case 295: -#line 3668 "Gmsh.y" +#line 3669 "Gmsh.y" { (yyval.i) = OCC_Internals::Union; ;} break; case 296: -#line 3669 "Gmsh.y" +#line 3670 "Gmsh.y" { (yyval.i) = OCC_Internals::Intersection; ;} break; case 297: -#line 3670 "Gmsh.y" +#line 3671 "Gmsh.y" { (yyval.i) = OCC_Internals::Difference; ;} break; case 298: -#line 3671 "Gmsh.y" +#line 3672 "Gmsh.y" { (yyval.i) = OCC_Internals::Section; ;} break; case 299: -#line 3672 "Gmsh.y" +#line 3673 "Gmsh.y" { (yyval.i) = OCC_Internals::Fragments; ;} break; case 300: -#line 3676 "Gmsh.y" +#line 3677 "Gmsh.y" { (yyval.i) = 0; ;} break; case 301: -#line 3677 "Gmsh.y" +#line 3678 "Gmsh.y" { (yyval.i) = 1; ;} break; case 302: -#line 3678 "Gmsh.y" +#line 3679 "Gmsh.y" { (yyval.i) = (yyvsp[(2) - (3)].d); ;} break; case 303: -#line 3683 "Gmsh.y" +#line 3684 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -9932,7 +9933,7 @@ yyreduce: break; case 304: -#line 3700 "Gmsh.y" +#line 3701 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ @@ -9949,7 +9950,7 @@ yyreduce: break; case 305: -#line 3718 "Gmsh.y" +#line 3719 "Gmsh.y" { if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ std::vector<int> shape[4], tool[4], out[4]; @@ -9964,14 +9965,14 @@ yyreduce: break; case 306: -#line 3733 "Gmsh.y" +#line 3734 "Gmsh.y" { (yyval.v)[0] = (yyval.v)[1] = 1.; ;} break; case 307: -#line 3737 "Gmsh.y" +#line 3738 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Progression") || !strcmp((yyvsp[(2) - (3)].c), "Power")) (yyval.v)[0] = 1.; @@ -9987,14 +9988,14 @@ yyreduce: break; case 308: -#line 3752 "Gmsh.y" +#line 3753 "Gmsh.y" { (yyval.i) = -1; // left ;} break; case 309: -#line 3756 "Gmsh.y" +#line 3757 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "Right")) (yyval.i) = 1; @@ -10011,49 +10012,49 @@ yyreduce: break; case 310: -#line 3772 "Gmsh.y" +#line 3773 "Gmsh.y" { (yyval.l) = List_Create(1, 1, sizeof(double)); ;} break; case 311: -#line 3776 "Gmsh.y" +#line 3777 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); ;} break; case 312: -#line 3781 "Gmsh.y" +#line 3782 "Gmsh.y" { (yyval.i) = 45; ;} break; case 313: -#line 3785 "Gmsh.y" +#line 3786 "Gmsh.y" { (yyval.i) = (int)(yyvsp[(2) - (2)].d); ;} break; case 314: -#line 3791 "Gmsh.y" +#line 3792 "Gmsh.y" { (yyval.l) = List_Create(1, 1, sizeof(double)); ;} break; case 315: -#line 3795 "Gmsh.y" +#line 3796 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); ;} break; case 316: -#line 3802 "Gmsh.y" +#line 3803 "Gmsh.y" { // mesh sizes at vertices are stored in internal CAD data, as they can be // specified during vertex creation and copied around during CAD @@ -10073,7 +10074,7 @@ yyreduce: break; case 317: -#line 3819 "Gmsh.y" +#line 3820 "Gmsh.y" { // transfinite constraints are stored in GEO internals in addition to // GModel, as they can be copied around during GEO operations @@ -10117,7 +10118,7 @@ yyreduce: break; case 318: -#line 3860 "Gmsh.y" +#line 3861 "Gmsh.y" { // transfinite constraints are stored in GEO internals in addition to // GModel, as they can be copied around during GEO operations @@ -10164,7 +10165,7 @@ yyreduce: break; case 319: -#line 3904 "Gmsh.y" +#line 3905 "Gmsh.y" { // transfinite constraints are stored in GEO internals in addition to // GModel, as they can be copied around during GEO operations @@ -10206,7 +10207,7 @@ yyreduce: break; case 320: -#line 3943 "Gmsh.y" +#line 3944 "Gmsh.y" { // transfinite constraints are stored in GEO internals in addition to // GModel, as they can be copied around during GEO operations @@ -10234,7 +10235,7 @@ yyreduce: break; case 321: -#line 3968 "Gmsh.y" +#line 3969 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (8)].l)); i++){ double d; @@ -10246,7 +10247,7 @@ yyreduce: break; case 322: -#line 3977 "Gmsh.y" +#line 3978 "Gmsh.y" { // recombine constraints are stored in GEO internals in addition to // GModel, as they can be copied around during GEO operations @@ -10279,7 +10280,7 @@ yyreduce: break; case 323: -#line 4007 "Gmsh.y" +#line 4008 "Gmsh.y" { // recombine constraints are stored in GEO internals in addition to // GModel, as they can be copied around during GEO operations @@ -10308,7 +10309,7 @@ yyreduce: break; case 324: -#line 4033 "Gmsh.y" +#line 4034 "Gmsh.y" { // smoothing constraints are stored in GEO internals in addition to // GModel, as they can be copied around during GEO operations @@ -10337,7 +10338,7 @@ yyreduce: break; case 325: -#line 4060 "Gmsh.y" +#line 4061 "Gmsh.y" { if (List_Nbr((yyvsp[(4) - (11)].l)) != List_Nbr((yyvsp[(8) - (11)].l))){ yymsg(0, "Number of master lines (%d) different from number of " @@ -10371,7 +10372,7 @@ yyreduce: break; case 326: -#line 4092 "Gmsh.y" +#line 4093 "Gmsh.y" { if (List_Nbr((yyvsp[(4) - (11)].l)) != List_Nbr((yyvsp[(8) - (11)].l))){ yymsg(0, "Number of master faces (%d) different from number of " @@ -10400,7 +10401,7 @@ yyreduce: break; case 327: -#line 4119 "Gmsh.y" +#line 4120 "Gmsh.y" { if (List_Nbr((yyvsp[(4) - (18)].l)) != List_Nbr((yyvsp[(8) - (18)].l))){ yymsg(0, "Number of master edges (%d) different from number of " @@ -10428,7 +10429,7 @@ yyreduce: break; case 328: -#line 4145 "Gmsh.y" +#line 4146 "Gmsh.y" { if (List_Nbr((yyvsp[(4) - (18)].l)) != List_Nbr((yyvsp[(8) - (18)].l))){ yymsg(0, "Number of master faces (%d) different from number of " @@ -10456,7 +10457,7 @@ yyreduce: break; case 329: -#line 4171 "Gmsh.y" +#line 4172 "Gmsh.y" { if (List_Nbr((yyvsp[(4) - (12)].l)) != List_Nbr((yyvsp[(8) - (12)].l))){ yymsg(0, "Number of master edges (%d) different from number of " @@ -10484,7 +10485,7 @@ yyreduce: break; case 330: -#line 4197 "Gmsh.y" +#line 4198 "Gmsh.y" { if (List_Nbr((yyvsp[(4) - (12)].l)) != List_Nbr((yyvsp[(8) - (12)].l))){ yymsg(0, "Number of master faces (%d) different from number of " @@ -10512,7 +10513,7 @@ yyreduce: break; case 331: -#line 4223 "Gmsh.y" +#line 4224 "Gmsh.y" { if (List_Nbr((yyvsp[(5) - (12)].l)) != List_Nbr((yyvsp[(10) - (12)].l))){ yymsg(0, "Number of master surface edges (%d) different from number of " @@ -10536,7 +10537,7 @@ yyreduce: break; case 332: -#line 4244 "Gmsh.y" +#line 4245 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(3) - (10)].l), tags); addEmbedded(0, tags, 2, (int)(yyvsp[(8) - (10)].d)); @@ -10545,7 +10546,7 @@ yyreduce: break; case 333: -#line 4250 "Gmsh.y" +#line 4251 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(3) - (10)].l), tags); addEmbedded(1, tags, 2, (int)(yyvsp[(8) - (10)].d)); @@ -10554,7 +10555,7 @@ yyreduce: break; case 334: -#line 4256 "Gmsh.y" +#line 4257 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(3) - (10)].l), tags); addEmbedded(0, tags, 3, (int)(yyvsp[(8) - (10)].d)); @@ -10563,7 +10564,7 @@ yyreduce: break; case 335: -#line 4262 "Gmsh.y" +#line 4263 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(3) - (10)].l), tags); addEmbedded(1, tags, 3, (int)(yyvsp[(8) - (10)].d)); @@ -10572,7 +10573,7 @@ yyreduce: break; case 336: -#line 4268 "Gmsh.y" +#line 4269 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(3) - (10)].l), tags); addEmbedded(2, tags, 3, (int)(yyvsp[(8) - (10)].d)); @@ -10581,7 +10582,7 @@ yyreduce: break; case 337: -#line 4274 "Gmsh.y" +#line 4275 "Gmsh.y" { // reverse mesh constraints are stored in GEO internals in addition to // GModel, as they can be copied around during GEO operations @@ -10610,7 +10611,7 @@ yyreduce: break; case 338: -#line 4300 "Gmsh.y" +#line 4301 "Gmsh.y" { // reverse mesh constraints are stored in GEO internals in addition to // GModel, as they can be copied around during GEO operations @@ -10639,7 +10640,7 @@ yyreduce: break; case 339: -#line 4326 "Gmsh.y" +#line 4327 "Gmsh.y" { if(!(yyvsp[(3) - (4)].l)){ for(GModel::viter it = GModel::current()->firstVertex(); @@ -10659,7 +10660,7 @@ yyreduce: break; case 340: -#line 4343 "Gmsh.y" +#line 4344 "Gmsh.y" { if(!(yyvsp[(3) - (4)].l)){ for(GModel::eiter it = GModel::current()->firstEdge(); @@ -10679,7 +10680,7 @@ yyreduce: break; case 341: -#line 4360 "Gmsh.y" +#line 4361 "Gmsh.y" { if(!(yyvsp[(3) - (4)].l)){ for(GModel::fiter it = GModel::current()->firstFace(); @@ -10699,7 +10700,7 @@ yyreduce: break; case 342: -#line 4377 "Gmsh.y" +#line 4378 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ double dnum; @@ -10714,7 +10715,7 @@ yyreduce: break; case 343: -#line 4389 "Gmsh.y" +#line 4390 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(3) - (4)].l), tags); GModel::current()->getGEOInternals()->setCompoundMesh(1, tags); @@ -10723,7 +10724,7 @@ yyreduce: break; case 344: -#line 4395 "Gmsh.y" +#line 4396 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(3) - (4)].l), tags); GModel::current()->getGEOInternals()->setCompoundMesh(2, tags); @@ -10732,7 +10733,7 @@ yyreduce: break; case 345: -#line 4401 "Gmsh.y" +#line 4402 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(3) - (4)].l), tags); GModel::current()->getGEOInternals()->setCompoundMesh(3, tags); @@ -10741,14 +10742,14 @@ yyreduce: break; case 346: -#line 4413 "Gmsh.y" +#line 4414 "Gmsh.y" { GModel::current()->getGEOInternals()->removeAllDuplicates(); ;} break; case 347: -#line 4417 "Gmsh.y" +#line 4418 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Geometry")) GModel::current()->getGEOInternals()->removeAllDuplicates(); @@ -10761,7 +10762,7 @@ yyreduce: break; case 348: -#line 4427 "Gmsh.y" +#line 4428 "Gmsh.y" { std::vector<int> tags; ListOfDouble2Vector((yyvsp[(4) - (6)].l), tags); GModel::current()->getGEOInternals()->mergeVertices(tags); @@ -10770,22 +10771,22 @@ yyreduce: break; case 349: -#line 4437 "Gmsh.y" +#line 4438 "Gmsh.y" { (yyval.c) = (char*)"Homology"; ;} break; case 350: -#line 4438 "Gmsh.y" +#line 4439 "Gmsh.y" { (yyval.c) = (char*)"Cohomology"; ;} break; case 351: -#line 4439 "Gmsh.y" +#line 4440 "Gmsh.y" { (yyval.c) = (char*)"Betti"; ;} break; case 352: -#line 4444 "Gmsh.y" +#line 4445 "Gmsh.y" { std::vector<int> domain, subdomain, dim; for(int i = 0; i < 4; i++) dim.push_back(i); @@ -10794,7 +10795,7 @@ yyreduce: break; case 353: -#line 4450 "Gmsh.y" +#line 4451 "Gmsh.y" { std::vector<int> domain, subdomain, dim; for(int i = 0; i < List_Nbr((yyvsp[(3) - (5)].l)); i++){ @@ -10809,7 +10810,7 @@ yyreduce: break; case 354: -#line 4462 "Gmsh.y" +#line 4463 "Gmsh.y" { std::vector<int> domain, subdomain, dim; for(int i = 0; i < List_Nbr((yyvsp[(3) - (7)].l)); i++){ @@ -10830,7 +10831,7 @@ yyreduce: break; case 355: -#line 4480 "Gmsh.y" +#line 4481 "Gmsh.y" { std::vector<int> domain, subdomain, dim; for(int i = 0; i < List_Nbr((yyvsp[(6) - (10)].l)); i++){ @@ -10856,47 +10857,47 @@ yyreduce: break; case 356: -#line 4507 "Gmsh.y" +#line 4508 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 357: -#line 4508 "Gmsh.y" +#line 4509 "Gmsh.y" { (yyval.d) = (yyvsp[(2) - (3)].d); ;} break; case 358: -#line 4509 "Gmsh.y" +#line 4510 "Gmsh.y" { (yyval.d) = -(yyvsp[(2) - (2)].d); ;} break; case 359: -#line 4510 "Gmsh.y" +#line 4511 "Gmsh.y" { (yyval.d) = (yyvsp[(2) - (2)].d); ;} break; case 360: -#line 4511 "Gmsh.y" +#line 4512 "Gmsh.y" { (yyval.d) = !(yyvsp[(2) - (2)].d); ;} break; case 361: -#line 4512 "Gmsh.y" +#line 4513 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d); ;} break; case 362: -#line 4513 "Gmsh.y" +#line 4514 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d); ;} break; case 363: -#line 4514 "Gmsh.y" +#line 4515 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d); ;} break; case 364: -#line 4516 "Gmsh.y" +#line 4517 "Gmsh.y" { if(!(yyvsp[(3) - (3)].d)) yymsg(0, "Division by zero in '%g / %g'", (yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); @@ -10906,232 +10907,232 @@ yyreduce: break; case 365: -#line 4522 "Gmsh.y" +#line 4523 "Gmsh.y" { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d); ;} break; case 366: -#line 4523 "Gmsh.y" +#line 4524 "Gmsh.y" { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); ;} break; case 367: -#line 4524 "Gmsh.y" +#line 4525 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d); ;} break; case 368: -#line 4525 "Gmsh.y" +#line 4526 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d); ;} break; case 369: -#line 4526 "Gmsh.y" +#line 4527 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d); ;} break; case 370: -#line 4527 "Gmsh.y" +#line 4528 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d); ;} break; case 371: -#line 4528 "Gmsh.y" +#line 4529 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d); ;} break; case 372: -#line 4529 "Gmsh.y" +#line 4530 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d); ;} break; case 373: -#line 4530 "Gmsh.y" +#line 4531 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d); ;} break; case 374: -#line 4531 "Gmsh.y" +#line 4532 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d); ;} break; case 375: -#line 4532 "Gmsh.y" +#line 4533 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (5)].d) ? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); ;} break; case 376: -#line 4533 "Gmsh.y" +#line 4534 "Gmsh.y" { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} break; case 377: -#line 4534 "Gmsh.y" +#line 4535 "Gmsh.y" { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} break; case 378: -#line 4535 "Gmsh.y" +#line 4536 "Gmsh.y" { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} break; case 379: -#line 4536 "Gmsh.y" +#line 4537 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} break; case 380: -#line 4537 "Gmsh.y" +#line 4538 "Gmsh.y" { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} break; case 381: -#line 4538 "Gmsh.y" +#line 4539 "Gmsh.y" { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} break; case 382: -#line 4539 "Gmsh.y" +#line 4540 "Gmsh.y" { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} break; case 383: -#line 4540 "Gmsh.y" +#line 4541 "Gmsh.y" { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} break; case 384: -#line 4541 "Gmsh.y" +#line 4542 "Gmsh.y" { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} break; case 385: -#line 4542 "Gmsh.y" +#line 4543 "Gmsh.y" { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} break; case 386: -#line 4543 "Gmsh.y" +#line 4544 "Gmsh.y" { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} break; case 387: -#line 4544 "Gmsh.y" +#line 4545 "Gmsh.y" { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} break; case 388: -#line 4545 "Gmsh.y" +#line 4546 "Gmsh.y" { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} break; case 389: -#line 4546 "Gmsh.y" +#line 4547 "Gmsh.y" { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} break; case 390: -#line 4547 "Gmsh.y" +#line 4548 "Gmsh.y" { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} break; case 391: -#line 4548 "Gmsh.y" +#line 4549 "Gmsh.y" { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} break; case 392: -#line 4549 "Gmsh.y" +#line 4550 "Gmsh.y" { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} break; case 393: -#line 4550 "Gmsh.y" +#line 4551 "Gmsh.y" { (yyval.d) = floor((yyvsp[(3) - (4)].d) + 0.5); ;} break; case 394: -#line 4551 "Gmsh.y" +#line 4552 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 395: -#line 4552 "Gmsh.y" +#line 4553 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 396: -#line 4553 "Gmsh.y" +#line 4554 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;} break; case 397: -#line 4554 "Gmsh.y" +#line 4555 "Gmsh.y" { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;} break; case 398: -#line 4563 "Gmsh.y" +#line 4564 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 399: -#line 4564 "Gmsh.y" +#line 4565 "Gmsh.y" { (yyval.d) = 3.141592653589793; ;} break; case 400: -#line 4565 "Gmsh.y" +#line 4566 "Gmsh.y" { (yyval.d) = (double)ImbricatedTest; ;} break; case 401: -#line 4566 "Gmsh.y" +#line 4567 "Gmsh.y" { (yyval.d) = Msg::GetCommRank(); ;} break; case 402: -#line 4567 "Gmsh.y" +#line 4568 "Gmsh.y" { (yyval.d) = Msg::GetCommSize(); ;} break; case 403: -#line 4568 "Gmsh.y" +#line 4569 "Gmsh.y" { (yyval.d) = GetGmshMajorVersion(); ;} break; case 404: -#line 4569 "Gmsh.y" +#line 4570 "Gmsh.y" { (yyval.d) = GetGmshMinorVersion(); ;} break; case 405: -#line 4570 "Gmsh.y" +#line 4571 "Gmsh.y" { (yyval.d) = GetGmshPatchVersion(); ;} break; case 406: -#line 4571 "Gmsh.y" +#line 4572 "Gmsh.y" { (yyval.d) = Cpu(); ;} break; case 407: -#line 4572 "Gmsh.y" +#line 4573 "Gmsh.y" { (yyval.d) = GetMemoryUsage()/1024./1024.; ;} break; case 408: -#line 4573 "Gmsh.y" +#line 4574 "Gmsh.y" { (yyval.d) = TotalRam(); ;} break; case 409: -#line 4578 "Gmsh.y" +#line 4579 "Gmsh.y" { floatOptions.clear(); charOptions.clear(); ;} break; case 410: -#line 4580 "Gmsh.y" +#line 4581 "Gmsh.y" { std::vector<double> val(1, (yyvsp[(3) - (6)].d)); Msg::ExchangeOnelabParameter("", val, floatOptions, charOptions); @@ -11140,12 +11141,12 @@ yyreduce: break; case 411: -#line 4586 "Gmsh.y" +#line 4587 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 412: -#line 4588 "Gmsh.y" +#line 4589 "Gmsh.y" { (yyval.d) = Msg::GetOnelabNumber((yyvsp[(3) - (4)].c)); Free((yyvsp[(3) - (4)].c)); @@ -11153,7 +11154,7 @@ yyreduce: break; case 413: -#line 4593 "Gmsh.y" +#line 4594 "Gmsh.y" { (yyval.d) = Msg::GetOnelabNumber((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d)); Free((yyvsp[(3) - (6)].c)); @@ -11161,7 +11162,7 @@ yyreduce: break; case 414: -#line 4599 "Gmsh.y" +#line 4600 "Gmsh.y" { if(gmsh_yysymbols.count((yyvsp[(1) - (1)].c2).char2)){ gmsh_yysymbol &s(gmsh_yysymbols[(yyvsp[(1) - (1)].c2).char2]); @@ -11188,7 +11189,7 @@ yyreduce: break; case 415: -#line 4623 "Gmsh.y" +#line 4624 "Gmsh.y" { int index = (int)(yyvsp[(3) - (4)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){ @@ -11209,7 +11210,7 @@ yyreduce: break; case 416: -#line 4641 "Gmsh.y" +#line 4642 "Gmsh.y" { int index = (int)(yyvsp[(3) - (4)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){ @@ -11230,7 +11231,7 @@ yyreduce: break; case 417: -#line 4659 "Gmsh.y" +#line 4660 "Gmsh.y" { (yyval.d) = gmsh_yysymbols.count((yyvsp[(3) - (4)].c)); Free((yyvsp[(3) - (4)].c)); @@ -11238,7 +11239,7 @@ yyreduce: break; case 418: -#line 4664 "Gmsh.y" +#line 4665 "Gmsh.y" { std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(3) - (4)].c)); (yyval.d) = !StatFile(tmp); @@ -11247,7 +11248,7 @@ yyreduce: break; case 419: -#line 4670 "Gmsh.y" +#line 4671 "Gmsh.y" { if(gmsh_yysymbols.count((yyvsp[(2) - (4)].c))){ gmsh_yysymbol &s(gmsh_yysymbols[(yyvsp[(2) - (4)].c)]); @@ -11265,7 +11266,7 @@ yyreduce: break; case 420: -#line 4686 "Gmsh.y" +#line 4687 "Gmsh.y" { std::string struct_namespace((yyvsp[(2) - (3)].c)); (yyval.d) = (double)nameSpaces[struct_namespace].size(); @@ -11274,7 +11275,7 @@ yyreduce: break; case 421: -#line 4692 "Gmsh.y" +#line 4693 "Gmsh.y" { std::string struct_namespace(std::string("")); (yyval.d) = (double)nameSpaces[struct_namespace].size(); @@ -11282,7 +11283,7 @@ yyreduce: break; case 422: -#line 4698 "Gmsh.y" +#line 4699 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (2)].c))){ yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (2)].c)); @@ -11304,7 +11305,7 @@ yyreduce: break; case 423: -#line 4717 "Gmsh.y" +#line 4718 "Gmsh.y" { int index = (int)(yyvsp[(3) - (5)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){ @@ -11327,7 +11328,7 @@ yyreduce: break; case 424: -#line 4738 "Gmsh.y" +#line 4739 "Gmsh.y" { int index = (int)(yyvsp[(3) - (5)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){ @@ -11350,7 +11351,7 @@ yyreduce: break; case 425: -#line 4771 "Gmsh.y" +#line 4772 "Gmsh.y" { (yyval.d) = treat_Struct_FullName_dot_tSTRING_Float(NULL, (yyvsp[(1) - (3)].c), (yyvsp[(3) - (3)].c)); /* @@ -11377,12 +11378,12 @@ yyreduce: break; case 426: -#line 4795 "Gmsh.y" +#line 4796 "Gmsh.y" { (yyval.d) = treat_Struct_FullName_dot_tSTRING_Float((yyvsp[(1) - (5)].c), (yyvsp[(3) - (5)].c), (yyvsp[(5) - (5)].c)); ;} break; case 427: -#line 4798 "Gmsh.y" +#line 4799 "Gmsh.y" { NumberOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), (yyval.d)); Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(6) - (6)].c)); @@ -11390,7 +11391,7 @@ yyreduce: break; case 428: -#line 4804 "Gmsh.y" +#line 4805 "Gmsh.y" { double d = 0.; if(NumberOption(GMSH_GET, (yyvsp[(1) - (4)].c), 0, (yyvsp[(3) - (4)].c), d)){ @@ -11403,7 +11404,7 @@ yyreduce: break; case 429: -#line 4815 "Gmsh.y" +#line 4816 "Gmsh.y" { double d = 0.; if(NumberOption(GMSH_GET, (yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c), d)){ @@ -11416,7 +11417,7 @@ yyreduce: break; case 430: -#line 4825 "Gmsh.y" +#line 4826 "Gmsh.y" { (yyval.d) = Msg::GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d)); Free((yyvsp[(3) - (6)].c)); @@ -11424,7 +11425,7 @@ yyreduce: break; case 431: -#line 4830 "Gmsh.y" +#line 4831 "Gmsh.y" { int matches = 0; for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ @@ -11438,7 +11439,7 @@ yyreduce: break; case 432: -#line 4841 "Gmsh.y" +#line 4842 "Gmsh.y" { std::string s((yyvsp[(3) - (6)].c)), substr((yyvsp[(5) - (6)].c)); if(s.find(substr) != std::string::npos) @@ -11450,7 +11451,7 @@ yyreduce: break; case 433: -#line 4850 "Gmsh.y" +#line 4851 "Gmsh.y" { (yyval.d) = strlen((yyvsp[(3) - (4)].c)); Free((yyvsp[(3) - (4)].c)); @@ -11458,7 +11459,7 @@ yyreduce: break; case 434: -#line 4855 "Gmsh.y" +#line 4856 "Gmsh.y" { (yyval.d) = strcmp((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c)); Free((yyvsp[(3) - (6)].c)); Free((yyvsp[(5) - (6)].c)); @@ -11466,7 +11467,7 @@ yyreduce: break; case 435: -#line 4860 "Gmsh.y" +#line 4861 "Gmsh.y" { int align = 0, font = 0, fontsize = CTX::instance()->glFontSize; if(List_Nbr((yyvsp[(3) - (4)].l)) % 2){ @@ -11493,12 +11494,12 @@ yyreduce: break; case 436: -#line 4888 "Gmsh.y" +#line 4889 "Gmsh.y" { floatOptions.clear(); charOptions.clear(); ;} break; case 437: -#line 4890 "Gmsh.y" +#line 4891 "Gmsh.y" { std::string struct_namespace((yyvsp[(2) - (8)].c2).char1? (yyvsp[(2) - (8)].c2).char1 : std::string("")), struct_name((yyvsp[(2) - (8)].c2).char2); @@ -11526,105 +11527,105 @@ yyreduce: break; case 438: -#line 4918 "Gmsh.y" +#line 4919 "Gmsh.y" { (yyval.c2).char1 = NULL; (yyval.c2).char2 = (yyvsp[(1) - (1)].c); ;} break; case 439: -#line 4920 "Gmsh.y" +#line 4921 "Gmsh.y" { (yyval.c2).char1 = (yyvsp[(1) - (3)].c); (yyval.c2).char2 = (yyvsp[(3) - (3)].c); ;} break; case 440: -#line 4925 "Gmsh.y" +#line 4926 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); flag_tSTRING_alloc = 1; ;} break; case 441: -#line 4934 "Gmsh.y" +#line 4935 "Gmsh.y" { (yyval.i) = 99; ;} break; case 442: -#line 4936 "Gmsh.y" +#line 4937 "Gmsh.y" { (yyval.i) = (int)(yyvsp[(2) - (2)].d); ;} break; case 443: -#line 4941 "Gmsh.y" +#line 4942 "Gmsh.y" { (yyval.i) = 0; ;} break; case 444: -#line 4943 "Gmsh.y" +#line 4944 "Gmsh.y" { (yyval.i) = (yyvsp[(2) - (3)].i); ;} break; case 445: -#line 4949 "Gmsh.y" +#line 4950 "Gmsh.y" { memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double)); ;} break; case 446: -#line 4953 "Gmsh.y" +#line 4954 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i]; ;} break; case 447: -#line 4957 "Gmsh.y" +#line 4958 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i]; ;} break; case 448: -#line 4961 "Gmsh.y" +#line 4962 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i]; ;} break; case 449: -#line 4965 "Gmsh.y" +#line 4966 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i]; ;} break; case 450: -#line 4972 "Gmsh.y" +#line 4973 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (11)].d); (yyval.v)[1] = (yyvsp[(4) - (11)].d); (yyval.v)[2] = (yyvsp[(6) - (11)].d); (yyval.v)[3] = (yyvsp[(8) - (11)].d); (yyval.v)[4] = (yyvsp[(10) - (11)].d); ;} break; case 451: -#line 4976 "Gmsh.y" +#line 4977 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (9)].d); (yyval.v)[1] = (yyvsp[(4) - (9)].d); (yyval.v)[2] = (yyvsp[(6) - (9)].d); (yyval.v)[3] = (yyvsp[(8) - (9)].d); (yyval.v)[4] = 1.0; ;} break; case 452: -#line 4980 "Gmsh.y" +#line 4981 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (7)].d); (yyval.v)[1] = (yyvsp[(4) - (7)].d); (yyval.v)[2] = (yyvsp[(6) - (7)].d); (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0; ;} break; case 453: -#line 4984 "Gmsh.y" +#line 4985 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (7)].d); (yyval.v)[1] = (yyvsp[(4) - (7)].d); (yyval.v)[2] = (yyvsp[(6) - (7)].d); (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0; ;} break; case 454: -#line 4991 "Gmsh.y" +#line 4992 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(List_T*)); List_Add((yyval.l), &((yyvsp[(1) - (1)].l))); @@ -11632,14 +11633,14 @@ yyreduce: break; case 455: -#line 4996 "Gmsh.y" +#line 4997 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].l))); ;} break; case 456: -#line 5003 "Gmsh.y" +#line 5004 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); @@ -11647,14 +11648,14 @@ yyreduce: break; case 457: -#line 5008 "Gmsh.y" +#line 5009 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 458: -#line 5012 "Gmsh.y" +#line 5013 "Gmsh.y" { // creates an empty list (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -11662,14 +11663,14 @@ yyreduce: break; case 459: -#line 5017 "Gmsh.y" +#line 5018 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); ;} break; case 460: -#line 5021 "Gmsh.y" +#line 5022 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (4)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -11680,7 +11681,7 @@ yyreduce: break; case 461: -#line 5029 "Gmsh.y" +#line 5030 "Gmsh.y" { (yyval.l) = (yyvsp[(4) - (5)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -11691,14 +11692,14 @@ yyreduce: break; case 462: -#line 5040 "Gmsh.y" +#line 5041 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 463: -#line 5044 "Gmsh.y" +#line 5045 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "*") || !strcmp((yyvsp[(1) - (1)].c), "all")) (yyval.l) = 0; @@ -11710,7 +11711,7 @@ yyreduce: break; case 464: -#line 5056 "Gmsh.y" +#line 5057 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -11721,7 +11722,7 @@ yyreduce: break; case 465: -#line 5064 "Gmsh.y" +#line 5065 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (3)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -11732,7 +11733,7 @@ yyreduce: break; case 466: -#line 5072 "Gmsh.y" +#line 5073 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); for(double d = (yyvsp[(1) - (3)].d); ((yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d)) ? (d <= (yyvsp[(3) - (3)].d)) : (d >= (yyvsp[(3) - (3)].d)); @@ -11742,7 +11743,7 @@ yyreduce: break; case 467: -#line 5079 "Gmsh.y" +#line 5080 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!(yyvsp[(5) - (5)].d)){ //|| ($1 < $3 && $5 < 0) || ($1 > $3 && $5 > 0) @@ -11755,7 +11756,7 @@ yyreduce: break; case 468: -#line 5089 "Gmsh.y" +#line 5090 "Gmsh.y" { (yyval.l) = List_Create(3, 1, sizeof(double)); int tag = (int)(yyvsp[(3) - (4)].d); @@ -11781,7 +11782,7 @@ yyreduce: break; case 469: -#line 5112 "Gmsh.y" +#line 5113 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); getAllElementaryTags(0, (yyval.l)); @@ -11790,7 +11791,7 @@ yyreduce: break; case 470: -#line 5118 "Gmsh.y" +#line 5119 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); getAllElementaryTags(1, (yyval.l)); @@ -11799,7 +11800,7 @@ yyreduce: break; case 471: -#line 5124 "Gmsh.y" +#line 5125 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); getAllElementaryTags(2, (yyval.l)); @@ -11808,7 +11809,7 @@ yyreduce: break; case 472: -#line 5130 "Gmsh.y" +#line 5131 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); getAllElementaryTags(3, (yyval.l)); @@ -11817,7 +11818,7 @@ yyreduce: break; case 473: -#line 5136 "Gmsh.y" +#line 5137 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); if(!(yyvsp[(3) - (3)].l)){ @@ -11831,7 +11832,7 @@ yyreduce: break; case 474: -#line 5147 "Gmsh.y" +#line 5148 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); if(!(yyvsp[(3) - (3)].l)){ @@ -11845,7 +11846,7 @@ yyreduce: break; case 475: -#line 5158 "Gmsh.y" +#line 5159 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); if(!(yyvsp[(3) - (3)].l)){ @@ -11859,7 +11860,7 @@ yyreduce: break; case 476: -#line 5169 "Gmsh.y" +#line 5170 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); if(!(yyvsp[(3) - (3)].l)){ @@ -11873,7 +11874,7 @@ yyreduce: break; case 477: -#line 5181 "Gmsh.y" +#line 5182 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); getElementaryTagsInBoundingBox(0, (yyvsp[(5) - (16)].d), (yyvsp[(7) - (16)].d), (yyvsp[(9) - (16)].d), (yyvsp[(11) - (16)].d), (yyvsp[(13) - (16)].d), (yyvsp[(15) - (16)].d), (yyval.l)); @@ -11881,7 +11882,7 @@ yyreduce: break; case 478: -#line 5187 "Gmsh.y" +#line 5188 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); getElementaryTagsInBoundingBox(1, (yyvsp[(5) - (16)].d), (yyvsp[(7) - (16)].d), (yyvsp[(9) - (16)].d), (yyvsp[(11) - (16)].d), (yyvsp[(13) - (16)].d), (yyvsp[(15) - (16)].d), (yyval.l)); @@ -11889,7 +11890,7 @@ yyreduce: break; case 479: -#line 5193 "Gmsh.y" +#line 5194 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); getElementaryTagsInBoundingBox(2, (yyvsp[(5) - (16)].d), (yyvsp[(7) - (16)].d), (yyvsp[(9) - (16)].d), (yyvsp[(11) - (16)].d), (yyvsp[(13) - (16)].d), (yyvsp[(15) - (16)].d), (yyval.l)); @@ -11897,7 +11898,7 @@ yyreduce: break; case 480: -#line 5199 "Gmsh.y" +#line 5200 "Gmsh.y" { (yyval.l) = List_Create(10, 10, sizeof(double)); getElementaryTagsInBoundingBox(3, (yyvsp[(5) - (16)].d), (yyvsp[(7) - (16)].d), (yyvsp[(9) - (16)].d), (yyvsp[(11) - (16)].d), (yyvsp[(13) - (16)].d), (yyvsp[(15) - (16)].d), (yyval.l)); @@ -11905,7 +11906,7 @@ yyreduce: break; case 481: -#line 5204 "Gmsh.y" +#line 5205 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){ @@ -11918,7 +11919,7 @@ yyreduce: break; case 482: -#line 5214 "Gmsh.y" +#line 5215 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){ @@ -11931,7 +11932,7 @@ yyreduce: break; case 483: -#line 5224 "Gmsh.y" +#line 5225 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){ @@ -11944,7 +11945,7 @@ yyreduce: break; case 484: -#line 5234 "Gmsh.y" +#line 5235 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c))) @@ -11959,7 +11960,7 @@ yyreduce: break; case 485: -#line 5247 "Gmsh.y" +#line 5248 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(3) - (4)].c))) @@ -11974,28 +11975,28 @@ yyreduce: break; case 486: -#line 5259 "Gmsh.y" +#line 5260 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (4)].l); ;} break; case 487: -#line 5263 "Gmsh.y" +#line 5264 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (4)].l); ;} break; case 488: -#line 5267 "Gmsh.y" +#line 5268 "Gmsh.y" { (yyval.l) = (yyvsp[(4) - (6)].l); ;} break; case 489: -#line 5271 "Gmsh.y" +#line 5272 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c))) @@ -12016,7 +12017,7 @@ yyreduce: break; case 490: -#line 5289 "Gmsh.y" +#line 5290 "Gmsh.y" { (yyval.l) = List_Create(20,20,sizeof(double)); for(int i = 0; i < (int)(yyvsp[(7) - (8)].d); i++) { @@ -12027,7 +12028,7 @@ yyreduce: break; case 491: -#line 5297 "Gmsh.y" +#line 5298 "Gmsh.y" { (yyval.l) = List_Create(20,20,sizeof(double)); for(int i = 0; i < (int)(yyvsp[(7) - (8)].d); i++) { @@ -12038,7 +12039,7 @@ yyreduce: break; case 492: -#line 5305 "Gmsh.y" +#line 5306 "Gmsh.y" { Msg::Barrier(); FILE *File; @@ -12070,7 +12071,7 @@ yyreduce: break; case 493: -#line 5334 "Gmsh.y" +#line 5335 "Gmsh.y" { double x0 = (yyvsp[(3) - (14)].d), x1 = (yyvsp[(5) - (14)].d), y0 = (yyvsp[(7) - (14)].d), y1 = (yyvsp[(9) - (14)].d), ys = (yyvsp[(11) - (14)].d); int N = (int)(yyvsp[(13) - (14)].d); @@ -12083,7 +12084,7 @@ yyreduce: break; case 494: -#line 5344 "Gmsh.y" +#line 5345 "Gmsh.y" { std::vector<double> tmp; for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ @@ -12102,7 +12103,7 @@ yyreduce: break; case 495: -#line 5363 "Gmsh.y" +#line 5364 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); @@ -12110,21 +12111,21 @@ yyreduce: break; case 496: -#line 5368 "Gmsh.y" +#line 5369 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 497: -#line 5372 "Gmsh.y" +#line 5373 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].d))); ;} break; case 498: -#line 5376 "Gmsh.y" +#line 5377 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){ double d; @@ -12136,21 +12137,21 @@ yyreduce: break; case 499: -#line 5388 "Gmsh.y" +#line 5389 "Gmsh.y" { (yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (9)].d), (int)(yyvsp[(4) - (9)].d), (int)(yyvsp[(6) - (9)].d), (int)(yyvsp[(8) - (9)].d)); ;} break; case 500: -#line 5392 "Gmsh.y" +#line 5393 "Gmsh.y" { (yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255); ;} break; case 501: -#line 5404 "Gmsh.y" +#line 5405 "Gmsh.y" { int flag = 0; if(gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))){ @@ -12170,7 +12171,7 @@ yyreduce: break; case 502: -#line 5421 "Gmsh.y" +#line 5422 "Gmsh.y" { unsigned int val = 0; ColorOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(5) - (5)].c), val); @@ -12180,14 +12181,14 @@ yyreduce: break; case 503: -#line 5431 "Gmsh.y" +#line 5432 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); ;} break; case 504: -#line 5435 "Gmsh.y" +#line 5436 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (6)].d)); @@ -12202,7 +12203,7 @@ yyreduce: break; case 505: -#line 5450 "Gmsh.y" +#line 5451 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); List_Add((yyval.l), &((yyvsp[(1) - (1)].u))); @@ -12210,21 +12211,21 @@ yyreduce: break; case 506: -#line 5455 "Gmsh.y" +#line 5456 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].u))); ;} break; case 507: -#line 5462 "Gmsh.y" +#line 5463 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; case 508: -#line 5466 "Gmsh.y" +#line 5467 "Gmsh.y" { std::string val; if(!gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))) @@ -12240,7 +12241,7 @@ yyreduce: break; case 509: -#line 5479 "Gmsh.y" +#line 5480 "Gmsh.y" { std::string val; int j = (int)(yyvsp[(3) - (4)].d); @@ -12257,7 +12258,7 @@ yyreduce: break; case 510: -#line 5493 "Gmsh.y" +#line 5494 "Gmsh.y" { std::string val; int j = (int)(yyvsp[(3) - (4)].d); @@ -12274,7 +12275,7 @@ yyreduce: break; case 511: -#line 5510 "Gmsh.y" +#line 5511 "Gmsh.y" { (yyval.c) = treat_Struct_FullName_dot_tSTRING_String(NULL, (yyvsp[(1) - (3)].c), (yyvsp[(3) - (3)].c)); /* @@ -12303,12 +12304,12 @@ yyreduce: break; case 512: -#line 5536 "Gmsh.y" +#line 5537 "Gmsh.y" { (yyval.c) = treat_Struct_FullName_dot_tSTRING_String((yyvsp[(1) - (5)].c), (yyvsp[(3) - (5)].c), (yyvsp[(5) - (5)].c)); ;} break; case 513: -#line 5540 "Gmsh.y" +#line 5541 "Gmsh.y" { std::string out; StringOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), out); @@ -12319,7 +12320,7 @@ yyreduce: break; case 514: -#line 5548 "Gmsh.y" +#line 5549 "Gmsh.y" { std::string name = GModel::current()->getPhysicalName(0, (int)(yyvsp[(4) - (5)].d)); (yyval.c) = (char*)Malloc((name.size() + 1) * sizeof(char)); @@ -12328,7 +12329,7 @@ yyreduce: break; case 515: -#line 5554 "Gmsh.y" +#line 5555 "Gmsh.y" { std::string name = GModel::current()->getPhysicalName(1, (int)(yyvsp[(4) - (5)].d)); (yyval.c) = (char*)Malloc((name.size() + 1) * sizeof(char)); @@ -12337,7 +12338,7 @@ yyreduce: break; case 516: -#line 5560 "Gmsh.y" +#line 5561 "Gmsh.y" { std::string name = GModel::current()->getPhysicalName(2, (int)(yyvsp[(4) - (5)].d)); (yyval.c) = (char*)Malloc((name.size() + 1) * sizeof(char)); @@ -12346,7 +12347,7 @@ yyreduce: break; case 517: -#line 5566 "Gmsh.y" +#line 5567 "Gmsh.y" { std::string name = GModel::current()->getPhysicalName(3, (int)(yyvsp[(4) - (5)].d)); (yyval.c) = (char*)Malloc((name.size() + 1) * sizeof(char)); @@ -12355,21 +12356,21 @@ yyreduce: break; case 518: -#line 5575 "Gmsh.y" +#line 5576 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; case 519: -#line 5579 "Gmsh.y" +#line 5580 "Gmsh.y" { (yyval.c) = (yyvsp[(3) - (4)].c); ;} break; case 520: -#line 5583 "Gmsh.y" +#line 5584 "Gmsh.y" { (yyval.c) = (char *)Malloc(32 * sizeof(char)); time_t now; @@ -12380,7 +12381,7 @@ yyreduce: break; case 521: -#line 5591 "Gmsh.y" +#line 5592 "Gmsh.y" { std::string exe = Msg::GetExecutableName(); (yyval.c) = (char *)Malloc(exe.size() + 1); @@ -12389,7 +12390,7 @@ yyreduce: break; case 522: -#line 5597 "Gmsh.y" +#line 5598 "Gmsh.y" { std::string action = Msg::GetOnelabAction(); (yyval.c) = (char *)Malloc(action.size() + 1); @@ -12398,7 +12399,7 @@ yyreduce: break; case 523: -#line 5603 "Gmsh.y" +#line 5604 "Gmsh.y" { const char *env = GetEnvironmentVar((yyvsp[(3) - (4)].c)); if(!env) env = ""; @@ -12409,7 +12410,7 @@ yyreduce: break; case 524: -#line 5611 "Gmsh.y" +#line 5612 "Gmsh.y" { std::string s = Msg::GetString((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c)); (yyval.c) = (char *)Malloc((s.size() + 1) * sizeof(char)); @@ -12420,7 +12421,7 @@ yyreduce: break; case 525: -#line 5619 "Gmsh.y" +#line 5620 "Gmsh.y" { std::string s = Msg::GetOnelabString((yyvsp[(3) - (4)].c)); (yyval.c) = (char *)Malloc((s.size() + 1) * sizeof(char)); @@ -12430,7 +12431,7 @@ yyreduce: break; case 526: -#line 5626 "Gmsh.y" +#line 5627 "Gmsh.y" { std::string s = Msg::GetOnelabString((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c)); (yyval.c) = (char *)Malloc((s.size() + 1) * sizeof(char)); @@ -12441,7 +12442,7 @@ yyreduce: break; case 527: -#line 5634 "Gmsh.y" +#line 5635 "Gmsh.y" { int size = 1; for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++) @@ -12459,7 +12460,7 @@ yyreduce: break; case 528: -#line 5649 "Gmsh.y" +#line 5650 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); int i; @@ -12476,7 +12477,7 @@ yyreduce: break; case 529: -#line 5663 "Gmsh.y" +#line 5664 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); int i; @@ -12493,7 +12494,7 @@ yyreduce: break; case 530: -#line 5677 "Gmsh.y" +#line 5678 "Gmsh.y" { std::string input = (yyvsp[(3) - (8)].c); std::string substr_old = (yyvsp[(5) - (8)].c); @@ -12508,7 +12509,7 @@ yyreduce: break; case 531: -#line 5689 "Gmsh.y" +#line 5690 "Gmsh.y" { int size = 1; for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++) @@ -12527,7 +12528,7 @@ yyreduce: break; case 532: -#line 5705 "Gmsh.y" +#line 5706 "Gmsh.y" { int i = 0; while ((yyvsp[(3) - (4)].c)[i]) { @@ -12539,7 +12540,7 @@ yyreduce: break; case 533: -#line 5714 "Gmsh.y" +#line 5715 "Gmsh.y" { int i = 0; while ((yyvsp[(3) - (4)].c)[i]) { @@ -12551,7 +12552,7 @@ yyreduce: break; case 534: -#line 5723 "Gmsh.y" +#line 5724 "Gmsh.y" { int i = 0; while ((yyvsp[(3) - (4)].c)[i]) { @@ -12564,7 +12565,7 @@ yyreduce: break; case 535: -#line 5733 "Gmsh.y" +#line 5734 "Gmsh.y" { if((yyvsp[(3) - (8)].d)){ (yyval.c) = (yyvsp[(5) - (8)].c); @@ -12578,7 +12579,7 @@ yyreduce: break; case 536: -#line 5744 "Gmsh.y" +#line 5745 "Gmsh.y" { std::string in = (yyvsp[(3) - (8)].c); std::string out = in.substr((int)(yyvsp[(5) - (8)].d), (int)(yyvsp[(7) - (8)].d)); @@ -12589,7 +12590,7 @@ yyreduce: break; case 537: -#line 5752 "Gmsh.y" +#line 5753 "Gmsh.y" { std::string in = (yyvsp[(3) - (6)].c); std::string out = in.substr((int)(yyvsp[(5) - (6)].d), std::string::npos); @@ -12600,14 +12601,14 @@ yyreduce: break; case 538: -#line 5760 "Gmsh.y" +#line 5761 "Gmsh.y" { (yyval.c) = (yyvsp[(3) - (4)].c); ;} break; case 539: -#line 5764 "Gmsh.y" +#line 5765 "Gmsh.y" { char tmpstring[5000]; int i = printListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring); @@ -12629,7 +12630,7 @@ yyreduce: break; case 540: -#line 5783 "Gmsh.y" +#line 5784 "Gmsh.y" { std::string tmp = FixRelativePath(gmsh_yyname, (yyvsp[(3) - (4)].c)); (yyval.c) = (char*)Malloc((tmp.size() + 1) * sizeof(char)); @@ -12639,7 +12640,7 @@ yyreduce: break; case 541: -#line 5790 "Gmsh.y" +#line 5791 "Gmsh.y" { std::string tmp = SplitFileName(GetAbsolutePath(gmsh_yyname))[0]; (yyval.c) = (char*)Malloc((tmp.size() + 1) * sizeof(char)); @@ -12648,7 +12649,7 @@ yyreduce: break; case 542: -#line 5796 "Gmsh.y" +#line 5797 "Gmsh.y" { std::string tmp = SplitFileName((yyvsp[(3) - (4)].c))[0]; (yyval.c) = (char*)Malloc((tmp.size() + 1) * sizeof(char)); @@ -12658,7 +12659,7 @@ yyreduce: break; case 543: -#line 5803 "Gmsh.y" +#line 5804 "Gmsh.y" { std::string tmp = GetAbsolutePath((yyvsp[(3) - (4)].c)); (yyval.c) = (char*)Malloc((tmp.size() + 1) * sizeof(char)); @@ -12668,12 +12669,12 @@ yyreduce: break; case 544: -#line 5810 "Gmsh.y" +#line 5811 "Gmsh.y" { floatOptions.clear(); charOptions.clear(); ;} break; case 545: -#line 5812 "Gmsh.y" +#line 5813 "Gmsh.y" { std::string val((yyvsp[(3) - (6)].c)); Msg::ExchangeOnelabParameter("", val, floatOptions, charOptions); @@ -12684,7 +12685,7 @@ yyreduce: break; case 546: -#line 5820 "Gmsh.y" +#line 5821 "Gmsh.y" { std::string out; const std::string * key_struct = NULL; @@ -12708,17 +12709,17 @@ yyreduce: break; case 547: -#line 5844 "Gmsh.y" +#line 5845 "Gmsh.y" { struct_namespace = std::string(""); (yyval.d) = (yyvsp[(2) - (2)].d); ;} break; case 548: -#line 5846 "Gmsh.y" +#line 5847 "Gmsh.y" { struct_namespace = (yyvsp[(1) - (4)].c); Free((yyvsp[(1) - (4)].c)); (yyval.d) = (yyvsp[(4) - (4)].d); ;} break; case 549: -#line 5852 "Gmsh.y" +#line 5853 "Gmsh.y" { (yyval.l) = List_Create(20,20,sizeof(char*)); List_Add((yyval.l), &((yyvsp[(1) - (1)].c))); @@ -12726,14 +12727,14 @@ yyreduce: break; case 550: -#line 5857 "Gmsh.y" +#line 5858 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].c))); ;} break; case 551: -#line 5865 "Gmsh.y" +#line 5866 "Gmsh.y" { char tmpstr[256]; sprintf(tmpstr, "_%d", (int)(yyvsp[(4) - (5)].d)); @@ -12744,7 +12745,7 @@ yyreduce: break; case 552: -#line 5874 "Gmsh.y" +#line 5875 "Gmsh.y" { char tmpstr[256]; sprintf(tmpstr, "_%d", (int)(yyvsp[(4) - (5)].d)); @@ -12755,23 +12756,23 @@ yyreduce: break; case 553: -#line 5887 "Gmsh.y" +#line 5888 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; case 554: -#line 5890 "Gmsh.y" +#line 5891 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; case 555: -#line 5894 "Gmsh.y" +#line 5895 "Gmsh.y" { (yyval.c) = (yyvsp[(3) - (4)].c); ;} break; /* Line 1267 of yacc.c. */ -#line 12775 "Gmsh.tab.cpp" +#line 12776 "Gmsh.tab.cpp" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -12985,7 +12986,7 @@ yyreturn: } -#line 5897 "Gmsh.y" +#line 5898 "Gmsh.y" void assignVariable(const std::string &name, int index, int assignType, diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index 4f9705fb85..d495fc5243 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -2706,15 +2706,16 @@ LevelSet : Delete : tDelete '{' ListOfShapes '}' { - std::vector<int> tags[4]; ListOfShapes2Vectors($3, tags); - for(int dim = 0; dim < 4; dim++){ - for(unsigned int i = 0; i < tags[dim].size(); i++){ - if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ - GModel::current()->getOCCInternals()->remove(dim, tags[dim][i]); - } - GModel::current()->getGEOInternals()->remove(dim, tags[dim][i]); - GModel::current()->remove(dim, tags[dim][i]); + // don't use per-dimension vectors here, in order to respect the input + // ordering when deleting (important in GEO for dependencies, e.g. cannot + // delete boundary before the bounded entity) + for(int i = 0; i < List_Nbr($3); i++){ + Shape s; List_Read($3, i, &s); int dim = s.Type / 100 - 1; + if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){ + GModel::current()->getOCCInternals()->remove(dim, s.Num); } + GModel::current()->getGEOInternals()->remove(dim, s.Num); + GModel::current()->remove(dim, s.Num); } List_Delete($3); } -- GitLab