[Gmsh] Geometrical to Physical entity

Christophe Geuzaine geuzaine at acm.caltech.edu
Sat Jan 31 02:27:10 CET 2004

```Lussou Philippe wrote:

> Christophe Geuzaine a écrit :
>
>
>>Lussou Philippe wrote:
>>
>>
>>
>>
>>>Is there a way to know the number of the new geometrical entities that
>>>are created when I perform a transformation (Translate, Symmetry, etc) ?
>>>
>>>It would be very useful if I want to perform another transformation (on
>>>the newly created entities) or to declare them as physical entities.
>>>
>>>Is there a magic formula ??
>>>
>>>
>>>
>>
>>Transformation commands actually return the indices of the tranformed
>>entities into a list. So you can for example write (cf. tutorial/t2.geo)
>>
>>newpt[] = Translate {0,0.1,0} { Duplicata{ Point{3}; } } ;
>>
>>and newpt[0] will contain what you need.
>>
>>Cheers,
>>
>>Christophe
>>
>>
>>
>
> Thanks a lot for this fast & efficient answer, I should have spent more
> time reading the tutorial :)
> It's OK for rotation, symmetry translation, (...) but for extrusion I
> still have a question, see attached file.
>

...

> // It could be usefull for defining physical entities for applying loads and/or limit conditions.
>
> // of course I have tried
> // newsurfs[] = Extrude Surface { 11, {  0.0, 0.0, e1 }  } ;
> // but it results in parse error :)
>

Right, I forgot about that. In the current version, there is a small
syntax ugliness with "Extrude" commands. If you want to get the list of
transformed entities (actually, just the "top" of the extruded entity),
you need to end the command with a double semi colon, i.e.:

newsurfs[] = Extrude Surface { 11, {  0.0, 0.0, e1 }  } ; ;

I will try to fix that in a future release.

Christophe

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

```