[Gmsh] Getting GMsh to ignroe shoreline points

Geordie McBain gdmcbain at freeshell.org
Mon Aug 6 17:20:06 CEST 2012


2012/8/6 Jiplea, Marius <marius.jiplea11 at imperial.ac.uk>:
> Hello to all Gmsh users,
>
> At the moment, I am trying to use Gmsh to mesh the ocean surfaces and am
> experiencing an issue with it. I am extracting, out of some specially
> designed maps, the contours of altitude 0 (the shorelines, in a simpler way)
> and am writing them down to a .geo file (using a script). As a result, the
> .geo file will have a lot of points which are very close to each other (see
> first attached picture), but I'm happy with that.
>
> Afterwards, when I try and mesh the surface, the mesh is very fine near the
> shorelines because each point of the 0 contour gets included in the mesh
> (see second picture attached). The issue here is that I need to control how
> fine and coarse the mesh needs to be and I can't because it will always be
> very fine near the shorelines. Up until now, I couldn't get Gmsh to ignore
> the points. I know that I could use polygon simplification or just set a
> curved line to go near all the points and that might fix the issue, but I'm
> especially interested in any way of getting Gmsh to ignore the points on the
> shoreline.

Hello.  I think that if instead of using only two points per BSpline,
as on lines 3762 and on in uk_westeu.geo, you used more, then Gmsh
would not insist on having one mesh edge per pair of points.  You
might even be able to put all the consecutive two-point splines into a
single long spline.  The same thing works with Spline and even Line
(despite the documentation for the latter saying that a Line should
only have two points).

   http://geuz.org/gmsh/doc/texinfo/gmsh.html#Lines

Checking the documentation for Line again now I noticed that the
nearby description of the Compound Line command; that looks like it
might help your case too.