2014-03-18 5:54 GMT+11:00 王学敏 <[email protected]>:
> Dear gmsh user,
> I got geometry from solidwork and got mesh from gmsh. I should define
> physical surface in .geo file and I did. But when I imported mesh to
> freefem, it seemed that there was no physical surface. Especially physical
> surface 27 in geo file. Attachments are geo file and msh file. Thank you so
> much.

For FreeFem++, you might have more luck exporting in "format -mesh",
as in http://www.geuz.org/pipermail/gmsh/2010/005438.html

On the command-line (after having renamed your "solid (1).geo" as "solid1.geo"):

$ gmsh -3 -format mesh -string 'Mesh.SaveElementTagType=2;' solid1.geo

For me this produced a solid1.mesh, as attached, which did have
triangular elements with tag 27.  I verified this by calculating their
collective area in FreeFem++ with a very small FreeFem++ script,
solid1.edp, as attached:

mesh3 Th = readmesh3("solid1.mesh");
int[int] surfaces = [25, 26, 27];
for (int i = 0; i < surfaces.n; i++) {
    cout << "Area of Surface" << " " << surfaces[i] << ": " <<
int2d(Th, surfaces[i]) (1.0)
    << endl;
}

It produces the output:

Area of Surface 25: 2
Area of Surface 26: 2.1146
Area of Surface 27: 105.613

Attachment: solid1.mesh
Description: Mesh model

Attachment: solid1.edp
Description: Binary data

_______________________________________________
gmsh mailing list
[email protected]
http://www.geuz.org/mailman/listinfo/gmsh

Reply via email to