[Gmsh] How to apply physicals after extruding (continued)
Christophe Geuzaine
c.geuzaine at ulg.ac.be
Tue Jun 8 06:40:20 CEST 2004
Jonas Forssell wrote:
> Gentlemen,
>
> After some more digging, I guess the way to apply
> physicals would be as I now do in the attached file.
>
> However I don't seem to get the right elementary
> numbers for the surfaces when I use the Extrude Line.
> Is this a bug or have I missed something?
No, it's a bug :-(
The good news is that I just fixed it in my tree, so the correction
should show up in tomorrow's nightly source archive
(http://geuz.org/gmsh/src/).
I also slightly modified the "layer numbering feature" so that, if you
you set the layer number to 0, then the elements will be saved with the
usual automatic surface number. In this way, I think we can satisfy both
the GUI and the "scripting" modes. Tell me what you think...
BTW, if you use the automatic numbering, you could also solve your
problem by using the following "dirty" trick: you can add "s1 = news;"
before the group of extrusion commands you want to group in physical
regions and "s2 = news;" after them. You can then use "Physical
Surface(1) = {s1:s2-1};" to define the physical surface you want. Even
if some of the surfaces in the range (s1, s1+1, ..., s2-1) are not
defined, the physical definition should still work.
>
> My old question still stands though. Is there a way to
> assign physicals to nodes and get them listed in the
> .msh file?
You should be able to do that by defining "Physical Points" and using
the same trick as above (with "newp" instead of "news"). Note that you
can also save an arbitrary mesh node with "Physical Point".
Hope this helps,
Christophe
--
Christophe Geuzaine
Applied and Computational Mathematics, Caltech
geuzaine at acm.caltech.edu - http://geuz.org