[Gmsh] Array interval as argument for Plane Surface holes
Christophe Geuzaine
cgeuzaine at ulg.ac.be
Tue Jan 8 11:38:18 CET 2013
Hi Riccardo - Could you send a complete test file? Here this type of syntax seems to work just fine:
Point(3) = {0.9, 0.7, 0, 1.0};
Point(4) = {-0.9, 0.7, 0, 1.0};
Point(5) = {-0.5, 0.2, 0, 1.0};
Point(6) = {-0.5, -0.1, 0, 1.0};
Point(7) = {-0.3, -0.1, 0, 1.0};
Point(8) = {-0.3, 0.2, 0, 1.0};
Point(9) = {0.3, 0.2, 0, 1.0};
Point(10) = {0.3, -0.1, 0, 1.0};
Point(11) = {0.5, -0.1, 0, 1.0};
Point(12) = {0.5, 0.2, 0, 1.0};
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};
Line(5) = {6, 7};
Line(6) = {7, 8};
Line(7) = {8, 5};
Line(8) = {5, 6};
Line(9) = {10, 11};
Line(10) = {11, 12};
Line(11) = {12, 9};
Line(12) = {9, 10};
Line Loop(13) = {4, 1, 2, 3};
Line Loop(14) = {8, 5, 6, 7};
Line Loop(15) = {12, 9, 10, 11};
hh[] = {14, 15};
Plane Surface(16) = {13, hh[0]:hh[1]};
On 07 Jan 2013, at 17:48, Ricardo Luiz Dalbosco <ricardo at dalbosco.net> wrote:
> Hi,
>
> I'm trying to use an array interval to create holes in a Plane Surface.
>
> My script generates dynamically a variable number of squares, wich represent coil turns. Those squares are then assembled in Line Loops and saved in an array.
>
> Then, It's possible to create a Physical Surface like this
> Physical Surface("Coil") = {loopsCoil[1]:loopsCoil[n]};
>
> Where loopsCoil[ ] is the array, and n is the number of turns
>
> It happens that the coil is placed inside the Air region. Then, to define my Air region I need to specify the Coil as a "hole".
> But when I try to do this:
>
> Plane Surface(airRegion) = {allAirRegion, loopsCoil[1]:loopsCoil[n]}
>
> Gmsh simply closes, without an error message.
> So, it seems I can't define a Plane Surface with the array syntax.
>
> Does anyone knows how I can proceed to create the holes in the surface?
>
>
> --
> Ricardo Luiz Dalbosco -
>
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
--
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine