MPh-py / MPh

Pythonic scripting interface for Comsol Multiphysics
https://mph.readthedocs.io
MIT License
265 stars 67 forks source link

Cannot export mesh #134

Closed miyuan-beipiao closed 1 year ago

miyuan-beipiao commented 1 year ago

Hello! How can I export mesh in the geometric rather than export the mesh in the results? In the comsol, the mesh in geometric can be exported with the 'txt'-form file, however, in our code, the mesh in the results only can be exported with the 'mphbin'-form or 'mphtxt'-form file. If it is possilble, can we add the separate API about the export function in the geometric or global function?

john-hen commented 1 year ago

Hi. I understand this is a feature request. In principle, features can be added. Though I don't fully understand what you're asking for.

As to what's possible: We have "access to the full Comsol API". So if it can be scripted from Java, it can (with very few exceptions) also be scripted from Python (already). I'll add a separate, more convenient Python-like API if it's a commonly used feature, and if it's not too much trouble (in terms of lines of code) to integrate with the current MPh code base.