[Gmsh] Bug?

Christophe Geuzaine cgeuzaine at ulg.ac.be
Fri Mar 21 18:49:53 CET 2008


sserebrinsky at gmail.com wrote:
> Hi Christophe,
> 
> I am Santiago Serebrinsky, perhaps you remember me from Caltech (I used 
> to work with Michael Ortiz). I started using Gmsh, since I remembered 
> that Laurent Stainier introduced me to it while we were office mates. I 
> saw him juggling with his plots, so I gave it a chance. I like it very 
> much, though I am still getting familiar with it. I write to you mainly 
> about a possible bug, but I will take the opportunity to make some other 
> comments too:

Hi Santiago - Nice to hear from you--I remember you from Caltech.

> 
> 1- Is it possible that the triad changes from left to right handed upon 
> drag-manipulation with the mouse? I had this impression several times, 
> but I am not sure if it is simply a prejudice of mine while looking at 
> what I called the left-handed image (see attachments), or if it can be 
> mathematically proved that such image can actually only be interpreted 
> as left-handed as I did.

Just using the rotations it shouldn't be possible. However, our "lasso 
zoom" function allows you to "invert" the viewport (control+click 
somewhere, move to the left and click). Maybe we should forbid this 
behaviour...


> 
> 2- It seemed to me that an extrusion extrudes not only the arguments of 
> the Extrude command, but also all elementary entities in the bottom part 
> of the bottom-up structure of the extruded entities. Is that right? Is 

Yes, when you extrude a surface, you need to extrude its bounding 
curves, which means also extruding the curve's boundary points.

> it possible to detect/retrieve the ID number assigned to the extrusion 
> of a particular elementary entity in the original extruded bottom-up 
> structure?

The extrusion commands return the IDs of some of the newly created 
entities, but not all of them (with the current language there would be 
no easy way to know what is what). So at the moment, if you do

mylist[] = Extrude {0,0,1} { Surface{2}; };

mylist[0] will contain the ID of new "top" surface
mylist[1] will contain the ID of the new volume
mylist[2,...] will contain the IDs of the new "side" surfaces.

As you can see, we don't return the IDs of the newly created curves or 
points. (As a workaround, you can use the "Boundary" command to get 
these IDs, given the IDs of the new surfaces, then the IDs of the 
boundaries.)


> 
> 3- Is it possible to generate a mesh symmetric about a given plane (by 
> symmetry-copying another mesh)? I would like to do that, with a later 

Not currently, unless you generate a structured mesh (Transfinite or 
Extruded). We plan to add this is in a future release.

> recognition and removal of the nodes that lay at the symmetry plane by 
> something like Coherence. If not (as I guess) do you plan to incorporate 
> something like this? As of now, I am doing this manually (which is quite 
> simple), but the upgrade would be very nice ;-)
> 
> 4- Is it possible to refer in some way, in expressions, to all elements 
> in a list (instead of enumerating all of them)? I found by trial and 
> error that after
>    extr[] = Extrude { 0, 0, B } { Surface{3,4}; } ;
> I could use either
>    symm[] = Symmetry { 0, 1, 0, 0 } { Duplicata{ Surface{ 3, 4, extr[0], 
> extr[1], extr[2], extr[3], extr[4], extr[5], extr[6], extr[7], extr[8], 
> extr[9], extr[10], extr[11], extr[12], extr[13], extr[14], extr[15], 
> extr[16], extr[17], extr[18], extr[19], extr[20], extr[21], extr[22] }; 
> } } ;
> or
>    symm[] = Symmetry { 0, 1, 0, 0 } { Duplicata{ Surface{ 3, 4, extr[] 
> }; } } ;
> which is much easier and versatile, but I wasn't sure if such usage is 
> general, if Surface{ 3, 4, extr[] } is detecting which entities of 
> extr[] are surfaces and neglecting the rest, etc. On the other hand, it 

Extr[] is simply a list of numbers. You can always use a list (or a 
sublist, e.g. Extr[{3:5}]) anywhere where a list is expected. But there 
is no additional info stored in the list--just numbers. No check is 
performed to see if the number is a surface ID, a point ID... or some 
number you just generated yourself.


> seemed puzzling to me that, even if the previous command did the trick, 
> a similar command but only for points
>    symm[] = Symmetry { 0, 1, 0, 0 } { Duplicata{ Point{ extr[] }; } } ;
> did not generate symmetric copies of all points in extr. Same happened 
> with lines. Is there any way of performing these operations?

Cf. my explanation above about what Extr[] contains.


> 
> 5- I would suggest that you add some examples after the enumeration of 
> each command. They may be very helpful, beyond the tutorial, since they 
> allow easy matching of the pattern with the example.
> 

Indeed :-) The docs should definitely be improved.

Take care,

Christophe




> 6-
> 
> Ok, good enough for now. Thanks for all, and please say hello to 
> Laurent. Perhaps we meet at the WCCM8 (I will be there).
> 
> Best, from Argentina,
> 
> Santiago
> 
> 
> PS: I apologize in advance if any of this was in the reference manual 
> and I missed it.
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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