<div dir="ltr"><div>Dear Geordie,</div><div>Thank you so much for your help.</div><div>I have one more question, when I used gmsh to open solid1.mesh, I could see mesh inside the graph. I just add a sentence "plot(Th) " in solid1.edp, there was no mesh inside, it is so strange.</div>
<div>Best regards,</div><div>Xuemin</div><div> </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-03-17 19:09 GMT-05:00 Geordie McBain <span dir="ltr"><<a href="mailto:gdmcbain@freeshell.org" target="_blank">gdmcbain@freeshell.org</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2014-03-18 5:54 GMT+11:00 ÍõѧÃô <<a href="mailto:campusxuemin@gmail.com">campusxuemin@gmail.com</a>>:<br>
<div><div class="h5">> Dear gmsh user,<br>
> I got geometry from solidwork and got mesh from gmsh. I should define<br>
> physical surface in .geo file and I did. But when I imported mesh to<br>
> freefem, it seemed that there was no physical surface. Especially physical<br>
> surface 27 in geo file. Attachments are geo file and msh file. Thank you so<br>
> much.<br>
<br>
</div></div>For FreeFem++, you might have more luck exporting in "format -mesh",<br>
as in <a href="http://www.geuz.org/pipermail/gmsh/2010/005438.html" target="_blank">http://www.geuz.org/pipermail/gmsh/2010/005438.html</a><br>
<br>
On the command-line (after having renamed your "solid (1).geo" as "solid1.geo"):<br>
<br>
$ gmsh -3 -format mesh -string 'Mesh.SaveElementTagType=2;' solid1.geo<br>
<br>
For me this produced a solid1.mesh, as attached, which did have<br>
triangular elements with tag 27.  I verified this by calculating their<br>
collective area in FreeFem++ with a very small FreeFem++ script,<br>
solid1.edp, as attached:<br>
<br>
mesh3 Th = readmesh3("solid1.mesh");<br>
int[int] surfaces = [25, 26, 27];<br>
for (int i = 0; i < surfaces.n; i++) {<br>
    cout << "Area of Surface" << " " << surfaces[i] << ": " <<<br>
int2d(Th, surfaces[i]) (1.0)<br>
    << endl;<br>
}<br>
<br>
It produces the output:<br>
<br>
Area of Surface 25: 2<br>
Area of Surface 26: 2.1146<br>
Area of Surface 27: 105.613<br>
</blockquote></div><br></div>