MmgTools / mmg

open source software for bidimensional and tridimensional remeshing
http://www.mmgtools.org
Other
370 stars 118 forks source link

meshio #44

Open nschloe opened 5 years ago

nschloe commented 5 years ago

I find Mmg tremendously useful, especially its 3D mesh optimization feature. Perhaps it could be made even more useful if more than Gmsh and Medit files would be accepted. Wrapping your functions into something that uses meshio (a project of mine) might help.

Algiane commented 5 years ago

Hi Nico,

I totally agree about the need of more flexibility for the I/O (in fact I am currently adding the possibility to parse some of the vtk format).

Your project is very useful (I have successfully used it in the past to convert files) and it is a good idea to use your work to extend the Mmg's capabilities.

I have only few concerns:

Regards, Algiane

loumalouomega commented 5 years ago
* I don't have lot of time right now and I am not confortable with python so maybe I can get back to you in few months to see together how to do the wrapping?

Hi Algiane, right now I don't have the time. But as a personal project I am porting the Mmg API to python using pybind11 the same way we do in Kratos. This would help. I will inform you if I advance with my personal project.

Algiane commented 5 years ago

Hi Vicente,

Thank you for your help.

Regards, Algiane

bleyerj commented 4 years ago

Hi everyone, I also find MMG very useful as well as meshio. It would be great to be able to use seamlessly mmg for FEniCS for instance. FEniCS users often use Gmsh and meshio, however it seems that currently it is not so straightforward to pass a FEniCS function as a metric to a gmsh file. Support of other formats like XDMF or VTK would be great.

Algiane commented 4 years ago

Hi bleyerj,

I agree that it will be very useful to interface meshio and to have more I/O possibilities. I still keep in mind that I have to try to develop this interface but my time is running out.

The develop branch of Mmg allows VTK I/O (as we use the VTK APIs, VTK lmust be installed and we also need it to be built with MPI compatibility).

Regards, Algiane

ttsesm commented 2 years ago

Hi @Algiane, is there any update regarding this as well as using some python binding for mmg. You mentioned about the develop branch allowing VTK I/O, does this also have any python bindings?

I do not know if @loumalouomega had any progress with his personal project on creating some python bindings.

Thanks.

loumalouomega commented 2 years ago

@ttsesm unfortunately nothing significant

ttsesm commented 2 years ago

@ttsesm unfortunately nothing significant

I see, thanks for the prompt response. I guess, I would need to go with the subprocess calls.

ttsesm commented 2 years ago

Btw FYI, digging a bit more I discovered the pymedit package which seems to provide some kind of interface between python and mmg. I will try to give it a try to see how it works.

Algiane commented 2 years ago

Hi @ttsesm,

I didn't have time to work on meshio interfacing nor on python binding development (days, months and years are too short :sweat_smile: ). Our VTK I/O do not provide either python bindings. At some point I had tested very quickly pybind11 because it seems that such kind of binding can be automatically generated from our header files with a script (which makes maintenance easier). Annoying thing is that we have few C variadic functions...

Honestly, except if someone propose a PR, I think that I will not have the time to implement these two developments.

By the way, thanks for pointing out the promising pymedit work: I hope that it will help you!

Best Regards, Algiane

ttsesm commented 2 years ago

Hi @Algiane,

Thank you for the feedback.

I didn't have time to work on meshio interfacing nor on python binding development (days, months and years are too short sweat_smile ).

Yes, I feel you... :smile:

Our VTK I/O do not provide either python bindings. At some point I had tested very quickly pybind11 because it seems that such kind of binding can be automatically generated from our header files with a script (which makes maintenance easier). Annoying thing is that we have few C variadic functions...

Honestly, except if someone propose a PR, I think that I will not have the time to implement these two developments.

I see.

By the way, thanks for pointing out the promising pymedit work: I hope that it will help you!

Actually I've managed to have mmg commands called through the pymedit package and it seems to work quite nicely. The developer uses the operating system commands as a middle connection to the interface so it is not a direct python binding but for now I think are more than enough for what I want to test. In any case, kudos to the developer :+1: .

Now that I know how to call the mmg tools through my python scripts I think, I will open another issue with my actual problem that I want to solve. I hope @Algiane you could give me some hints there.