[Gmsh] question about python api
Frederic Dubois
frederic.dubois at umontpellier.fr
Mon Dec 2 16:08:42 CET 2019
Cool ! Thanks
----- Mail original -----
> De: "Christophe Geuzaine" <cgeuzaine at uliege.be>
> À: "Frederic Dubois" <frederic.dubois at umontpellier.fr>
> Cc: "gmsh" <gmsh at onelab.info>
> Envoyé: Lundi 2 Décembre 2019 16:00:25
> Objet: Re: [Gmsh] question about python api
>> On 29 Nov 2019, at 11:58, Frederic Dubois <frederic.dubois at umontpellier.fr>
>> wrote:
>>
>> Hi,
>>
>> You are right gmsh.fltk.run()is my problem ; I thought that once you close the
>> graphical interface it finishes the script ...
>
> This is now fixed in the latest snapshot: you can run, quit, relaunch the GUI,
> etc. from the same script.
>
> Much nicer... and intuitive indeed :-)
>
> Christophe
>
>
>
>>
>> Regards
>>
>> ----- Mail original -----
>>> De: "Christophe Geuzaine" <cgeuzaine at uliege.be>
>>> À: "Frederic Dubois" <frederic.dubois at umontpellier.fr>
>>> Cc: "gmsh" <gmsh at onelab.info>
>>> Envoyé: Vendredi 29 Novembre 2019 09:39:38
>>> Objet: Re: [Gmsh] question about python api
>>
>>>> On 29 Nov 2019, at 09:06, Frederic Dubois <frederic.dubois at umontpellier.fr>
>>>> wrote:
>>>>
>>>> Hi Christophe,
>>>>
>>>> In fact I did things in the "complicated" way to be able to recover the 2D
>>>> elements on the skin of the grains.
>>>>
>>>> Using fragments, these elements are not created or saved even if I create a 2D
>>>> physical group (here "itz".
>>>>
>>>
>>> Works fine here. (Maybe you left gmsh.fltk.run() in the script? Saving the mesh
>>> happens afterwards...)
>>>
>>> Christophe
>>>
>>>> Using the "complicated" way, how can I remove the duplicated nodes (like using
>>>> coherence in .geo file) ?
>>>> I tried to do this by fusing the two meshes but I am not confident in the
>>>> result.
>>>>
>>>> Regards
>>>>
>>>> ----- Mail original -----
>>>>> De: "Christophe Geuzaine" <cgeuzaine at uliege.be>
>>>>> À: "Frederic Dubois" <frederic.dubois at umontpellier.fr>
>>>>> Cc: "gmsh" <gmsh at onelab.info>
>>>>> Envoyé: Jeudi 28 Novembre 2019 23:12:28
>>>>> Objet: Re: [Gmsh] question about python api
>>>>
>>>>>> On 28 Nov 2019, at 22:42, Frederic Dubois <frederic.dubois at umontpellier.fr>
>>>>>> wrote:
>>>>>>
>>>>>> Hi Christophe,
>>>>>>
>>>>>> You are right, this is the best way.
>>>>>>
>>>>>> Can you comment this ?
>>>>>> f.remove(sphere1)
>>>>>> f.remove(sphere2)
>>>>>
>>>>> Fragment tries hard to keep intact the tags of those entities that have not been
>>>>> modified, here the two spheres. So I remove these two from the list of returned
>>>>> entities, which gives me the remaining (new) volume - the paste.
>>>>>
>>>>> Christophe
>>>>>
>>>>>
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> ----- Mail original -----
>>>>>>> De: "Christophe Geuzaine" <cgeuzaine at uliege.be>
>>>>>>> À: "Frederic Dubois" <frederic.dubois at umontpellier.fr>
>>>>>>> Cc: "gmsh" <gmsh at onelab.info>
>>>>>>> Envoyé: Jeudi 28 Novembre 2019 21:31:12
>>>>>>> Objet: Re: [Gmsh] question about python api
>>>>>>
>>>>>>>> On 28 Nov 2019, at 20:06, Frederic Dubois <frederic.dubois at umontpellier.fr>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Dear all,
>>>>>>>>
>>>>>>>> I am trying to mesh a composite material made of paste and grains.
>>>>>>>> Since I have to do some Boolean operation on a 3D volume of composite I tried to
>>>>>>>> use the occ factory.
>>>>>>>> At the end of the day I need a continuous mesh where paste elements of the mesh
>>>>>>>> belong to a paste physical group and grains elements belong to an other
>>>>>>>> physical group.
>>>>>>>>
>>>>>>>> In the attached script I first create a cylinder and two grains.
>>>>>>>> Using a cut I was able to obtain a mesh with all the elements belonging to the
>>>>>>>> paste.
>>>>>>>> Using a fuse I was able to obtain a mesh with all the elements belonging to the
>>>>>>>> grains.
>>>>>>>> Unfortunately, it seems that the two meshes are separated.
>>>>>>>>
>>>>>>>> I tried to fuse them to obtain a continuous mesh but I am not sure it works fine
>>>>>>>> and that it is the proper method.
>>>>>>>>
>>>>>>>> Any advice ?
>>>>>>>
>>>>>>> Simpler to use fragments:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Christophe
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>> --
>>>>>>>> Frédéric Dubois, PhD, Eng.
>>>>>>>> ---
>>>>>>>> Directeur adjoint du LMGC.
>>>>>>>> Laboratoire de Mécanique et Génie Civil - CNRS/UM
>>>>>>>> cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
>>>>>>>> http://www.lmgc.univ-montp2.fr/~dubois
>>>>>>>> Tel: 33/0 467144984
>>>>>>>> Mobile: 33/0 635490843
>>>>>>>> <composite.py>_______________________________________________
>>>>>>>> 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
>>>>>>
>>>>>> --
>>>>>> Frédéric Dubois, PhD, Eng.
>>>>>> ---
>>>>>> Directeur adjoint du LMGC.
>>>>>> Laboratoire de Mécanique et Génie Civil - CNRS/UM
>>>>>> cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
>>>>>> http://www.lmgc.univ-montp2.fr/~dubois
>>>>>> Tel: 33/0 467144984
>>>>>> Mobile: 33/0 635490843
>>>>>
>>>>> —
>>>>> Prof. Christophe Geuzaine
>>>>> University of Liege, Electrical Engineering and Computer Science
>>>>> http://www.montefiore.ulg.ac.be/~geuzaine
>>>>
>>>> --
>>>> Frédéric Dubois, PhD, Eng.
>>>> ---
>>>> Directeur adjoint du LMGC.
>>>> Laboratoire de Mécanique et Génie Civil - CNRS/UM
>>>> cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
>>>> http://www.lmgc.univ-montp2.fr/~dubois
>>>> Tel: 33/0 467144984
>>>> Mobile: 33/0 635490843
>>>> <composite.py><composite_simpler.py>
>>>
>>> —
>>> Prof. Christophe Geuzaine
>>> University of Liege, Electrical Engineering and Computer Science
>>> http://www.montefiore.ulg.ac.be/~geuzaine
>>
>> --
>> Frédéric Dubois, PhD, Eng.
>> ---
>> Directeur adjoint du LMGC.
>> Laboratoire de Mécanique et Génie Civil - CNRS/UM
>> cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
>> http://www.lmgc.univ-montp2.fr/~dubois
>> Tel: 33/0 467144984
>> Mobile: 33/0 635490843
>>
>> _______________________________________________
>> 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
--
Frédéric Dubois, PhD, Eng.
---
Directeur adjoint du LMGC.
Laboratoire de Mécanique et Génie Civil - CNRS/UM
cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
http://www.lmgc.univ-montp2.fr/~dubois
Tel: 33/0 467144984
Mobile: 33/0 635490843
More information about the gmsh
mailing list