[Gmsh] API define periodic line

2018-04-25 Thread Artur Palha
Dear All, I am trying to use gmsh's API. I can successfully use it to setup my geometry and generate the mesh. The only issue I am having is that I cannot find the function (both in Python and C++) to define Periodic Lines (or Periodic Surfaces). Does anyone know this? Thank you. -artur palha __

Re: [Gmsh] API define periodic line

2018-04-25 Thread Benedikt Oswald
Dear Artur, what you can do is something along these lines: // constrain the boundary surfaces to conformal discretization // x Periodic Surface {2} = {1} Translate {400,0,0};        // ex // y Periodic Surface {4} = {3} Translate {0,300,0};        // ey // z - floor and roof Periodic Surface {

Re: [Gmsh] API define periodic line

2018-04-25 Thread Artur Palha
Dear Benedikt, Thank you for your reply. Unfortunately I am unable to understand exactly what you mean by that. Roughly I think that you define the periodic surface 2 (for example) to be the translation along [400,0,0] of the surface 1. Still you make use of the Periodic Surface call. My problem i

Re: [Gmsh] API define periodic line

2018-04-25 Thread Christophe Geuzaine
Hi Arthur, Indeed it's currently missing from the API - we'll add it soon. Christophe > On 25 Apr 2018, at 13:12, Artur Palha wrote: > > Dear Benedikt, > > Thank you for your reply. Unfortunately I am unable to understand exactly > what you mean by that. Roughly I think that you define the

Re: [Gmsh] API define periodic line

2018-04-26 Thread Christophe Geuzaine
Hi Artur - it's now in the API: give it a try. PS: we have started to generate binary SDKs that contain the shared Gmsh library and the C++/C headers and Python module (see the *-sdk* files in gmsh.info/bin/). The SDK is built using the same compilers as the official builds, with the same opti

Re: [Gmsh] API define periodic line

2018-04-26 Thread Artur Palha
Christophe, It works like a charm! Thank you very much for the extremely quick addition. One thing, I need to add a gmsh.model.geo.synchronize() begore the periodic line right? Otherwise the entities are not available (just to be sure I am not missing anything). Once again thank you! P.S.: I tri

Re: [Gmsh] API define periodic line

2018-05-02 Thread Artur Palha
Dear Christophe, I have one more question. After adding the periodic lines how can I have access to the periodicity information (master/slave) for the nodes of the mesh? Similar to what is found between $Periodic and $EndPeriodic in the msh file. Once again thank you. -artur palha On Thu, Apr 2

Re: [Gmsh] API define periodic line

2018-05-03 Thread Artur Palha
Dear Christophe, I think I found out how to get that information. If I get the nodes associated to the master and slave line entities I get the master and slave nodes. They are given in the same order (up to a order reversal given by the Affine transformation). -artur palha On Wed, May 2, 2018 a