[Gmsh] Creating surface groups inside mesh file

D Haley mycae at yahoo.com
Thu Aug 12 16:16:13 CEST 2010


Hello,

I am having a few problems understanding how to assign surface elements (triangles) to given partitions.

I have written some code to do boolean subtraction of a closed gmsh triangulated surface from a gmsh tetrahedral mesh. When doing so, any new triangle surfaces that are created I would like to group together. I tried writing the elements like

===
const unsigned int ELEM_THREE_NODE_TRIANGLE = 2;

f << tetrahedra.size()+ ui+1 <<  " " << ELEM_THREE_NODE_TRIANGLE << 
 " 3 " << triangles[ui].physGroup << " 1 0 " << triangles[ui].p[0]+1 
 << " "  << triangles[ui].p[1]+1     << " "<< triangles[ui].p[2]+1 << endl;
===

but this does not seem to work. 

Looking at section 9.1 of the manual, the only thing I can think of is that I need to write the $PhysicalNames section; however there is no description of this section in the manual, aside from the short summary given.

Does anyone have any advice on what I should be doing?

Thanks.