[Gmsh] surface normals in gmsh 4.0

Daniel Winklehner winklehn at mit.edu
Mon Aug 27 19:28:53 CEST 2018


Thanks a lot for the quick answer. That clears it up!
Cheers,
   Daniel

-----Original Message-----
From: Christophe Geuzaine <cgeuzaine at uliege.be> 
Sent: Monday, August 27, 2018 1:56 AM
To: Daniel Winklehner <winklehn at mit.edu>
Cc: gmsh at onelab.info
Subject: Re: [Gmsh] surface normals in gmsh 4.0



> On 26 Aug 2018, at 23:01, Daniel Winklehner <winklehn at mit.edu> wrote:
> 
> Hi All,
>  
> The following would produce correctly oriented surface normals in gmsh 3.0 (surfaces 1 to 277 form a “half-shell” of my symmetric part):
>  
> new_surfs[] = Symmetry {1, 0, 0, 0} {Duplicata{Surface {1:277};}}; 
> Physical Surface(2) = {1:277, -new_surfs[]};
>  
> The minus before ‘new_surfs’ was necessary to flip the normals in the mirrored surfaces. However, in gmsh 4.0, it does not produce the desired result anymore and the normal of the mirrored half now all point inwards. Removing the minus has no effect.

Indeed: with the new MSH4 format Physical groups are just groups, that don't change the numbering or orientation of elements anymore. 

Best solution: use "ReverseMesh Surface{-new_surfs()};" (or mesh::setReverse in the API) to explicitly request the mesh orientation to be reversed w.r.t the natural geometrical orientation of the geometrical entity.

(You can also still use the old MSH2 file format, which will behave as before for backward compatibility.)

Christophe


>  
> I’m using the 64 bit windows binary.
>  
> Any suggestions would be appreciated!
>  
> Best,
>     Daniel
>  
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

—
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science http://www.montefiore.ulg.ac.be/~geuzaine

Free software: http://gmsh.info | http://getdp.info | http://onelab.info



More information about the gmsh mailing list