[Gmsh] errors.....

Christophe Geuzaine geuzaine at acm.caltech.edu
Mon Nov 17 19:01:36 CET 2003


Ramesh Balakrishnan wrote:

> Christophe,
> Perhaps I am not following you. But the instructions you have given me
> for transfinite (structured) grids do not work. I am appending the
> untitled.geo file for this simple geometry. 
> 
> The unstructured mesh works in a rather simple way by partitioning the
> square into two triangles by drawing a diagonal. Is it possible to
> increase the number of points inside the figure to get more triangles?

Transfinite meshes are generated using transfinite interpolation, i.e.,
the number of elements is entirely determined by the discretization of
the boundaries.

> 
> I would appreciate of you could give me a few more hints to generate
> structured and unstructured grids.
> 
> Also, does each edge require a characteristic length. For instance, when
> I go to mesh -> define -> transfinite, there are three options line,
> surface , volume. Clicking on line brings up a window entitled
> "Contextual mesh definitions". Under the tab transfinite line, I entered
> 100 (number of points) and 1 for progression. Then under volume it asks
> me for the volume number. What do I enter here?

Well, the number of the volume you want to mesh using the transfinite
algorithm ;-)

(You have to enter it "by hand" because we don't have a way to  select
volumes interactively using the GUI at the moment.)

>>
>>Point(1) = {0.0,0.0,0.0,1.0};
>>Point(2) = {1.0,0.0,0.0,1.0};
>>Point(3) = {1.0,1.0,0.0,1.0};
>>Point(4) = {0.0,1.0,0.0,1.0};
>>Line(1) = {1,2};
>>Line(2) = {2,3};
>>Line(3) = {3,4};
>>Line(4) = {4,1};
>>Line Loop(5) = {2,3,4,1};
>>Plane Surface(6) = {5};
>>Point(10) = {0.5,0.5,0,};
>>Ruled Surface(7) = {5};
>>Ruled Surface(8) = {5,5,5,5};
>>Ruled Surface(9) = {5};

These definitions are wrong (please, have a look at the documentation:
http://www.geuz.org/gmsh/doc/texinfo/gmsh_5.html#SEC36).

For example, a correct way to define a transfinite quadrangular mesh
would be:

Point(1) = {0.0,0.0,0.0,1.0};
Point(2) = {1.0,0.0,0.0,1.0};
Point(3) = {1.0,1.0,0.0,1.0};
Point(4) = {0.0,1.0,0.0,1.0};
Line(1) = {1,2};
Line(2) = {2,3};
Line(3) = {3,4};
Line(4) = {4,1};
Line Loop(5) = {2,3,4,1};
Plane Surface(6) = {5};
// Or "Ruled Surface(6) = {5}": this doesn't matter here, since the
// surface is plane anyway.

Transfinite Line{1:4} = 20 Using Progression 0.9;
Transfinite Surface{6} = {1,2,3,4};
Recombine Surface{6};

Christophe

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