[Gmsh] intersecting lines and splines

Cian Wilson cwilson at ldeo.columbia.edu
Mon Jun 18 18:58:41 CEST 2012


Hello,

I'm trying to produce a mesh that requires lines to intersect with (the 
control points on) a spline (see attached subduction.geo file).    In an 
ideal world I would be able to define my elementary and physical 
surfaces as being bounded by these lines and subsections of the spline 
(i.e. elementary surface 1 in the file would be split into smaller 
subsurfaces) but failing that I would like to ensure that the lines are 
at least embedded in the mesh - as is done in the attached file ("Line 
{12, 13, 14, 15} In Surface {1};").  However when I mesh this file 
("gmsh -2 -algo meshadapt subduction.geo") I get a series of warnings:
Warning : :-( There are 2 intersections in the 1D mesh (curves 15 1)
Warning : 8-| Gmsh splits those edges and tries again
Warning : :-) Gmsh was able to recover all edges after 7 iterations
and a poor mesh in the vicinity of the intersection and/or sometimes an 
error:
Error   : Unable to recover an edge 425 -200 && 425.058 -200.053 (51/68)
which produces no mesh above the spline.

Any advice on whether what I'm trying is possible would be much 
appreciated.  I'm using gmsh version 2.5.1 on ubuntu 12.04.

Many thanks!
Cian

--
Cian Wilson
Post-doctoral Research Scientist
Lamont-Doherty Earth Observatory, Columbia University, New York


-------------- next part --------------
Point(1) = {0.0, -6.0, 0.0, 10.0};
Point(2) = {115.0, -19.0, 0.0, 10.0};
Point(3) = {166.0, -32.0, 0.0, 10.0};
Point(4) = {175.48785576759019, -34.999999999999552, 0.0, 10.0};
Point(5) = {210.0, -50.0, 0.0, 10.0};
Point(6) = {271.03335665066453, -80.000000000002416, 0.0, 10.0};
Point(7) = {330.0, -114.0, 0.0, 10.0};
Point(8) = {425.0, -200.0, 0.0, 10.0};
Point(9) = {535.0, -300.0, 0.0, 10.0};
Spline(1) = {1, 2, 3, 4, 5, 6, 7, 8, 9};
Point(10) = {585.0, -300.0, 0.0, 10.0};
Line(2) = {9, 10};
Point(11) = {585.0, -50.0, 0.0, 10.0};
Line(3) = {11, 10};
Point(12) = {585.0, -35.0, 0.0, 10.0};
Line(4) = {12, 11};
Point(13) = {585.0, 0.0, 0.0, 10.0};
Line(5) = {13, 12};
Point(14) = {0.0, 0.0, 0.0, 10.0};
Line(6) = {14, 13};
Line(7) = {1, 14};
Line Loop(8) = {1, 2, -3, -4, -5, -6, -7};
Plane Surface(1) = {8}; // fluid

Point(15) = {0.0, -300.0, 0.0, 10.0};
Line(9) = {15, 9};
Line(10) = {15, 1};
Line Loop(11) = {1, -9, 10};
Plane Surface(2) = {11}; // mantle

Line(12) = {4, 12}; // lowercrust_top

Point(16) = {425.0, -50.0, 0.0, 10.0};
Line(13) = {16, 11}; // wedge_top

Line(14) = {5, 16}; // fluid_top

Line(15) = {16, 8}; // fluid_right

Line {12, 13, 14, 15} In Surface {1};

Physical Surface(89) = {2};
Physical Surface(98) = {1};

Physical Line(96) = {2};
Physical Line(97) = {9};
Physical Line(98) = {10};
Physical Line(99) = {13};
Physical Line(100) = {1, 1};
Physical Line(106) = {4};
Physical Line(109) = {12};
Physical Line(110) = {14};
Physical Line(111) = {15};
Physical Line(93) = {7, 6};
Physical Line(94) = {5};
Physical Line(95) = {3};

// Produced by: make_mesh.py -o subduction.geo slabtops/04_Cascadia/slabpoints.dat