Adding insufficient points on a line
Found in gmsh 2.6.0. I do not have 3.0 available to test it.
The maximum length criterium 'cl' is not taken correctly into account. An examle will illustrate this very nicely:
I have a very simply cubic domain that I want to mesh:
// here we define a 3D slab to exert pressure on
cl = 5000;
// units in meters
xsize = 100000;
ysize = 500000;
thick = 20000;
// Define the square base layer at z=0
Point(1) = { 0, 0, 0, cl};
Point(2) = {xsize, 0, 0, cl};
Point(3) = { 0, ysize, 0, cl};
Point(4) = {xsize, ysize, 0, cl};
Line(1) = {1, 2};
Line(2) = {2, 4};
Line(3) = {4, 3};
Line(4) = {3, 1};
Line Loop(5) = {1,2,3,4} ;
Plane Surface(6) = {5};
// Extrude upper half
Extrude{0,0,thick/2}{Surface{6};}
// and lower half
Extrude{0,0,-thick/2}{Surface{6};}
The line z=0,y=500e3 is 100e3 long (from x=0 to x=100e3). Because cl is set to 5000, we put expect points here at 0, 5e3, 10e3, 15e3...100e3. 21 in total. However, only 18 points are generated, for a total of 20.
129 94736.842105269 500000 0
130 89473.68421053798 500000 0
131 84210.52631580697 500000 0
132 78947.36842107597 500000 0
133 73684.21052634496 500000 0
134 68421.05263161394 500000 0
135 63157.89473688294 500000 0
136 57894.73684215193 500000 0
137 52631.57894742092 500000 0
138 47368.42105267078 500000 0
139 42105.26315790146 500000 0
140 36842.10526313217 500000 0
141 31578.94736838604 500000 0
142 26315.78947365504 500000 0
143 21052.63157892403 500000 0
144 15789.47368419301 500000 0
145 10526.31578946201 500000 0
146 5263.157894731004 500000 0
between the original corner points 0,500e3,0 and 100e3,500e3,0
This seems like a typical error of determining n_points as (line length / cl), in stead of (line length / cl) + 1