[Gmsh] Gmsh 2.7.1 -- Embedding line in surface issue

Omid Mahabadi omid.mahabadi at geomechanica.com
Thu Jul 4 03:48:07 CEST 2013


Dear Christophe and Gmsh team,
I am attempting at including a few Lines in a Plane Surface using the 
"Line{} In Surface{}" command. The attached geometry file (test.geo) is 
a simplified geometry that I made to demonstrate the meshing issue. I 
have noticed that if the lines to be included/embedded in the Surface 
touch the line loop of the surface, meshing fails in Gmsh 2.7.1 with the 
following error message:

    Info    : Meshing 1D...
    Info    : Meshing curve 1 (Line)
    Info    : Meshing curve 2 (Line)
    Info    : Meshing curve 3 (Line)
    Info    : Meshing curve 4 (Line)
    Info    : Meshing curve 7 (Line)
    Info    : Meshing curve 8 (Line)
    Info    : Meshing curve 9 (Line)
    Info    : Meshing curve 10 (Line)
    Info    : Done meshing 1D (0.004 s)
    Info    : Meshing 2D...
    Info    : Meshing surface 6 (Plane, MeshAdapt)
    Warning : :-( There are 2 intersections in the 1D mesh (curves 3 10)
    Warning : 8-| Gmsh splits those edges and tries again
    Error   : Unable to recover an edge 4.41 1.7 && 4.4 1.7 (9/50)
    Info    : Done meshing 2D (0.0587628 s)
    Info    : 206 vertices 214 elements
    Error   : ------------------------------
    Error   : Mesh generation error summary
    Error   :     2 warnings
    Error   :     1 error
    Error   : Check the full log for details
    Error   : ------------------------------


However, I can still mesh the attached geometry using Gmsh 2.5.0. I have 
also noticed that if the embedded lines do not touch the actual lines of 
the surface (test2.geo), Gmsh 2.7.1 is able to perform meshing without 
any issues.

Is there something I'm missing in my geo file for compatibility with 
newer versions of Gmsh? Are there any workarounds?

I appreciate your time and help.

Best regards,
Omid

-- 
Omid Mahabadi
Geomechanica, Inc.
Tel: (647) 478-9767 x824

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20130703/cbd71bd7/attachment.html>
-------------- next part --------------
// Gmsh project created on Wed Jul  3 18:04:54 2013
Point(1) = {4, 1.7, 0, 1.0};
Point(2) = {4.5, 1.7, 0, 1.0};
Point(3) = {4.5, 1.4, 0, 1.0};
Point(4) = {4, 1.4, 0, 1.0};
Line(1) = {4, 3};
Line(2) = {3, 2};
Line(3) = {2, 1};
Line(4) = {1, 4};
Line Loop(5) = {1, 2, 3, 4};
Plane Surface(6) = {5};
Point(5) = {4.1, 1.7, 0, 1.0};
Point(6) = {4.1, 1.6, 0, 1.0};
Line(7) = {6, 5};
Translate {0.1, 0, 0} {
  Duplicata { Line{7}; }
}
Translate {0.1, 0, 0} {
  Duplicata { Line{8}; }
}
Translate {0.1, 0, 0} {
  Duplicata { Line{9}; }
}
Line{7,8,9,10} In Surface{6};
Characteristic Length {11, 12, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2} = 0.01;

// Use MeshAdapt meshing algorithm
Mesh.Algorithm = 1;
-------------- next part --------------
// Gmsh project created on Wed Jul  3 18:04:54 2013
Point(1) = {4, 1.7, 0, 1.0};
Point(2) = {4.5, 1.7, 0, 1.0};
Point(3) = {4.5, 1.4, 0, 1.0};
Point(4) = {4, 1.4, 0, 1.0};
Point(5) = {4.1, 1.7, 0, 1.0};
Point(6) = {4.1, 1.6, 0, 1.0};
Line(7) = {6, 5};
Translate {0.1, 0, 0} {
  Duplicata { Line{7}; }
}
Translate {0.1, 0, 0} {
  Duplicata { Line{8}; }
}
Translate {0.1, 0, 0} {
  Duplicata { Line{9}; }
}
Line(1) = {4, 3};
Line(2) = {3, 2};
Line(3) = {2, 12};
Line(4) = {12, 10};
Line(5) = {10, 8};
Line(6) = {8, 5};
Line(11) = {5, 1};
Line(12) = {1, 4};
Characteristic Length {11, 12, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2} = 0.01;

Line Loop(5) = {1, 2, 3, 4, 5, 6, 11, 12};
Plane Surface(6) = {5};
Line{7,8,9, 10} In Surface{6};

// Use MeshAdapt meshing algorithm
Mesh.Algorithm = 1;