[Gmsh] Periodic surfaces not working for second-order elements in gmsh4

Koen Hillewaert (Cenaero) koen.hillewaert at cenaero.be
Mon Nov 26 16:54:14 CET 2018


Hi Christophe, Martien,

Sorry for picking up so late.

My opinion is that the old way of computing periodicities should in the 
long run disappear as it is based on too many hypotheses which may not 
be satisfied, in particular that the parametrisation of periodic 
counterparts is *exactly* the same, otherwise you will generate 
(potentially very small) holes in your mesh. In order to be on the safe 
side, you need the transformation to safely impose/compute periodic 
counterparts when generating the mesh; in many cases you will also need 
in the computational code that will use the mesh later on - this is why 
it is now provided as an additional information in the mesh. Computing 
the transformations when not specified is very heuristic and therefore 
error prone; providing an export that does not specify them adds 
complexity to the format.

Is the specification of the periodicity for the (main corresponding) 
entities such a big deal ? It was implemented such that it only needs to 
be specified for the highest dimensions (surfaces in 3D, lines in 2D) 
and that the periodicities for the lower order dependent entities are 
computed automatically to simplify the scripting.

Best,

Koen



On 11/26/18 9:54 AM, Hulsen, M.A. wrote:
> Compatibility between Gmsh 3 and 4 for version 4.0.6 is indeed much improved. Thanks!
>
> Martien Hulsen
>
>> On 25 Nov 2018, at 09:09, Christophe Geuzaine <cgeuzaine at uliege.be> wrote:
>>
>>
>>
>>> On 24 Nov 2018, at 16:56, Christophe Geuzaine <cgeuzaine at uliege.be> wrote:
>>>
>>>
>>>
>>>> On 23 Nov 2018, at 18:37, cgeuzaine at uliege.be wrote:
>>>>
>>>> Dear Martien,
>>>>
>>>> Indeed, the more advanced periodic meshing features introduced in Gmsh 4 currently require the transformation to be specified explicitly for high order meshes.
>>>>
>>>> @Koen - would it be possible to implement a fallback (that just assumes that the parametrizations are compatible, without checking) in your new algo, to restore Gmsh 3 compatibility for simple geometries?
>>> I have made the new optimization pass for high-order perdiodic meshes optional - using the same option that we already use for optimizing non-periodic high-order meshes. This should provide better backward compatibility with Gmsh 3.
>>>
>> There's now an independent option to control the correction of high-order periodic meshes (Mesh.HighOrderPeriodic). With this all our older test-cases behave the same by default with Gmsh 3 and Gmsh 4.
>>
>> Christophe
>>
>>
>>> Can you test the latest snapshot and let us know?
>>>
>>> Christophe
>>>
>>>
>>>> Christophe
>>>>
>>>>> On 23 Nov 2018, at 18:31, Hulsen, M.A. <M.A.Hulsen at tue.nl> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> The following geo file is not working correctly with gmsh -3 -order 2 (I am using 4.0.5) whereas it used to work in gmsh3.0.6.
>>>>>
>>>>> ox = 0.0;
>>>>> oy = 0.0;
>>>>> oz = 0.0;
>>>>> lx = 4.0;
>>>>> ly = 4.0;
>>>>> lz = 4.0;
>>>>> dx_box = 0.6;
>>>>> Point(1) = {ox,    oy,    oz,    dx_box};
>>>>> Point(2) = {ox+lx, oy,    oz,    dx_box};
>>>>> Point(3) = {ox+lx, oy,    oz+lz, dx_box};
>>>>> Point(4) = {ox,    oy,    oz+lz, dx_box};
>>>>> Point(5) = {ox,    oy+ly, oz,    dx_box};
>>>>> Point(6) = {ox+lx, oy+ly, oz,    dx_box};
>>>>> Point(7) = {ox+lx, oy+ly, oz+lz, dx_box};
>>>>> Point(8) = {ox,    oy+ly, oz+lz, dx_box};
>>>>> For i In {1:8}
>>>>> Physical Point(i) = i;
>>>>> EndFor
>>>>> Line(1) = {1, 2};
>>>>> Line(2) = {2, 3};
>>>>> Line(3) = {3, 4};
>>>>> Line(4) = {4, 1};
>>>>> Line(5) = {3, 7};
>>>>> Line(6) = {7, 6};
>>>>> Line(7) = {6, 2};
>>>>> Line(8) = {1, 5};
>>>>> Line(9) = {5, 8};
>>>>> Line(10) = {8, 4};
>>>>> Line(11) = {8, 7};
>>>>> Line(12) = {6, 5};
>>>>> Line Loop(1) = {1, 2, 3, 4};
>>>>> Line Loop(2) = {2, 5, 6, 7};
>>>>> Line Loop(3) = {12, 9, 11, 6};
>>>>> Line Loop(4) = {4, 8, 9, 10};
>>>>> Line Loop(5) = {3, -10, 11, -5};
>>>>> Line Loop(6) = {1, -7, 12, -8};
>>>>> For i In {1:6}
>>>>> Plane Surface(i) = {i};
>>>>> Physical Surface(i) = i;
>>>>> EndFor
>>>>> Periodic Surface 2{2,5,6,7} = 4{-4,-10,-9,-8};
>>>>> Periodic Surface 6{1,-7,12,-8} = 5{-3,5,-11,10};
>>>>> Periodic Surface 3{12,9,11,6}= 1{-1,-4,-3,-2};
>>>>> surf_loop[0] = newsl;
>>>>> Surface Loop(surf_loop[0]) = {1, 2, 3, 4, 5, 6};
>>>>> Volume(1) = {surf_loop[]} ;
>>>>> Physical Volume(1) = {1};
>>>>>
>>>>> Replacing the line loops with:
>>>>>
>>>>> Line Loop(1) = {-1,-4,-3,-2};
>>>>> Line Loop(2) = {2, 5, 6, 7};
>>>>> Line Loop(3) = {12, 9, 11, 6};
>>>>> Line Loop(4) = {-4,-10,-9,-8};
>>>>> Line Loop(5) = {-3,5,-11,10};
>>>>> Line Loop(6) = {1, -7, 12, -8};
>>>>>
>>>>> and the periodic surfaces with:
>>>>>
>>>>> Periodic Surface {2} = {4} Translate{lx,0,0};
>>>>> Periodic Surface {3} = {1} Translate{0,ly,0};
>>>>> Periodic Surface {5} = {6} Translate{0,0,lz};
>>>>>
>>>>> works both in gmsh3 and gmsh4. So I do have a workaround, but incompatibilities between 3 and 4 can lead to users avoiding the new version.
>>>>>
>>>>> Martien Hulsen
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>> 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
>>

-- 
Koen Hillewaert
Fluid Dynamics Technology Leader

https://www.researchgate.net/profile/Koen_Hillewaert

Cenaero
Your R&T partner in modeling and numerical simulation

Tel: + 32 (0)71  910 942
Fax: + 32 (0)71  910 931
Mob: + 32 (0)495 385 030
Skype: koen.hillewaert.cenaero

Cenaero
Rue des Frères Wright, 29
6041 Gosselies
Belgium

Visit our web site: www.cenaero.be

+-+-+- www.cenaero.be/disclaimer +-+-+-

Please consider the environment before printing this e-mail.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: koen_hillewaert.vcf
Type: text/x-vcard
Size: 381 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20181126/c590532c/attachment.vcf>


More information about the gmsh mailing list