[Gmsh] Get surfaces after extrude

Giorgos Bontzios giorgos2000 at gmail.com
Thu May 24 11:02:34 CEST 2012


I haven't quite understand how to use the "Physical" command to define the
volumes after extrusion as described in example t3.geo.
My problem is as follows.
I have two surfaces and I extrude them both and then I create the mesh.
Now, I am looking for a systematic way to find which of the extruded
surfaces belong to original surface 1 and which to surface 2.
Please note, that printing the surfaces in console doesn't help me since I
want to use the created mesh as input to a custom solver.
Thus I want this info to be written somewhere inside the mesh file in order
to read it from C and convert it appropriately.

Below is my geo file

Thank you in advance
Giorgos

----------------------MY GEO FILE---------------------

lc = 0.9;

Point(1) = {0,0,0,lc};
Point(2) = {1,0,0,lc};
Point(3) = {1,10,0,lc};
Point(4) = {0,10,0,lc};

Point(5) = {5,0,0,lc};
Point(6) = {7,0,0,lc};
Point(7) = {7,10,0,lc};
Point(8) = {5,10,0,lc};

Line(1) = {1,2} ;
Line(2) = {2,3} ;
Line(3) = {3,4} ;
Line(4) = {4,1} ;
Line(5) = {5,6} ;
Line(6) = {6,7} ;
Line(7) = {7,8} ;
Line(8) = {8,5} ;

Line Loop(10) = {1,2,3,4} ;
Line Loop(11) = {5,6,7,8} ;

Plane Surface(20) = {10} ;
Plane Surface(21) = {11} ;
out[]= Extrude {0, 0, 1} { Surface{20}; }; //can't figure out how it works
:(
Extrude {0, 0, 1} { Surface{21}; }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20120524/6cf87701/attachment.html>