[Gmsh] SOLVED Physical entity as element tag in .bdf file import

jean pierre aubry jeanpierre at lamachine.fr
Tue Mar 12 07:09:41 CET 2013



> hello
> 
> when importing a .bdf and saving it as .msh i get the following type
> of line in the $Element section 
> 54727 3 2 0 37 63480 63476 63477 1399
> where all first tags are set at 0
> 
> where i want the first tag to be a physical, number 37 in this case,
> something like this 
> 54727 3 2 37 37  63480 63476 63477 1399
> 

Hi Jean-Pierre - I would do it like this: simply load the bdf and
define a physical group for each elementary group:

Merge "file.bdf";
surfs[] = Surface "*";
For i In {0 : #surfs[] - 1}
  Physical Surface(surfs[i]) = surfs[i];
EndFor
Save "file_with_physicals.msh";

thanks
it works, of course !
"elementary my dear Watson"


> i did this job with a bit of patience, with conditional find an
> replace in the .msh file up to now but this post opens my mind
> 
> http://www.geuz.org/pipermail/gmsh/2013/007959.html
> 
> any idea about how to it at import time
> 
> jean pierre aubry