Paraview plugin

When we would like to display geometries from G+Smo .xml files, we must first convert the xml file to a Paraview file (.vts, .pvd, …), typically with gsView, and then open this file inside Paraview. The G+Smo Paraview plugin allows to open G+Smo .xml files inside Paraview program.

This wiki page describes how to set up and use the plugin.

Set up

The compilation requires three steps: building Paraview from source, building G+Smo paraview plugin and enabling the plugin inside Paraview.

Building Paraview from source

  • Downloading Paraview source. Go to the webpage http://www.paraview.org/download/ and for the Type of Download choose Paraview Source Files. Then download the source files to your computer.
  • Build Paraview. Unpack the source files to some directory. Make the build directory and build the Paraview with cmake and make commands.

Build G+Smo paraview plugin

  • Set the following G+Smo cmake options:
    • GISMO_BUILD_PVIEW to ON,
    • Paraview_DIR to Paraview build directory from previuos step.
  • Then make GiSmoPlugin.

It is recommended to build G+Smo in release mode, to get the fastest performance of the plugin. But it is not required.

Enabling the plugin inside Paraview

  • Go to Tools -> Manage Plugins.
    https://ricamsvn.ricam.oeaw.ac.at/trac/gismo/raw-attachment/wiki/public/Gallery/paraview_manage_plugins.png
    In Plugin Manager click Load New.
    https://ricamsvn.ricam.oeaw.ac.at/trac/gismo/raw-attachment/wiki/public/Gallery/paraview_load_new_plugin.png
    Go to the Paraview build directory, enter the lib subdirectory and select libGiSmoPlugin.so.
  • [Optional but recommended] If you want that the plugin is auto loaded every time when you start Paraview, then you check the Auto Load box of G+Smo Plugin inside Plugin Manager.
    https://ricamsvn.ricam.oeaw.ac.at/trac/gismo/raw-attachment/wiki/public/Gallery/paraview_auto_load.png

Congratulations, you set up the G+Smo plugin inside Paraview.

Using Paraview Plugin

The Paraview plugin can display multipatch geometries of

  • Curves (don't forget to change the layout to Outline)
    https://ricamsvn.ricam.oeaw.ac.at/trac/gismo/raw-attachment/wiki/public/Gallery/paraview_curve.png
  • Surfaces
    https://ricamsvn.ricam.oeaw.ac.at/trac/gismo/raw-attachment/wiki/public/Gallery/paraview_geometry.png
  • Volumes (change the layout to Surface
    https://ricamsvn.ricam.oeaw.ac.at/trac/gismo/raw-attachment/wiki/public/Gallery/paraview_volume.png

We can specify the Resolution in Properties tab. There is also an option to plot the control net of given geometry.

https://ricamsvn.ricam.oeaw.ac.at/trac/gismo/raw-attachment/wiki/public/Gallery/paraview_control_net.png

Finally, we can choose between three ways of Plot style:Geometry, Mesh and Geometry and Mesh.
https://ricamsvn.ricam.oeaw.ac.at/trac/gismo/raw-attachment/wiki/public/Gallery/paraview_geometry.png https://ricamsvn.ricam.oeaw.ac.at/trac/gismo/raw-attachment/wiki/public/Gallery/paraview_mesh.png https://ricamsvn.ricam.oeaw.ac.at/trac/gismo/raw-attachment/wiki/public/Gallery/paraview_geom_and_mesh.png

Note to developers

The code is inside devel/plugins/gsParaview. The most important is the vtkGismoReader.cxx file. The member function responsible for displaying is vtkGismoReader::RequestData. Paraview can use normals to display "smooth" surfaces. This approach is used for surfaces. TO DO:

  • implement gsGeometry::outerNormal_into member function and use normals to display "smooth" volumes,
  • implement reader for gsBasis class,
Last modified 2 years ago Last modified on 2015-10-08T21:17:34+01:00