Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meshio #44

Open
nschloe opened this issue Aug 5, 2019 · 11 comments
Open

meshio #44

nschloe opened this issue Aug 5, 2019 · 11 comments
Labels
kind: wish new feature or enhancement request part: I/O specific to I/Os

Comments

@nschloe
Copy link
Contributor

nschloe commented Aug 5, 2019

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
Copy link
Member

Algiane commented Aug 19, 2019

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:

  • it is not so easy to have a full compatibility between file format (I have seen some discussions about the Medit reference on your project for example). I think that we can add the possibility to use meshio in Mmg but it must remains optional and the user must be warn that it is an experimental feature. what do you think about that?
  • 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?

Regards,
Algiane

@loumalouomega
Copy link
Contributor

* 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
Copy link
Member

Algiane commented Aug 19, 2019

Hi Vicente,

Thank you for your help.

Regards,
Algiane

@Algiane Algiane added the kind: enhancement enhancement to an existing feature label Aug 19, 2019
@bleyerj
Copy link

bleyerj commented Jul 23, 2020

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
Copy link
Member

Algiane commented Jul 24, 2020

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
Copy link

ttsesm commented Mar 9, 2022

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
Copy link
Contributor

@ttsesm unfortunately nothing significant

@ttsesm
Copy link

ttsesm commented Mar 9, 2022

@ttsesm unfortunately nothing significant

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

@ttsesm
Copy link

ttsesm commented Mar 9, 2022

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
Copy link
Member

Algiane commented Mar 9, 2022

Hi @ttsesm,

I didn't have time to work on meshio interfacing nor on python binding development (days, months and years are too short 😅 ). 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
Copy link

ttsesm commented Mar 10, 2022

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... 😄

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 👍 .

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.

@Algiane Algiane added kind: wish new feature or enhancement request part: I/O specific to I/Os and removed kind: enhancement enhancement to an existing feature labels May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: wish new feature or enhancement request part: I/O specific to I/Os
Projects
None yet
Development

No branches or pull requests

5 participants