Commit d01f71c0 authored by Joachim Pouderoux's avatar Joachim Pouderoux Committed by Kitware Robot

Merge topic 'NewCatalystPanel'

a86605ce Document the new Catalyst Panel
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: David E. DeMarle's avatarDavid E. DeMarle <dave.demarle@kitware.com>
Acked-by: Joachim Pouderoux's avatarJoachim Pouderoux <joachim.pouderoux@kitware.com>
Merge-request: !77
parents 24bc0d80 a86605ce
Pipeline #121616 failed with stage
in 0 seconds
......@@ -61,8 +61,9 @@ user but inevitably the user will want more functionality or better control. Thi
useful for the simulation user to create their own Catalyst Python scripts' pipeline using the
ParaView GUI.
Note that the script generator used to be available through the CatalystScriptGenerator plugin
for versions of ParaView before 5.5, and is now natively embeded in ParaView.
Note that the old CatalystScriptGenerator plugin distributed with ParaView prior to version 5.5
does not exist anymore. The menus provided by this plugin are directly available in ParaView but
are now deprecated, instead use the Catalyst Panel (\menu{Catalyst > Define Export}).
There are two main prerequisites for creating Catalyst Python scripts in the ParaView GUI.
First, the version of ParaView used to generate the script should also correspond to the version
......@@ -74,88 +75,53 @@ grids as the simulation adaptor code will provide to Catalyst during simulation
geometry and the attribute ranges will be similar to what is provided by the simulation run's
configuration. The steps to create a Catalyst Python pipeline in the ParaView GUI are:
\begin{enumerate}
\item First load in a representative dataset and create a pipeline. In this case though, instead
of actually writing the desired output to a file we need to specify when and where the
files will be created when running the simulation. For data extracts we specify at this
point that information by choosing an appropriate writer under the \menu{Catalyst > Data Extract Writers} menu. The
user should specify a descriptive file name as well as a write frequency in the Properties
panel as shown in Figure~\ref{fig:pipeline}. The file name must contain a \%t in it as this gets
replaced by the time step when creating the file. Note that the step to specify screenshot
outputs for Catalyst is done later.
\begin{figure}[htb]
\begin{center}
\includegraphics[width=3in]{Images/pipeline.png}
\caption{Example of a pipeline with one writer included. It writes output from
the Slice filter. Since the writer is selected its file name and write frequency properties are also shown.}
\label{fig:pipeline}
\end{center}
\end{figure}
\item Once the full Catalyst pipeline has been created, the Python script must be exported
from ParaView. This is done by choosing the Export State wizard under the
Catalyst menu (\menu{Catalyst > Generate Script}). The user can click on the Next button in the initial window that
pops up.
\item After that, the user must select the sources (i.e. pipeline objects without any input
connections) that the adaptor will create and add them to the output. Note that typically this
does not include sources from the \menu{Sources} menu since the generated Python
\item First load in a representative dataset and create a pipeline.
\item Rename the sources (i.e. pipeline objects without any input connections)
to match the names of data descriptor contents that the adaptor will create. If a adaptor produces
a grid called "input1" change the name of the reader in the pipeline browser to be "input1".
Note that typically this does not include sources from the \menu{Sources} menu since the generated Python
script will instantiate those objects as needed (e.g. for seeds for a streamline).
In the case shown in Figure~\ref{fig:pipeline} the source is the
filename\_10.pvti reader that is analogous to the input that the
simulation code's adaptor will provide. The user can either double click on the desired
sources in the left box to add them to the right box or select the desired sources in the
left box and click Add. This is shown in Figure~\ref{fig:sourceselector} below. After all of the proper sources
have been selected, click on Next.
\item Once the full Catalyst pipeline has been created, it is time to configure the export.
This step aims to specify what data must be exported and images produced.
This is done through the Catalyst Export Inspector presented in
Figure~\ref{fig:catalystpanel}, available from \menu{Catalyst > Define Export}.
This panel contains three sections:
\begin{figure}[htb]
\begin{center}
\includegraphics[width=4in]{Images/sourceselector.png}
\caption{Selecting filename\_10.pvti as an input for the Catalyst pipeline.}
\label{fig:sourceselector}
\includegraphics[width=5in]{Images/DocumentedCatalystPanel.png}
\caption{The Catalyst panel can be toggled in \menu{View > Catatalyst Export Inspector}.}
\label{fig:catalystpanel}
\end{center}
\end{figure}
\item The next step is labeling the inputs. The most common case is a single input in which
case we use the convention that it should be named ``input'', the default value. For
situations where the adaptor can provide multiple sources (e.g. fluid-structure interaction
codes where a separate input exists for the fluid domain and the solid domain), the user
will need to label which input corresponds to which label. This is shown in Figure~\ref{fig:sourcelabelling}.
After this is done, click Next.
\begin{itemize}
\item \emph{Data extracts}. Select data to extract in the drop down list and select the writer to use.
Only one writer per data can be used.
The user should specify a descriptive file name as well as a write frequency in the configuration
dialog as shown in Figure~\ref{fig:savedataoptions}. The file name must contain a \%t in it as this gets
replaced by the time step when creating the file.
\begin{figure}[htb]
\begin{center}
\includegraphics[width=4in]{Images/sourcelabelling.png}
\caption{Providing identifier strings for Catalyst inputs.}
\label{fig:sourcelabelling}
\includegraphics[width=3in]{Images/SaveData.png}
\caption{Example of a writer options. It writes output from the Slice filter.}
\label{fig:savedataoptions}
\end{center}
\end{figure}
\item The next page in the wizard gives the user the option to allow Catalyst to check for a
Live Visualization connection, to output screenshots from different views and Cinema output.
\item \emph{Image extracts}. For each view, select the type of image extraction (screenshot or cinema database).
\item \emph{Global settings}. Mainly, you may enable Live Connections and choose a root directory where
all extracted files will be written by the simulation. Do not forget advanced options : it contains
refresh rate for the live visualization, number of timestep to skip before writing output, and more.
ParaView Live and Cinema are discussed in more detail in Sections~\ref{sec:paraviewlive} and \ref{sec:cinema},
respectively. For screenshots, there are a variety of
options. The first is a global option which will rescale the lookup table for pseudo-coloring
to the current data range for all views. The other options are per view and are:
\begin{itemize}
\item Image Type -- choice of image format to output the screenshot in.
\item File Name -- the name of the file to create. It must contain a \%t in it so that the
actual simulation time step value will replace it.
\item Write Frequency -- how often the screenshot should be created.
\item Magnification -- the user can create an image with a higher resolution than the
resolution shown in the current ParaView GUI view.
\item Fit to Screen -- specify whether to fit the data in the screenshot. This gives the
same results in Catalyst as clicking on the \icon{Images/fittoscreen.png}
%\includegraphics[scale=0.3]{Images/fittoscreen.png}
button in the ParaView GUI.
respectively.
\end{itemize}
If there are multiple views, the user should toggle through each one with the Next View
and Previous View buttons in the window. After everything has been set, click on the
Finish button to create the Python script.
\begin{figure}[htb]
\begin{center}
\includegraphics[width=4in,height=3.8in]{Images/imageoutput.png}
\caption{Setting the parameters for outputting screenshots.}
\label{fig:imageoutput}
\end{center}
\end{figure}
\item The final step is specifying the name of the generated Python script. Specify a directory
and a name to save the script at and click OK when finished.
\item The corresponding Python Script can now be generated. This is done by choosing the Export option
under the Catalyst menu (\menu{Catalyst > Export Catalyst Script}).
\end{enumerate}
Note that the content of the Catalyst panel is saved with the ParaView statefile, so you don't
have to reconfigure the whole script if you want to do a modification later.
\subsection{Creating a Representative Dataset}
A question that often arises is how to create a representative dataset. There are two ways to do
this. The first way is to run the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment