[Gmsh] Identifiers of entities generated by extrusion
Christophe Geuzaine
cgeuzaine at ulg.ac.be
Sun Feb 15 16:19:14 CET 2009
Lucas Blattner Martinho wrote:
> Dear Gmsh developers and users,
>
>
>
> I am using Gmsh to build the geometric model of an oil pipeline
> subjected to the electromagnetic interference from a nearby high voltage
> transmission line.
>
> After making an extrusion to build a surface corresponding to a quarter
> of the pipe cross-section with the command
>
> /Pipeline_Quarter_Section1[] = Extrude{ {1,0,0},
> {0,Pipe_Center_Y,Pipe_Center_Z}, Pi/2}
> {Line{Pipe_Inner_Radius_Line1,Pipe_Thickness_Line1,Coating_Thickness_Line1};
> Layers{Circunference_Discretization}; Recombine;};
> /
>
> I would like use the indentifiers of the entities generated by this
> extrusion (the surface and a few lines) that became stored in the list
> Pipeline_Quarter_Section1[] in further geometric transformations.
> However, the only way I could find to tell for example that
> Pipeline_Quarter_Section1[3] stores the identifier of a particular line
> (and not of a different one generated by the same extrusion
> transformation) was trial and error...
>
> Is it possible to predict the pattern of these vectors of entities
> generated by Gmsh in such transformations? I have found a few hints at
> the mesh tutorial t3.geo
> (http://www.geuz.org/gmsh/doc/texinfo/gmsh-full.html#SEC65), but it does
> not seem to cover all possible cases...
Indeed, we forgot to document this. I've added the following in the
reference manual:
>>>
As explained in @ref{Floating point expressions}, @var{extrude} can be
used in an expression, in which case it returns a list of identification
numbers. By default, the list contains the ``top'' of the extruded
entity at index 0 and the extruded entity at index 1, followed by the
``sides'' of the extruded entity at indices 2, 3, etc. For example:
@example
Point(1) = {0,0,0};
Point(2) = {1,0,0};
Line(1) = {1, 2};
out[] = Extrude{0,1,0}{ Line{1}; };
Printf("top line = %g", out[0]);
Printf("surface = %g", out[1]);
Printf("side lines = %g and %g", out[2], out[3]);
@end example
This behaviour can be changed with the
@code{Geometry.ExtrudeReturnLateralEntities} option (@pxref{Geometry
options list}).
<<<
>
> Would it also be possible to generate through the extrusion separated
> lists of entities that do not mix lines, surfaces and volumes in an
> unpredictable sequence?
>
Yes, but we'd have to change the syntax...
>
>
> Yours faithfully,
>
> Lucas Blattner Martinho
>
>
> Laboratório de Eletromagnetismo Aplicado - LMAG
> Escola Politécnica da Universidade de São Paulo
> São Paulo, Brasil
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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