[Gmsh] surface normals: some point inwards, but most point in the negative direction

Matthias G. Imhof mgi at vt.edu
Thu Nov 21 04:54:27 CET 2002


I defined a simple rectangular block and noticed that normals in the x-direction 
actually change signs depending on the surface to point into the block, while 
the other normals point in the negative y- or z-directions pointing into the 
block for some surfaces and pointing outwards for others.

How can I change this model to have all normals point out of the block?

A second question for the same problem. If I generate a quantity by duplicate, 
how can I lates access this quantity? I tried to assign it to, e.g., a plane 
surface but that did not work.

Matthias

Here is my example with the normals:

lc = 0.1 ;

Point(1) = {0,  0,  0, lc} ;
Point(2) = {.1, 0,  0, lc} ;
Point(3) = {.1, .3, 0, lc} ;
Point(4) = {0,  .3, 0, lc} ;

Point(5) = {0,  0,  0.5, lc} ;
Point(6) = {.1, 0,  0.5, lc} ;
Point(7) = {.1, .3, 0.5, lc} ;
Point(8) = {0,  .3, 0.5, lc} ;

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

Line(5) = {1,2} ;
Line(6) = {2,6} ;
Line(7) = {6,5} ;
Line(8) = {5,1} ;

Line(9) = {1,5} ;
Line(10) = {5,8} ;
Line(11) = {8,4} ;
Line(12) = {4,1} ;

Line Loop(13) = {1,2,3,4} ;
Line Loop(14) = {5,6,7,8} ;
Line Loop(15) = {9,10,11,12} ;

Plane Surface(1) = {13} ;
Plane Surface(2) = {14} ;
Plane Surface(3) = {15} ;

Translate {0,0,0.5} {Duplicata{ Surface{1} ; }}
Translate {0,0.3,0} {Duplicata{ Surface{2} ; }}
Translate {0.1,0,0} {Duplicata{ Surface{3} ; }}

-- 
**************************************************************************
* Matthias G.Imhof, Ph.D.                          phone: (540) 231 6004 *
* Derring Hall 4044                                fax:   (540) 231 3386 *
* Virginia Tech                                        email: mgi at vt.edu *
* Blacksburg, VA 24061-0420             http://www.geol.vt.edu/profs/mgi *
* There is no dark side of the moon really. Matter of fact it's all dark *
**************************************************************************