[Gmsh] Variable substitution (bash style)

Zacharie DE GRÈVE [530160] Zacharie.DEGREVE at umons.ac.be
Fri Nov 4 16:42:41 CET 2011


Hello everyone,

I think it would be interesting to have a functionality in gmsh similar to the variable substition in unix bash shells. It could simplify the programming of complex geometries by easily defining unique variable names.

For instance, you would have something like :

For i In (1:100)
    Physical Surface Conductor${i}={surcond${i}[0]}
EndFor

It would be equivalent to :

Physical Surface Conductor1={surcond1[0]}
...
Physical Surface Conductor100={surcond100[0]}


To my knowledge, such a functionality is not available currently in gmsh, whereas in getdp you have the ~{i} expression. Am I right ? If yes, I could try to include it in the gmsh source. To which files and objects do I have to concentrate my effort ?

Thank you for your attention.

Regards

Zacharie De Grève
PhD Student
University of Mons




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20111104/659511b5/attachment.html>