[Gmsh] Retrieving point IDs from extrude

Andreas Puettmann a.puettmann at grs-sim.de
Fri Apr 8 12:43:45 CEST 2011


Thank you for the rapid reply!
It works!

Andreas


On 04/08/2011 11:23 AM, Ruth V. Sabariego wrote:
> Hi Andreas,
> You can use the internal function Boundary for finding the boundary 
> lines of the surface and then the points.
>
> Try the following example:
>
> ====================================
> R = 1 ;
> lc =  R/2 ;
>
> Point(1) = {0,0,0,lc};
>
> Point(2) = {R,0,0,lc};
> Point(3) = {0,R,0,lc};
> Point(4) = {-R,0,0,lc};
> Point(5) = {0,-R,0,lc};
>
> Circle(1) = {2,1,3};
> Circle(2) = {3,1,4};
> Circle(3) = {4,1,5};
> Circle(4) = {5,1,2};
>
> Line Loop(5) = {1,2,3,4};
> Plane Surface(6) = {5};
>
> list[] = Extrude {0,0,4*R} {
>     Surface{6};
> } ;
> cylinder_volume = list[1];
> cylinder_surface_top   = list[0];
> cylinder_surfaces_side[]= list[{2:5}];
>
> cylinder_lines_top[] = Boundary{Surface{cylinder_surface_top};};
> cylinder_points_top[]= Boundary{Line{cylinder_lines_top[]};};
> Characteristic Length {cylinder_points_top[]} = lc/10 ;
>
> ===================================
> Regards,
> Ruth
>
>
> On 08/04/11 10:54, Andreas Puettmann wrote:
>> Hi everyone,
>>
>> I want to mesh a cylinder (which I create by extrusion) with changing 
>> size elements. At one end I want to have smaller elements than at the 
>> other end. This is actually just the same problem as described here:
>> http://www.geuz.org/pipermail/gmsh/2010/005752.html
>>
>> I know I can control the element size by adjusting the characteristic 
>> length:
>>
>> Characteristic Length { expression-list } = expression;
>>
>> But the question is: How can I obtain the numbers of points which 
>> were newly created by the extrude command? I.e. how should I specify 
>> expression-list?
>>
>> As far as I understand, the extrude command only returns the IDs of 
>> the generated volume and surfaces. But I need points to specify 
>> characteristic lengths...
>>
>> Any help is greatly appreciated.
>>
>> Cheers
>> Andreas
>>
>>
>

-- 
Dipl.-Ing. Andreas Puettmann

German Research School for
Simulation Sciences GmbH
c/o Institute of Bio- and Geosciences 1
52425 Jülich | Germany

Tel +49 2461 61 5541
Fax +49 2461 61 3870
Web www.grs-sim.de

Members: Forschungszentrum Jülich GmbH | RWTH Aachen University
Registered in the commercial register of the local court of
Düren (Amtsgericht Düren) under registration number HRB 5268
Registered office: Jülich
Executive board: Prof. Marek Behr, Ph.D | Dr. Norbert Drewes