Pvblot Design

From ParaQ Wiki
Jump to navigationJump to search

BLOT is a visualization application designed years ago at Sandia. For what it is worth, BLOT provides a useful functionality that has kept it alive despite competition from more modern and larger visualization development efforts like EnSight and ParaView. BLOT's simplistic interpreter and language makes it easy to very quickly and repeatably build visualizations. Furthermore, the operations in BLOT are designed to do exactly what our analysts need from a visualization package.

Our customers are asking for the ability of ParaView to accept BLOT or BLOT-like scripts and commands to control the visualization in ParaView. This functionality serves the following purposes:

  • We drop the learning curve by providing a "simplified" interface (BLOT commands) that do targeted things. This will be especially effective for those already familiar with BLOT.
  • We speed up the time to build the most common visualizations, which take only a few BLOT commands but can otherwise take many operations in the ParaView GUI.
  • We can leverage this simplified scripting in the in-situ/co-processing work at Sandia. This should both simplify the use of the co-processing tools and facilitate our acceptance in the analysis community.

What Is BLOT?

BLOT is a very simple scripting language. Every command is placed on its own line, and the command is of the form "command-name arguments". There are no math expressions, conditionals, or flow control structures. Furthermore, the command-name does not have to be complete. You only need to enter enough characters for the command to be unique. This makes it much easier to type commands and users will expect it.

BLOT is actually a mash up of 3 different programs: DETOUR, TPLOT, and SPLOT. DETOUR is a program that plots meshes. TPLOT produces X-Y plots of a global (field), nodal (point), or element (cell) variable over time. SPLOT produces X-Y plots of nodal (point) or element (cell) variables over space. In BLOT, you enter one of these "subprograms" by issuing the commands detour, tplot, and splot respectively. When you enter one of these subprograms, the prompt will change to reflect that subprogram.

You should consult the BLOT documentation for details, but, to be honest, the organization is poor and it is a difficult read. You can get BLOT by downloading the SEACAS suite of tools, of which BLOT is a part.

The following example DETOUR program makes element blocks 1, 2, and 3 visible, rotates the mesh around some, and renders it (via the plot command).

BLOT> detour
DETOUR> visible 1 2
DETOUR> visible add 3
DETOUR> rotate x 30 y 30
DETOUR> plot

This example TPLOT program plots the global variable KE vs. time.

BLOT> tplot
TPLOT> KE
TPLOT> plot

This example SPLOT program plots the displ_x nodal (point) field for nodes 1, 5, 10,..., 100.

BLOT> splot
SPLOT> displ_x
SPLOT> plot

pvblot Requirements

pvblot should be a plugin to ParaView. When running in the GUI, it provides a menu and/or toolbar item to open a dialog box that allows the user to enter BLOT commands. The dialog should also provide a means of loading a BLOT script from a file. The visualizations that pvblot builds should be shown in the traditional ParaView GUI. The user is free to make further modifications directly through the ParaView GUI, but such modifications may break further operations in pvblot or pvblot may override the user's changes. That is, these changes make pvblot's operations undefined.

pvblot should also work in a pure scripting mode. You should be able to launch a pvblot executable on the command line and get a prompt that accepts BLOT (-like) commands. Visualization results will appear in their own window. It is OK if you cannot interact with this window.

pvblot should also be designed with in-situ in mind. It should be possible to use pvblot from within a simulation using the ParaView co-processing unit.

Like the original BLOT, pvblot should work on Exodus files. Users have also requested that pvblot work on spyplot files. In the case of spyplot files, materials would be treated as blocks and fragments would be treated as surfaces.

We are not expecting to completely and identically emulate the original BLOT script. pvblot will instead implement a subset of operations that users have identified as needing. We can also take some liberties with our implementation where changes make sense. For example, in the current implementation I have made the plot (drawing) command optional. Instead, the display is updated after every command. Since rendering is now such a quick part of visualization, there is little point making users type "pl" every time they want to see changes. (Of course, the plot command is still implemented as users are used to typing it a lot.) For another example, the zoom command does not need a "cursor" (user interaction) command. The ParaView GUI provides a fine interface for directly interacting with the data and implementing the cursor functionality from the zoom command is overly complicated.

The following is a list of commands that have been identified as needed. Note that this list is not complete; there will probably be commands added and there will be others that just make sense to implement.

  • DETOUR
    plot
    Do a render.
    rotate
    Spin the mesh around.
    visible
    Set which element blocks (blocks in VTK-speak) to render.
    zoom
    Adjust the camera in or out. Also pans.
    solid, wireframe
    Show the surface in solid or wireframe, respectively.
    mlines
    In solid mode, show/hide the lines of the mesh.
    vector
    Show arrow glyphs for a vector.
    vscale
    Set the scale of the glyphs.
    paint
    Render the surface with a field variable mapped to color contours.
    crange
    Sets the contour range between a set of values.
    cgl
    Sets the contour range to be the min/max.
    nsets
    Colors the nodes in a nodeset
    ssets
    Colors the edges of faces in a sideset
    select element/node
    selects elements (cells) or nodes (points) (which will be used for subsequent commands).
    list
    Provides information. There are many "subcommands" to this, not all of which need to be implemented. A partial list is connectivity, coordinates, names, times, and qa.
    tmin, tmax, nintv, alltimes, times
    Select the time range to use (mostly for stepping/animating).
  • TPLOT
    plot
    Do a render.
    variable
    A global (field), nodal (point), or element (cell) variable to plot.
    overlay
    control flag that has multiple series shown together or sequentially.
    xscale, yscale
    set the scale for the abscissa or ordinate.
    grid
    Add horizontal and vertical lines. (I'm thinking we can skip this one. The current plots draw the lines subtly enough that they provide the benefit without the distraction.
    xyplot
    Create an xyplot (basically a scatterplot taken of data over time).
  • SPLOT
    plot
    Do a render.
    variable
    A nodal (point) or element (cell) variable to plot.
    nodes, elements
    Sets a path of nodes or elements to follow.
    overtime
    Overlay plots for all time steps on a single plot.

Acknowledgments

Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear Security Administration under Contract DE-AC04-94AL85000.

SAND2009-5448P