Fork me on GitHub

Med Reader Plugin for ParaView

Using Code Aster the most suitable format for writing postprocessing data is the Med format. One may use then Gmsh or Salome to visualize the results. Both are pretty nice tools only Gmsh is somewhat limited in its postprocessing capabilities and Salome brings a huge overhead. Especially when considering that the postprocessing module of Salome (ParaVis) is a revamped version of ParaView. So why not use ParaView instead?

Unfortunately ParaView does not come with a build in Med Reader. But that is not really a problem as the Salome platform provides a suitable plugin. It may be found in the PARAVISsourcesVX.X.X.tar.gz file that comes with the full installation package of Salome. In the following example Salome version 6.3.1 with ParaView 3.10.1 and Med 3.0.3 is being used. For convenience the PARAVIS sources may be found in the Tools section.

The tar archive contains the directory PARAVIS_SRC_6.3.1/src/Plugins.

Here we'll need the MedReader to read the actual result file and we will also need the plugin IntegrationPoints. The latter one, the ELNO filter, is used to interpolate results from elements to nodes. Both directories include cmake files to build the libraries. But first a few prerequisites are need to be taken care of:

  1. CMake >= 2.8 must be available on the system.
  2. Make sure that the Med library provides shared libraries. If not, Med needs to be recompiled with shared libraries enabled.
  3. In order to build the ParaView plugins a build environment of ParaView (or alternatively VTK) needs to be present. This may be achieved by downloading ParaView an building it.
  4. The environment variable $ParaView_DIR must point to the before mentioned build directory of ParaView.
  5. The environment variables $MED2HOME and $HDF5_ROOT must point to their respective installation directory. In case of Code Aster they may be found in the public directory of the installation.

Now everything is ready for building the plugins. Just do:

     
cd MedReader
mkdir build && cd build
cmake ..
make
     
     

Bulding the ELNO filter in the IntegrationPoints directory may be done in exactly the same way. After that the following three libraries should be available:

  • MedReader/ParaViewPlugin/libMedReaderPlugin.so
  • MedReader/IO/libvtkMedReader.so
  • IntegrationPoints/libELNOFilter.so

The two plugin libraries libMedReaderPlugin.so and libELNOFilter.so should be copied to a plugin-directory. The environment variable $PV_PLUGIN_PATH must point to that before mentioned plugin-directory.

The libvtkMedReader.so should be copied to a lib-directory that is already a valid library path or alternatively that directory must be included in the $LD_LIBRARY_PATH environment variable.

ParaView may now be started. The two plugins should be found under Tools -> Manage Plugins. When opening a result file, Med is shown as a valid file format. That's it.

Have fun!

ogoe Mittwoch 14 Dezember 2011 at 6:36 pm | | Blog
Stichwörter: , , ,

Ein Kommentar

Daniel

can you give a more current solution to this?

I tried to compile PARAVIS but cmake hangs

Daniel , - 09-05-’16 14:44
(optionales Feld)
(optionales Feld)

Auf dieser Seite werden die Kommentare moderiert.
Das bedeutet, dass die Kommentare erst dann veröffentlicht werden, wenn sie freigeschaltet wurden.

Persönliche Informationen speichern?
Hinweis: Alle HTML-Tags außer <b> und <i> werden aus Deinem Kommentar entfernt. URLs oder Mailadressen werden automatisch umgewandelt.