Dear all,
I faced a problem. The file of .mesh from GMSH (INRIA Medit) cannot be opened by freefem++.
FreeFem reminded that " Return type false, your mesh is MeshS type, use gmshloadS function". However, the 3D geometry has been meshed by “Mesh << 3D” in Gmsh.
The freefem code:
"load “msh3”
load “gmsh”
mesh3 Th=gmshload3(“Background.mesh”);
plot (Th,wait=1);".
The Gmsh code:
"SetFactory(“OpenCASCADE”);
Box(1) = {0, 0, 0, 1, 1, 1};
Physical Volume(“background”) = {1};
lcar1 = .05;
MeshSize{ PointsOf{ Volume{:}; } } = lcar1;
Point(20009) = {0.45, 0.45, 1, 0.05};
//+
Point(20010) = {0.55, 0.45, 1, 0.05};
//+
Point(20011) = {0.55, 0.55, 1, 0.05};
//+
Point(20012) = {0.45, 0.55, 1, 0.05};
//+
Line(20013) = {20009, 20010};
//+
Line(20014) = {20010, 20011};
//+
Line(20015) = {20011, 20012};
//+
Line(20016) = {20012, 20009};
//+
Curve Loop(20017) = {20016, 20013, -20014, -20015};
Surface(1001)={20017};
Physical Surface(“Source”,1002)={1001};
Point(30009) = {0.45, 0, 0.45, 0.05};
//+
Point(30010) = {0.55, 0, 0.45, 0.05};
//+
Point(30011) = {0.55, 0, 0.55, 0.05};
//+
Point(30012) = {0.45, 0, 0.55, 0.05};
//+
Line(30013) = {30009, 30010};
//+
Line(30014) = {30010, 30011};
//+
Line(30015) = {30011, 30012};
//+
Line(30016) = {30012, 30009};
//+
Curve Loop(30017) = {30016, 30013, -30014, -30015};
Surface(2001)={30017};
Physical Surface(“Source2”,2002)={2001};
BooleanFragments{ Volume{1}; Delete; }{ Surface{1001,2001}; Delete; }".
The save processes of .mesh file: “File >> Export >> Mesh INRIA Medit.mesh >> Background.mesh.”.
Please give me some advice. I’d appreciate it.
Best regards
Liu