CsatiZoltan / CristalX

Identification and analysis of polycrystalline microstructures
https://cristalx.readthedocs.io
GNU Lesser General Public License v3.0
6 stars 7 forks source link

Avoid MEDCoupling dependency using HDF5 #22

Closed CsatiZoltan closed 3 years ago

CsatiZoltan commented 4 years ago

A MED file (.med) is an HDF5 file in disguise. Processing a MED file to extract mesh information requires the MEDCoupling module. I couldn't compile a standalone MEDCoupling interface. What I currently do is

  1. Download Salome.
  2. Set up my IDE to use Salome's built-in Python interpreter.
  3. Use that interpreter when working with MED mesh processing.

Comments for the workflow above:

  1. This is not a problem because I anyway use Salome to repair the geometry and to export it to .med.
  2. It has its quirks, but I created a short script for it.
  3. This point is inconvenient. The reason is that when I use the Python interpreter of Salome
    • I cannot install packages that need compilation because Python links with the wrong dynamically linked libraries
    • even if I could install packages to Salome's Python, those packages can crash the original environment (happened to me)
    • I am restricted to the preinstalled versions of numpy and matplotlib

So the goal is to use load and process the .med file using h5py, which has very few dependencies. As a side effect, the user of my code does not need the several GB sized Salome so that they can handle the .med file. The structure of a .med file can easily be visualized with ViTables.

CsatiZoltan commented 3 years ago

Although the points above are perfectly valid, I close this issue for now. The reason is that I plan to use not only the MED module but also the GEOM and SMESH modules from Salome in the near future. The key is to help both end-users and developers to work with the modules that use Salome.