Commit 18f4c178 authored by Andrew Bauer's avatar Andrew Bauer

More fixes for the Catalyst UG.

parent 860d97e2
......@@ -2,7 +2,7 @@
\subsection{vtkWeakPointer, vtkSmartPointer and vtkNew}\label{appendix:objectmanagement}
To simplify reference counting, vtkWeakPointer, vtkSmartPointer and vtkNew can be used.
vtkWeakPointer stores a pointer to an object but doesn't change the reference count. When the
object gets deleted vtkWeakPointer will get initialized to NULL avoiding any dangling
object gets deleted vtkWeakPointer will get reset to NULL avoiding any dangling
references. The latter two classes keep track of other vtkObjects by managing the object's
reference count. When these objects are created, they increment the reference count of the
object they are referring to and when they go out of scope, they decrement the reference count
......@@ -10,7 +10,7 @@ of the object they are referring to. The following example demonstrates this.
\begin{minted}{c++}
{
vtkNew<vtkDoubleArray> a; // a's ref count = 1
a->Setame("an array");
a->SetName("an array");
vtkSmartPointer<vtkPointData> pd =
vtkSmartPointer<vtkPointData>::New(); // pd's ref count = 1
pd->AddArray(a.GetPointer()); // a's ref count = 2
......@@ -30,8 +30,8 @@ GetPointer() method must be used. Other than this caveat, vtkSmartPointer and vt
can be treated as pointers.
\subsection{ParaView Catalyst Python Script for Outputting the Full Dataset}\label{appendix:gridwriterscript}
The following script will write out the full dataset every time step for the ``input'' grid provided by
the adaptor to Catalyst. Change ``input'' on line 7 to the appropriate identifier
The script below will write out the full dataset every time step for the ``input'' grid provided by
the adaptor to Catalyst. Change ``input'' on lines 7 and 40 to the appropriate identifier
for adaptors that provide multiple grids. Note that this file is available at \url{https://github.com/Kitware/ParaViewCatalystExampleCode/blob/master/SampleScripts/gridwriter.py}.
\begin{minted}{python}
......@@ -124,8 +124,8 @@ is:
Here, arrays is used to pass the pointers to the beginning of each component array. The size of arrays
sets the number of components in the vtkCPExodusIIResultsArrayTemplate object. The number of tuples
is set by numTuples. Finally, if save is set to false then the object will delete the arrays
using the delete [] method on each component array when it is done with the memory. Otherwise it
assumes that some other code will de-allocate that memory. The following code snippet demonstrates
using the delete [\,] method on each component array when it is done with the memory. Otherwise it
assumes that the memory will be de-allocated elsewhere. The following code snippet demonstrates
its use.
\begin{minted}{c++}
vtkCPExodusIIResultsArrayTemplate<double>* vtkarray =
......@@ -164,7 +164,7 @@ Scalar is the templated data type):
\end{itemize}
Since once the object is properly set up it should be considered a read-only class (i.e.
nothing in VTK should be modifying any of it's contents), the following methods
nothing in VTK should be modifying any of its contents), the following methods
should be implemented with only errors to ensure they aren't being used:
\begin{itemize}
\item int Allocate(vtkIdType sz, vtkIdType ext)
......@@ -197,7 +197,7 @@ should be implemented with only errors to ensure they aren't being used:
\end{itemize}
Using classes derived from vtkMappedDataArray along with any of the topologically
structured grids, the adaptor will use a negligible amount of memory in creating VTK data structures
structured grids, the adaptor will use a negligible amount of additional memory in creating VTK data structures
representing simulation grids and fields. For vtkPolyDatas and vtkUnstructuredGrids,
the memory to store the cells can still be substantial. VTK has recently added
the vtkMappedUnstructuredGrid class as a way to do this. Since vtkUnstructuredGrids can
......
......@@ -25,7 +25,7 @@ second step is automated and is done by invoking the following command from the
\begin{minted}{python}
python catalyze.py -i <edition_dir> -o <Catalyst_source_dir>
\end{minted}
Note that more editions can be added with the -i \textless edition\_dir\textgreater and that these are processed in
Note that more editions can be added with the -i \textless edition\_dir\textgreater \,and that these are processed in
the order they are given, first to last. For the minimal base edition included with ParaView, this
would be -i Editions/Base. The generated Catalyst source tree will be put in
\textless Catalyst\_source\_dir\textgreater. For configuring Catalyst from the desired build directory, do the
......@@ -64,7 +64,7 @@ example of this is shown below:
}
}
\end{minted}
Here, ParaView's CMake option of building shared libraries will be set to OFF for this edtion
Here, ParaView's CMake option of building shared libraries will be set to OFF for this edition
named Custom. It should be
noted that users can still change the build configuration from these settings but it should be
done after Catalyst is configured with the cmake.sh script.
......@@ -128,11 +128,11 @@ properly compile Catalyst. This can occur when the included source code derives
not already included in Catalyst or uses helper classes not already included in Catalyst. For the
vtkPVArrayCalculator class we will also need to include the vtkArrayCalculator class that it
derives from.
\subsection{Copying files from the edition into the Catalyst source tree}
\subsection{Copying Files From the Edition Into the Catalyst Source Tree}
Some of the files that need to be in the generated Catalyst source tree cannot be directly copied
over from the ParaView source tree. For example, CMakeLists.txt files need to be modified in
the Catalyst source tree when multiple editions need to added into a specialized CMakeLists.txt
file in the same directory. This is done with the “replace” keyword. An example of this is shown
the Catalyst source tree when multiple editions need to be added into a specialized CMakeLists.txt
file in the same directory. This is done with the {\ttfamily "}replace{\ttfamily "} keyword. An example of this is shown
below for the vtkFiltersCore module. Here, the vtkArrayCalculator source code is added to the
Catalyst source tree and so the CMakeLists.txt file in that directory needs to be modified in
order to include that class to be added to the build.
......
This diff is collapsed.
......@@ -18,7 +18,7 @@ Descriptionts of the examples are listed below.
assumes a vtkUnstructuredGrid.
\item[CFullExample2] \hfill \\
An example of a simulation code written in C. This improves
upon the CFullExample by explictly storing VTK data structures.
upon the CFullExample by explicitly storing VTK data structures.
This assumes a vtkUnstructuredGrid.
\item[CxxFullExample] \hfill \\
A \Cplusplus example of a simulation code interfacing with Catalyst.
......@@ -37,11 +37,11 @@ Descriptionts of the examples are listed below.
a single vtkImageData for each process.
\item[CxxNonOverlappingAMRExample] \hfill \\
A \Cplusplus example of a simulation code interfacing with
Catalyst. The grid is a vtkNonOverlappingAMR.h
Catalyst. The grid is a vtkNonOverlappingAMR
data set.
\item[CxxOverlappingAMRExample] \hfill \\
A \Cplusplus example of a simulation code interfacing with
Catalyst. The grid is a vtkOverlappingAMR.h
Catalyst. The grid is a vtkOverlappingAMR
data set.
\item[CxxPVSMPipelineExample] \hfill \\
An example where we manually create a Catalyst
......
ParaViewCatalyst/Images/pipeline.png

29.9 KB | W: | H:

ParaViewCatalyst/Images/pipeline.png

29.8 KB | W: | H:

ParaViewCatalyst/Images/pipeline.png
ParaViewCatalyst/Images/pipeline.png
ParaViewCatalyst/Images/pipeline.png
ParaViewCatalyst/Images/pipeline.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -223,7 +223,7 @@ The following are various links of interest related to Catalyst:
\begin{itemize}
\item \url{www.paraview.org} The main ParaView page with links to wikis, code, documentation,
etc.
\item \url{www.paraview.org/paraview/resources/software.php} The main ParaView download
\item \url{www.paraview.org/download} The main ParaView download
page. Useful for installing ParaView on local machines for creating Catalyst scripts and
viewing Catalyst output.
\item \url{www.paraview.org/in-situ} The main page for ParaView Catalyst.
......
......@@ -54,7 +54,7 @@ parameters should also include a file name to output to and an output frequency.
parameters can be presented for the user to set in their normal workflow for creating their
simulation inputs.
\section{Creating ParaView Catalyst Scripts in ParaView}
\section{Creating ParaView Catalyst Scripts in ParaView}\label{section:creatingscripts}
The downside to using pre-configured scripts is that they are only as useful as the simulation
developer makes them. These scripts can cover a large amount of use cases of interest to the
user but inevitably the user will want more functionality or better control. This is where it is
......@@ -62,8 +62,8 @@ useful for the simulation user to create their own Catalyst Python scripts pipel
ParaView GUI.
There are two main prerequisites for creating Catalyst Python scripts in the ParaView GUI. The
first is that ParaView is built with the Catalyst Script Generator plugin (previously called
the CoProcessing Script Generator plugin for versions of ParaView before 4.2) enabled. Note that this plugin is
first is that ParaView is built with the Catalyst Script Generator plugin enabled. This plugin was previously called
the CoProcessing Script Generator plugin for versions of ParaView before 4.2. Note that this plugin is
enabled by default when building ParaView from source as well as for versions of ParaView
installed from the available installers. Additionally, the version of ParaView used to generate the
script should also correspond to the version of ParaView Catalyst that the simulation code runs with. The
......@@ -171,9 +171,9 @@ The second way is by using the sources and filters in ParaView.
The easiest grids to create within the GUI are image data grids (i.e. uniform rectilinear grids),
polydata and unstructured grids. For those knowledgeable enough about VTK, the
programmable source can also be used to create all grid types. If a multi-block grid is needed,
the group datasets filter can be used to group together multiple datasets into a single output.
the Group Datasets filter can be used to group together multiple datasets into a single output.
The next step is to create the attribute information (i.e. point and/or cell data). This can be easily
done with the calculator filter as it can create data with one or three components, name the
done with the Calculator filter as it can create data with one or three components, name the
array to match the name of the array provided by the adaptor, and set an appropriate range of
values for the data. Once this is done, the user should save this out and then read the file back
in to have the reader act as the source for the pipeline.
......@@ -193,7 +193,7 @@ menu.
\section{ParaView Live}
In addition to being able to set up pipelines \textit{a priori}, through
ParaView's live capabilities the analyst can connect to the running simulation
ParaView Live's capabilities the analyst can connect to the running simulation
through the ParaView GUI in order to modify existing pipelines.
This is useful for modifying the existing pipelines to improve
the quality of information coming out of a Catalyst enabled simulation.
......@@ -219,7 +219,7 @@ server's pipeline (e.g. Extract: Contour0 in Figure~\ref{fig:catalystlivepipelin
Beginning in ParaView 4.2, the live functionality was improved to allow the simulation
to also pause the Catalyst enabled simulation run. This is useful for examining the simulation
state at a specific point in time. The design is based up debugging tools such that the
state at a specific point in time. The design is based on debugging tools such that the
simulation can be paused at the next available call to the Catalyst libraries, at a
specific time step or when the simulation time passes a specific value.
Additionally, a breakpoint that has not
......@@ -235,7 +235,7 @@ this are:
A demonstration of this functionality is at \url{www.kitware.com/blog/home/post/722}.
\section{Avoiding Data Explosion}
\section{Avoiding Data Explosion}\label{section:avoidingdataexplosion}
A key point to keep in mind when creating Catalyst pipelines is that the choice and order of
filters can make a dramatic difference in the performance of Catalyst (this is true with
ParaView as well). Often, the source of
......
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