[Gmsh] Bug in 3D mesher of Gmsh - cylinder inside a block...

Christophe Geuzaine geuzaine at acm.caltech.edu
Wed Feb 5 16:53:21 CET 2003


Toshiro K. Ohsumi wrote:
> Hello,
> 
>     I have attached a gmsh file which supposed to create a cylinder within a
> block.  The domain of interest is the block, but I want the mesh finer around
> the cylinder (a ruled surface, assuming I did it right).  I tried both with
> and without making the cylinder a volume, but the mesher complained that there
> are coplanar points.  I am not sure why this error occurs.  I thought I was
> following tutorial #5 in creating this model.  I must be doing something 
> elementarily wrong.  Any help would be greatly appreciated.  Many thanks,
> 

Toshiro - some of your surface definitions (cylinder bases) are wrong + 
you have zero-volume areas. Here is a corrected version of your file:

lc = 0.475/2;
lc2 = 0.25/2;
lent = 1.0;
Point(1) = {0, 0, -lent, lc};
Point(2) = {lent, 0, -lent, lc};
Point(3) = {lent, lent, -lent, lc};
Point(4) = {0, lent, -lent, lc};
Point(5) = {0, 0, lent, lc};
Point(6) = {lent, 0, lent, lc};
Point(7) = {lent, lent, lent, lc};
Point(8) = {0, lent, lent, lc};
Point(9) = {0.5, lent, 0, lc2};
Point(10) = {0.5, lent, 0.3, lc2};
Point(11) = {0.8, lent, 0, lc2};
Point(12) = {0.2, lent, 0, lc2};
Point(13) = {0.5, lent, -0.3, lc2};
Point(14) = {0.5, 0, 0.3, lc2};
Point(15) = {0.8, 0, 0, lc2};
Point(16) = {0.2, 0, 0, lc2};
Point(17) = {0.5, 0, -0.3, lc2};
Point(18) = {0.5, 0, 0, lc2};
Line (101) = {1, 2};
Line (102) = {2, 3};
Line (103) = {3, 4};
Line (104) = {4, 1};
Line (105) = {1, 5};
Line (106) = {4, 8};
Line (107) = {8, 5};
Line (108) = {8, 7};
Line (109) = {5, 6};
Line (110) = {7, 6};
Line (111) = {6, 2};
Line (112) = {3, 7};

Circle(1000408) = {10,9,11};
Circle(1000409) = {11,9,13};
Circle(1000410) = {13,9,12};
Circle(1000411) = {12,9,10};
Circle(1000413) = {16,18,14};
Circle(1000414) = {14,18,15};
Circle(1000415) = {15,18,17};
Circle(1000416) = {17,18,16};
Line(1000418) = {17,13};
Line(1000419) = {16,12};
Line(1000420) = {14,10};
Line(1000421) = {15,11};
Line Loop(1000422) = {1000409,1000410,1000411,1000408};
Plane Surface(1000423) = {1000422};
Line Loop(1000424) = {1000413,1000414,1000415,1000416};
Plane Surface(1000425) = {1000424};
Line Loop(1000426) = {-112,103,106,108};
Plane Surface(1000427) = {1000426,1000422};
Line Loop(1000428) = {-101,105,109,111};
Plane Surface(1000429) = {1000428,1000424};
Line Loop(1000430) = {111,102,112,110};
Plane Surface(1000431) = {1000430};
Line Loop(1000432) = {109,-110,-108,107};
Plane Surface(1000433) = {1000432};
Line Loop(1000434) = {105,-107,-106,104};
Plane Surface(1000435) = {1000434};
Line Loop(1000436) = {101,102,103,104};
Plane Surface(1000437) = {1000436};
Line Loop(1000439) = {-1000411,-1000419,1000413,1000420};
Ruled Surface(1000440) = {1000439};
Line Loop(1000441) = {1000408,-1000421,-1000414,1000420};
Ruled Surface(1000442) = {1000441};
Line Loop(1000443) = {-1000409,-1000421,1000415,1000418};
Ruled Surface(1000444) = {1000443};
Line Loop(1000445) = {1000410,-1000419,-1000416,1000418};
Ruled Surface(1000446) = {1000445};
Surface Loop(1000447) = {1000425,1000440,1000423,1000444,1000442,1000446};
Volume(1000448) = {1000447};
Surface Loop(1000449) = 
{1000440,1000427,1000431,1000429,1000437,1000435,1000433,1000442,1000444,1000446};
Volume(1000450) = {1000449};

Christophe

-- 
Christophe Geuzaine

Tel: (626) 395-4552    http://www.geuz.org
Fax: (626) 578-0124    mailto:geuzaine at acm.caltech.edu