[Gmsh] Ignore points for triangulation

Christophe Geuzaine geuzaine at acm.caltech.edu
Thu Jun 24 17:00:56 CEST 2004


jlsonnette at tiscali.fr wrote:

> Dear Gmsh-users,
> 
> I have recently installed Gmsh, and I am pleasantly surprised with the
> capabilities of Gmsh, and before posing my question I would like to
> congratulate the developers and contributors with their achievements.
> 
> I am trying out Gmsh to generate a 2D grid for hydrodynamic river
> modelling -- shallow water equations.  The river banks have been measured
> by surveyors, and the output is produced in an AutoCad file (*.dxf).  With
> dxf2geo.pl, I can easily import the file xy coordinates of the river
> banks.  Creating a surface with holes (taking out the little islands in
> the river), generates a surface to which I can apply the 2D mesh command.
> 
> However, sometimes the surveyors have measured more much more detail than
> we need in our model, and it seems to me that Gmsh creates a triangle from
> each of the points on the river bank, thus in certain areas a grid is
> created that is far to detailed for our needs.
> 
> Is it possible to let Gmsh ignore some points for the triangulation?  I
> have played around with the characteristic length etc, as I learned from
> the tutorials, but I am probably confusing things.  I would be very
> pleased if someone has some suggestions.  (I do apologise for this
> newbie-type question)
> 

Jean - If all the points are used as begin/end control points for
geometry curves, they will indeed end up in the triangulation.

The solution is to use the points as "intermediate" control points
in higher order curves (splines, b-splines). Here is a small example :

lc = 0.1;
For i In {1:100}
   Point(i) = {i/100,Sin(i/10)/10,0,lc};
EndFor
Point(200) = {0,-0.2,0,lc};
Point(201) = {1,-0.2,0,lc};
BSpline(1) = {1,1,1:100,100,100};
Line(2) = {1,200};
Line(3) = {200,201};
Line(4) = {201,100};
Line Loop(5) = {4,-1,2,3};
Plane Surface(6) = {5};

Best,

Christophe

-- 
Christophe Geuzaine
Applied and Computational Mathematics, Caltech
geuzaine at acm.caltech.edu - http://geuz.org