FreeFem-sources icon indicating copy to clipboard operation
FreeFem-sources copied to clipboard

GMSH to freefem: borther element not in mesh

Open saharborzooei opened this issue 4 years ago • 6 comments

Hello,

I use gmsh to create a 3D mesh and I use it mesh3 Th=readmesh3("v1.mesh"); to use in freefem++. but get error borther element not in mesh . I have defined all the physical surfaces, volumes, ... . I also used two versions of gmsh 4.1 and gmsh 2.9 to make the similar mesh. but i get errors in both. Can someone guide me on this? Here is the geometry script Point(1) = {0, 0, 0, 1.0}; Point(2) = {0.5, 0, 0, 1.0}; Point(3) = {0.5, 0.3, 0, 1.0}; Point(4) = {0, 0.3, 0, 1.0}; Line(1) = {4, 1}; Line(2) = {1, 2}; Line(3) = {2, 3}; Line(4) = {3, 4}; Line Loop(5) = {4, 1, 2, 3};

Extrude {0, 0, 0.6} { Line{4, 3, 1, 2}; }

Point(15) = {0.1, 0.1, 0, 1.0}; Point(16) = {0.4, 0.1, 0, 1.0}; Point(17) = {0.4, 0.2, 0, 1.0}; Point(18) = {0.1, 0.2, 0, 1.0}; Line(29) = {16, 17}; Line(30) = {17, 18}; Line(31) = {18, 15}; Line(32) = {15, 16};Extrude {0, 0, 0.6} { Line{30, 31, 32, 29}; } Line Loop(49) = {32, 29, 30, 31}; Plane Surface(50) = {5, 49}; Line Loop(51) = {6, 14, 18, 10}; Line Loop(52) = {45, 33, 37, 41}; Plane Surface(53) = {51, 52}; Surface Loop(54) = {17, 50, 9, 53, 21, 13, 44, 48, 36, 40}; Volume(55) = {54}; Physical Line(56) = {14, 8, 4, 6, 1, 7, 3, 10, 11, 2, 18, 16, 37, 35, 30, 34, 29, 45, 33, 31, 32, 39, 41, 43}; Physical Surface(57) = {53, 17, 9, 50, 13, 21}; Plane Surface(58) = {52}; Plane Surface(59) = {49}; Physical Surface(60) = {59}; Physical Surface(61) = {58}; Physical Volume(62) = {55};

saharborzooei avatar Feb 12 '21 12:02 saharborzooei

THE PROBLEM,

Le 12 févr. 2021 à 13:45, saharborzooei [email protected] a écrit :

Point(1) = {0, 0, 0, 1.0}; Point(2) = {0.5, 0, 0, 1.0}; Point(3) = {0.5, 0.3, 0, 1.0}; Point(4) = {0, 0.3, 0, 1.0}; Line(1) = {4, 1}; Line(2) = {1, 2}; Line(3) = {2, 3}; Line(4) = {3, 4}; Line Loop(5) = {4, 1, 2, 3};

Extrude {0, 0, 0.6} { Line{4, 3, 1, 2}; }

Point(15) = {0.1, 0.1, 0, 1.0}; Point(16) = {0.4, 0.1, 0, 1.0}; Point(17) = {0.4, 0.2, 0, 1.0}; Point(18) = {0.1, 0.2, 0, 1.0}; Line(29) = {16, 17}; Line(30) = {17, 18}; Line(31) = {18, 15}; Line(32) = {15, 16};Extrude {0, 0, 0.6} { Line{30, 31, 32, 29}; } Line Loop(49) = {32, 29, 30, 31}; Plane Surface(50) = {5, 49}; Line Loop(51) = {6, 14, 18, 10}; Line Loop(52) = {45, 33, 37, 41}; Plane Surface(53) = {51, 52}; Surface Loop(54) = {17, 50, 9, 53, 21, 13, 44, 48, 36, 40}; Volume(55) = {54}; Physical Line(56) = {14, 8, 4, 6, 1, 7, 3, 10, 11, 2, 18, 16, 37, 35, 30, 34, 29, 45, 33, 31, 32, 39, 41, 43}; Physical Surface(57) = {53, 17, 9, 50, 13, 21}; Plane Surface(58) = {52}; Plane Surface(59) = {49}; Physical Surface(60) = {59}; Physical Surface(61) = {58}; Physical Volume(62) = {55};

frederichecht avatar Feb 12 '21 16:02 frederichecht

Excuse me, It seems the replied text of yours isn't complete.

Regards.

saharborzooei avatar Feb 12 '21 20:02 saharborzooei

Yes sorry The problème in your gmsh file not in freefem Please read more thé doc of gmsh Envoyé de mon iPad

Le 12 févr. 2021 à 21:16, saharborzooei [email protected] a écrit :

 Excuse me, It seems the replied text of yours isn't complete.

Regards.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

frederichecht avatar Feb 12 '21 21:02 frederichecht

Sorro, but I don't know how to use gmesh, but I am sure that you have no tetraedra in you mesh. Please the gmsh doc.

Le 12 févr. 2021 à 13:45, saharborzooei [email protected] a écrit :

Hello,

I use gmsh to create a 3D mesh and I use it mesh3 Th=readmesh3("v1.mesh"); to use in freefem++. but get error borther element not in mesh . I have defined all the physical surfaces, volumes, ... . I also used two versions of gmsh 4.1 and gmsh 2.9 to make the similar mesh. but i get errors in both. Can someone guide me on this? Here is the geometry script Point(1) = {0, 0, 0, 1.0}; Point(2) = {0.5, 0, 0, 1.0}; Point(3) = {0.5, 0.3, 0, 1.0}; Point(4) = {0, 0.3, 0, 1.0}; Line(1) = {4, 1}; Line(2) = {1, 2}; Line(3) = {2, 3}; Line(4) = {3, 4}; Line Loop(5) = {4, 1, 2, 3};

Extrude {0, 0, 0.6} { Line{4, 3, 1, 2}; }

Point(15) = {0.1, 0.1, 0, 1.0}; Point(16) = {0.4, 0.1, 0, 1.0}; Point(17) = {0.4, 0.2, 0, 1.0}; Point(18) = {0.1, 0.2, 0, 1.0}; Line(29) = {16, 17}; Line(30) = {17, 18}; Line(31) = {18, 15}; Line(32) = {15, 16};Extrude {0, 0, 0.6} { Line{30, 31, 32, 29}; } Line Loop(49) = {32, 29, 30, 31}; Plane Surface(50) = {5, 49}; Line Loop(51) = {6, 14, 18, 10}; Line Loop(52) = {45, 33, 37, 41}; Plane Surface(53) = {51, 52}; Surface Loop(54) = {17, 50, 9, 53, 21, 13, 44, 48, 36, 40}; Volume(55) = {54}; Physical Line(56) = {14, 8, 4, 6, 1, 7, 3, 10, 11, 2, 18, 16, 37, 35, 30, 34, 29, 45, 33, 31, 32, 39, 41, 43}; Physical Surface(57) = {53, 17, 9, 50, 13, 21}; Plane Surface(58) = {52}; Plane Surface(59) = {49}; Physical Surface(60) = {59}; Physical Surface(61) = {58}; Physical Volume(62) = {55};

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/FreeFem/FreeFem-sources/issues/166, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLPNDGODHGPQ52OSFYQWL3S6UPFRANCNFSM4XQUAR2A.

frederichecht avatar Feb 12 '21 21:02 frederichecht

My mesh is ok, but I realized that when I use ready simple geometries from gmsh, mesh can be imported in freefem without a problem. but when I change the geo in gmsh like after boolean or defining the surface, I see this error. So, do you think freefem supports all kinds of 3d meshes from gmsh? Regards.

saharborzooei avatar Feb 15 '21 08:02 saharborzooei

Hello,

Your geo file has a problem. It creates 4 orphan triangles which donot belong to any tetrahedron. Just comment out these lines

//Plane Surface(58) = {52};
//Plane Surface(59) = {49};

in your geo file and your mesh is good to go.

mohd-afeef-badri avatar Mar 04 '21 19:03 mohd-afeef-badri