MED format native support in ParaView

From a user voice request.

MED format is the output format of CODE_Aster, a fairly popular open source simulation code.

Currently, the only way to visualize MED file within ParaView requires to use ParaVis, a ParaView-based application within Salome, which contains the MEDReader plugin. Once opened with ParaVis, the mesh can then be saved as a .vtm to be able to be opened in standard ParaView.

Adding native support to MED file format in ParaView would be nice

16 Likes

While being able to open MED file in ParaView would indeed be nice, the format is very complex and not very well documented, so developping a new reader would require a fair amount of work.

Another approach would be to integrate the MEDReader plugin into the official plugins of ParaView.
The problem with this approach is that this plugin depends on the libmed which itself currently requires a full salome installation to be built. One would need to be able to build libmed and the MEDReader plugin idependantly.

@mwestphal Such a reader exists in aeva: here. It requires HDF5 but nothing else AFAIK. There is also a writer.

1 Like

Wow, nice !

Any news or plans to implement the native support for MED? It would be great to see that!

please like the first message to show support

The MEDReader plugin has been integrated into ParaView binary release (Linux and Windows, all version) and is already available in the nightly:

https://www.paraview.org/download/?version=nightly

It will be available in ParaView 5.12

9 Likes

This is excellent news!

Do we know if things like element groups will transfer over to ParaView with the new reader?

The reader exposed in ParaView is the same one as the one in Salome ParaVis, so you will find the same features.

Can you please point towards a particular nightly version? I just tried the latest (03 Oct 23) and it’s not included (unless it needs turning on somehow).

Yes, you need to load the med reader plugin.

Ahhh, there it is. Thanks, that works :smiley: This is going to make such a difference to my team.

@mwestphal @cory.quammen Maybe we should move this reader from being a plugin to being one of the default ParaView readers?

@wascott I’m afraid this is not possible for a few reasons:

  1. This is not even a ParaView plugin, this is an external plugin that is being added in the packaging phase of ParaView

  2. Adding it in ParaView proper would mean bringing in all the dependencies as third parties, which we do not want

  3. The plugin itself is maintained by EDF in the SALOME/ParaVis project, so we would need to fork it, which we do not want

I understand the idea but the fact itself that we are able to bring it in the paraview binary is in itself a small miracle (that EDF funded, thanks a lot!)

1 Like

Could you please explain to a newbie where I get the MEDreader plugin? Or how to load it?

HI @ybilodid

  • Download and install ParaView 5.12.0-RC1 from https://www.paraview.org/download/
  • run ParaView
  • Tools → PluginManager → MedReader → Load Selected
  • File → Open → file.med → Apply
2 Likes

Thanks for your work on this. I am trying to build 5.12.0-RC1 and also have the MEDReader plugin available. Can you explain how you do this in your step 1? Do I need to pull it from an EDF repo and drop it in the plugin folder or something along those lines?

Why not using the binary release ? In any case, you need to use the https://gitlab.kitware.com/paraview/paraview-superbuild/ to build it yourself. It will download it from EDF for you.

Can you explain how you do this in your step 1?

My step 1 is about using the binary release.

Thanks for pointing me to the superbuild. I did eventually get it to work using the binary release. I am installing paraview in a docker image and using pvbatch to process some results. I had been trying the osmesa version. It would install but I would get something about “illegal instructions” when I ran it. That is when I turned to building. Eventually, I tried the egl version of the binary release and that installs and runs without issue.

1 Like