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



--
Dr. Ir. Ruth V. Sabariego
University of Liege, Dept. of Electrical Engineering&  Computer Science,
Applied&  Computational Electromagnetics (ACE),
phone: +32-4-3663737 - fax: +32-4-3662910 - http://ace.montefiore.ulg.ac.be/


_______________________________________________
gmsh mailing list
[email protected]
http://www.geuz.org/mailman/listinfo/gmsh

Reply via email to