[Gmsh] need help on using Gmsh

Christophe Geuzaine christophe.geuzaine at case.edu
Mon Nov 28 17:09:35 CET 2005


迟小羽 wrote:
> gmsh,您好!
> 
> 	I met some problem when using Gmsh.
> 	It is easy to triangulate a plane within a lineloop. But I need trianglelate a 2D model which has a margin as a lineloop and some inside fixed lines(they can not be changed), just like "pic1", how can I use Gmsh to do this?  How can I init the model in "mytest1.txt"? With the help of tutorial, I just can generate 1D mesh by add points in the lines. I need 2D mesh with adding refine points inside the region and the lines.
> 	eager for your help.
> 

The line has to be part of the boundary (see
http://geuz.org/gmsh/doc/texinfo/gmsh_fot.html#FOOT1), i.e.:

lc = 0.02;

Point(1) = {0, 0, 0, 9.e-1 * lc};
Point(2) = {.1, 0,  0, lc} ;
Point(3) = {.1, .3, 0, lc} ;
Point(4) = {0,  .3, 0, lc} ;
Point(5) = {.0333333,.1,0, lc};

Line(1) = {1,2} ;
Line(2) = {3,2} ;
Line(3) = {3,4} ;
Line(4) = {4,1} ;
Line(6) = {5,1} ;

Line(7) = {5,2};
Line Loop(8) = {7,-2,3,4,-6};
Plane Surface(9) = {8};
Line Loop(10) = {7,-1,-6};
Plane Surface(11) = {10};


-- 
Christophe Geuzaine
Assistant Professor, Case Western Reserve University, Mathematics
http://www.case.edu/artsci/math/geuzaine