[Gmsh] Structured meshing -- merging objects

Christophe Geuzaine c.geuzaine at ulg.ac.be
Tue Jan 18 17:09:07 CET 2005


Almanstoetter, Juergen wrote:
> 
> Hello,
> 
> I have got a question on how to merge to objects, in my case an arc and
> a line to a single object, so I can use it for structured meshing with 
> hexaeders.
> The problem I want to solve is given by the input above. I would like to 
> merge
> two objects Circle (3) and Line (4)  in order to use the resulting X for a
> structured hexaeder meshing.
> How can I do this ?

Unfortunately, you can't: Gmsh's structured mesh capabilities are
limited to surfaces defined by 3 or 4 elementary boundary curves. If you
want to use the structured algorithms, you will have to subdivide your
surface. For example, with your geometry:

Rlamp = 5;
Relek = 0.5;

// Points
Point(1) = {0, 0, 0, 1};
Point(2) = {0, Rlamp, 0, 1.0};
Point(3) = {Rlamp/2, 0 , 0, 1.0};
Point(4) = {Rlamp/2+Relek, 0, 0, 1.0};
Point(5) = {Rlamp/2+Relek, Relek, 0, 1.0};
Point(6) = {Rlamp, Relek, 0, 1.0};
Point(7) = {0, Rlamp/2, 0, 1.0};

// Lines
Line (1) = {1,7};
Line (6) = {7,2};
Line (2) = {1,3};
Circle (3) = {3, 4, 5} Plane{0, 0, 1};
Line (4) = {5,6};
Circle (5) = {2, 1, 6} Plane{0, 0, 1};
Ellipse(7) = {5,1,1,7};

// Surfaces
Line Loop(8) = {7,6,5,-4};
Plane Surface(9) = {8};
Line Loop(10) = {3,7,-1,2};
Plane Surface(11) = {10};

// Meshing
Transfinite Line{1:7} = 10;
Transfinite Surface {9} = {7,5,6,2};
Transfinite Surface {11} = {1,3,5,7};
Recombine Surface{9,11};

Best,

Christophe

-- 
Christophe Geuzaine
Applied and Computational Mathematics, Caltech
geuzaine at acm.caltech.edu - http://geuz.org