[Gmsh] python API save geo file

Juan Sanchez juan.e.sanchez at gmail.com
Thu Sep 26 18:05:20 CEST 2019


Hi Miro,

I do not know the current status of such a feature in pygmsh, or if it is
possible with their approach.

For such an application, I have written scripts to:
read the generated mesh script (mesh format 2)
find surface triangles between volumes
add the triangles and Physical names to a new mesh file

It is available here:
https://github.com/devsim/devsim_misc/tree/master/gmsh

Regards,

Juan

On Thu, Sep 26, 2019 at 10:26 AM Miroslav Kuchta <miroslav.kuchta at gmail.com>
wrote:

> Hi Juan,
>
> thanks for pointing out pygmsh. However, I'd like to do some computations
> in the process of defining the model, e.g. compute the labels of the
> boundary,
> and this functionality is missing in pygmsh as far as I can tell.
>
> Of course with the saved geo file I can extend the script with gmsh
> language.
> So that's a plan B :)
>
> Miro
>
>
> On Thu, Sep 26, 2019 at 5:06 PM Juan Sanchez <juan.e.sanchez at gmail.com>
> wrote:
>
>> Hello,
>>
>> This project offers a Python interface.
>>
>> https://github.com/nschloe/pygmsh
>>
>> It is able to dump a geo file that can be processed through Gmsh.  I have
>> successfully used it to handle more complex geometries processed through
>> Gmsh.
>>
>> Regards,
>>
>> Juan
>>
>> On Wed, Sep 25, 2019 at 3:20 PM Miroslav Kuchta <
>> miroslav.kuchta at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> is there a way to write as geo file the model constructed using python
>>> API?
>>>
>>> Thanks, Miro
>>> _______________________________________________
>>> gmsh mailing list
>>> gmsh at onelab.info
>>> http://onelab.info/mailman/listinfo/gmsh
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20190926/54362f8b/attachment.html>


More information about the gmsh mailing list