ParaView Catalyst is a library that adds ParaView analysis and visualization capabilities to a simulation program. For each time step, the simulation code generates data which is passed (using Catalyst's API) to a ParaView pipeline. This pipeline generates images or processed data that can be saved to disk.
Furthermore, data can be exchanged with a remote ParaView server enabling easy inspection of simulation status and modification of analysis and visualization parameters. We call this connection ParaView Catalyst Live.
The goal of this post is to enable you to try out Catalyst Live and introduce its main features. First, we invite you to watch a video which introduces the example presented next.
To be able to run the example presented, you need to download a repository version of ParaView, configure it with PARAVIEW_ENABLE_CATALYST and PARAVIEW_ENABLE_PYTHON and compile it (see the ParaView Build and Install Wiki for more information). Optionally, you can also enable PARAVIEW_USE_MPI if you want to run coprocessing or ParaView in parallel.
You also need two scripts:
coprocessing-pipeline.py which are attached to this blog post.
driver.py plays the role of a simulation process which generates at each time step a wavelet with a different parameters (see ParaView's Sources/Wavelet menu).
coprocessing-pipeline.py processes this data by running a contour filter, saving both the wavelet and the contour as data files, saving an image showing the contour and enabling Catalyst Live communication. This second script was generated using the Catalyst Script Generator Plugin (for ParaView 4.1 and earlier it was called the CoProcessing Script Generator Plugin).
With these, you are ready to try out Catalyst Live. Note that all commands shown are relative to ParaView's build directory. First download the two scripts in a directory (assume it is called Catalyst-test) and start the driver and the coprocessing pipeline:
Here we run the driver for 1,000 time steps and we pass the coprocessing pipeline script as a parameter. Then, start ParaView and connect to Catallyst using Catalyst > Connect menu. The Pipeline Browser displays two servers, the builtin server and the catalyst server. Note that next to the catalyst server there is a 'play' icon showing that the simulation is running.
The two grayed out icons next to PVTrivialProducer0 and Contour0 allow you to extract data from Catalyst, transfer it, and visualize it on Catalyst Live. Care must be exercised when clicking on the extract icons as data you request to be transfered may be very big (for real simulations). When you click on the extract icon next the the Contour0 data is added as a source to the builtin server. This data can be visualized by clicking on the eye icon next to it.
A user can do the following operations:
- Modify any visualization pipeline or writer parameters. Note that pipeline elements cannot be added or removed in the current version and we provide only generic writer parameters such as file name and writing frequency.
- Pause a simulation using Catalyst > Pause Simulation and continue it using Catalyst > Continue. If a simulation is paused, a 'pause' icon will be displayed next to the catalyst server.
- Pause the simulation at a certain time step in the future using Catalyst > Set Breakpoint or remove a previously set breakpoint using Catalyst > Remove Breakpoint. If a breakpoint is set, a red circle is displayed next to the catalyst server.
While a simulation is paused, the user can fully interact with simulation data by changing visualization pipeline parameters.
If you compiled ParaView with PARAVIEW_USE_MPI you can run both Catalyst and Paraview in parallel:
runs the driver and the coprocessing pipeline on 5 processors
runs ParaView server on 2 processors
runs the ParaView client and connects it to the ParaView server you just started. Everything else behaves the same as in the serial run.
With this, we end our introduction to ParaView Catalyst Live and invite you to try it out. It is part of the ParaView 4.2 release.
For Paraview 4.3 use coprocessing-pipeline-4.3.py script instead: