LLNL-tutorial-VisIt-basics

Starting VisIt

The way you start VisIt depends on the platform you are on:

  • On Windows, double click on the VisIt desktop icon
  • On Mac, double click on the VisIt icon where you installed it (generally in the /Applications folder).
  • On Unix, invoke: /path/to/visit/bin/visit
    • Most people ultimately put /path/to/visit/bin in their $PATH and then just say "visit".


Working with files

There are two interfaces for working with files: The legacy interface, which is the default on LLNL systems, and the new interface. The advantage to the new interface is that it is streamlined and it leaves more room for the plot list and notepad. The new interface also allows you to specify file open properties when opening a file. We recommend using the new interface. You can switch to the new interface by toggling the Show selected files toggle in the Preferences window.

Changing the file selection interface

Llnl tutorial selected files preferences.png

  1. Bring up the Preferences window (Options->Preferences…) and toggle the Show selected files toggle button in the File panel properties.
  2. To make the change permanent, dismiss the Preferences window and save the settings (Options->Save Settings).


Using the new interface

Llnl tutorial selected files new.png

  1. Bring up the File open window (using the Open button) and open the file you want to work with.
  2. All the currently open files will show up in the Active source selection. To change the active source, just select it from the list.


Opening a file

Llnl tutorial file open.png

  1. Select the file from the Files list and press the Ok button to open a file. You can also double click on the file to open it as well.
  2. By default, VisIt tries to group files into a time series if a group of alphabetically sequential files match one of the naming conventions it recognizes. In rare instances you may want to turn this off. To do so, change the File grouping option to Off.
  3. VisIt tries to automatically determine the type of a file using file extensions and file naming conventions. If the file name doesn’t have the right extension you can manually specify the type of file. To do so, change the Open file as type option to the correct file type.
  4. Some file readers have options that specify optional properties about a file that VisIt can’t automatically determine. To specify those, first specify the file type using the Open file as type option and then press the Set default open options… button. The Set default open options… button will be greyed out if the file format doesn’t have any options.

Llnl tutorial plain text options.png

Making a plot

  1. Click on the Add button to access various plots. This is located about half way down in the Main window.
  2. Select Pseudocolor->hardyglobal to add a Pseudocolor plot.
  3. After adding a plot, you will see a green entry added to the plot list, which is located half way down the gui.
    • This means VisIt will draw this plot after you click Draw
  4. Click Draw.
  5. You should see a plot appear in the visualization window.
  6. Go to Add->Mesh->Mesh
  7. Llnl tutorial plot list.png

  8. Click Draw.
  9. You should now see both a Pseudocolor and plot mesh.
  10. Llnl tutorial pc mesh plot.png

  11. Highlight the Pseudocolor plot in the active plots list.
  12. Click the Hide/Show button.
    • (This will hide the Pseudocolor plot ... you should now see only the mesh plot.)
  13. Highlight the Mesh plot and click Delete.
    • You should now have an empty vis window.
  14. The Pseudocolor plot should now be selected.
  15. Click Hide/Show.
    • The Pseudocolor plot should reappear.


Modifying the Plot attributes

Each plot has a default set of values that are choosen to be appropriate in most situations. There are many situations where these settings may not be appropriate or could be improved upon. For example, for a Pseudocolor plot:

  • It might be useful to set the color bar scaling to a log scale if the data is logrithmic in nature or ranges over several orders of magnitude.
  • It might be useful to manually set the minimum and maximum values used to map data to color when looking at data from a time series and you want to have a specific color map to a fixed value as you change the time state. Another situation where it is useful to manually set the minimum and maximum is when you are comparing two data sets and they have slightly different data extrema.

Let's go through some examples of setting the Pseudocolor plot attributes.

Llnl tutorial pc atts.png

  1. Go to Plot Attributes->Pseudocolor.
    • This should bring up a window for modifying the plot.
  2. Change the scale from Linear to Log.
  3. Click Apply.
    • (The colors changed)
  4. Click Minimum on and change the minimum to 3.
  5. Click Maximum on and change the maximum to 4.
  6. Click Apply.
    • (The colors change again.)
  7. Change the Opacity mode to Constant.
    • Change the opacity slider to 50%.
  8. Click Apply.
    • (You can now see through the plot. Note that you only see the external faces. If you want to see the data from the whole volume, that will be with the volume plot.)
  9. Change back the scale, limits, and opacity back to their original settings and click Apply.
  10. Dismiss the Pseudocolor plots window.


Applying an operator

Llnl tutorial slice atts.png

  1. Go to Operators->Slicing->Slice.
    • Operators is located next to Plots.
  2. Click Draw.
  3. You are now looking at a 2D slice.
  4. Go to Operator Attributes->Slicing->Slice.
  5. There are many controls for setting the slice plane ... play with them.
  6. Operators can be removed by clicking on an expansion arrow in the plot list, then clicking on the red X icon next to an operator.


VisIt interaction modes

There are six basic interaction modes:

  1. Navigate Navigate mode.png
  2. Zoom Zoom mode.png
  3. Zone-pick Zone pick mode.png
  4. Node-pick Node pick mode.png
  5. Spreadsheet-pick Spreadsheet pick mode.png
  6. Lineout Lineout mode.png

You always start in Navigate. Navigate allows you to pan and rotate the data set.

  1. Put the cursor in the visualization window from the viewer.
  2. Left click (or single click if you do not have a 3 button mouse) and move the mouse.
  3. The data set will pan with the mouse.
    • In 3D, the data set rotates.

  1. The interaction mode is controlled by the toolbar, which is located at the top of the visualization window.
  2. The five interaction modes are all located together on the toolbar, towards the bottom.
    • Navigate is represented by a compass Navigate mode.png and should be indented.
  3. Click on the magnifying glass Zoom mode.png, which corresponds to zoom.
  4. Go to the visualization window and left click (single click) and HOLD IT DOWN.
  5. Move the mouse a bit.
    • You should see a rubber band.
  6. Lift up the mouse button.
    • You should now be zoomed in so that the viewport matches what was previously inside the rubber band.

  1. Find the icon of a camera that has a green "X" around it. (The camera is mostly obscured by the X) Reset view.PNG
  2. Click it.
    • This will reset your view.
  3. Click the icon next to the magnifying glass, which has red, blue, and black lines. Lineout mode.png
    • This is for lineout.
  4. Put the cursor over the data and left click (single click) and HOLD IT DOWN.
  5. Move the mouse a bit.
    • You should see a single line moving around.
  6. Lift up the mouse button.
  7. The window layout changes. You now have two windows. The first window is the same, but the second now contains a Lineout, which has temp as a function of distance over the line.
  8. On the window that has the curve, find the icon on the toolbar of the window with a red circle with a line through it. Delete window.PNG
  9. Click this button.
    • The new window should disappear.


Pick

You should only have one window now.

Llnl tutorial pick window.png

  1. Click on the icon that has a '+' with a small Z. Zone pick mode.png This is "zone-pick".
  2. Put the cursor over the data set and left click (single click).
  3. This will bring up a new window ... the Pick window.
    • The pick window contains information about the zone (i.e. cell or element) that you just picked in.
  4. The pick contains variable information, intersection location, zone ID, and IDs of incident nodes (i.e. point or vertex).

Pick can return a lot more information than it did if you use the Pick window.

  1. Go to the Variables drop down and select Scalars\hardyglobal.
  2. Turn on Physical Coords under For Nodes.
  3. Turn on Domain-Logical Coords under For Zones.
  4. Click Apply.
  5. Make another pick.
  6. You get info about hardyglobal, the coordinates of each node, and the logical coordinates for the zone.


Applying different operators to different plots

The default behavior is to apply the same operators and operator attributes to all the plots in the plot list. This makes it convenient to create a pseudocolor plot and mesh plot and slice both of them, as well as change the slice location for both of them at the same time. It doesn't allow you to create two plots that are sliced in different locations or to apply an operator to one plot and not another. This is where the Apply operators to all plots setting comes in.

  1. Delete all the existing plots and get rid of the pick window.
  2. Toggle the Apply operators to all plots setting.
  3. Create a Pseudocolor plot of hardyglobal.
  4. Add the Slice operator.
  5. Create a Pseudocolor plot of radial.
  6. Add the Slice operator.
  7. Add the Reflect operator (Operators->Transforms->Reflect).
  8. Expand both plots in the plot list.
  9. Llnl tutorial plot list2.png

  10. Double click on the Reflect operator in the plot list to bring up the Reflect attributes.
  11. Change the attributes to show the portion reflected about the minimum X boundary.
  12. Llnl tutorial reflect atts.png

  13. Click Draw.
  14. You should see the variable radial on the left and the variable hardyglobal on the right.
  15. Llnl tutorial reflect pc.png

  16. The same principle works for subset selections. You can apply different subset selections to different plots by toggling the Apply subset selections to all plots setting and setting different subset selections for the different plots.


Other plots

  1. We will experiment with the Contour, Filled Boundary, Label, Vector and Volume plots.


Other operators

  1. We will experiment with the Clip and Threshold operators.


Saving an image

  1. With a current plot, go to File->Save Window.
    • This saves an image to the filesystem.

On windows, the default location for saved images is in Documents\VisIt\My images.

Saving a database

VisIt can be part of a larger tool chain.

Llnl tutorial export window.png

  1. If you do not already have one, make a Pseudocolor plot of temp from the noise.silo database.
  2. Apply the Threshold operator and change the range to be 3->max.
  3. Click Draw.
  4. Go to File->Export Database.
  5. Change the file type to VTK.
  6. Be sure to set the output directory or the exported file will be written to the working directory (on Windows that would be the directory where VisIt is installed).
  7. Export.
    • A file named visit_ex_db.vtk has been saved to the file system.


Subsetting

Normally, all of the data in a data set will be displayed. Sometimes it is useful to display only a portion of your data. For example:

  • Simulations typically break down a model into parts or materials. In those situations you may want to display only specific parts or materials.
  • Simulations are typically run in parallel and they may partition the model into domains that are simulated on different processors. If you are interested in seeing how the data was partitioned onto processors, you may want to display the data on only a subset of the processors.

Selecting the portions of your data to display is accomplished with Subset selection.

Llnl tutorial subset window.png

Let's turn on and off some sets using the Subset selection window.

  1. Delete any plots in your window.
  2. Open the file multi_ucd3d.silo.
  3. Make a Subset plot of domains(mesh1).
    • The plot is colored by domains, which normally correspond to a simulation's processors.

    Llnl tutorial subset icon.png

  4. In the plots list, find the overlapping transparent black and white ovals (like a Venn diagram) and click on it.
  5. This will bring up the Subset window.
  6. Turn off some domains and click Apply.
    • You will see some of the domains disappear.
    • (Subsetting works with any plot type.)
  7. Turn all the domains back on.
  8. Turn off materials 1 and 3.
    • You will see material 2 only, colored by domain.

This mechanism is used to expose subsetting for materials, domains, AMR levels, and other custom subsettable parts.

Running in client / server mode

Running in client / server mode has the advantage that you can better leverage the graphics rendering capabilities of your desktop session. It may also get you around issues with displaying graphics back to a Mac or Windows system.

Llnl tutorial client server.png

  1. Select another host from the Host text box.
  2. You may be prompted for a password if you do not have password-less ssh set up between your desktop machine and the remote machine. If your user name is not the same between your desktop and the remote machine you will need to change your user name first.
  3. If you are logging in through a gateway node (such as any machine on the RZ) you will have to have password-less ssh set up between the gateway node and the remote machine your connecting to (such as between rzgw and rzmerl).
  4. If you have problems getting this to work you should contact a VisIt developer, since getting this to work can be quite complicated if things don’t work right away.
  5. Once you are logged onto the remote system, you can browser the remote file system do everything else like normal.


Running in an mxterm

Running in an mxterm allows you to grab a bunch of nodes for the entire day and if your compute engine crashes you can start your engine again without having to wait for a new batch submission.

  1. Start your mxterm term like you normally would do.
  2. mxterm 1 16 240 -q pbatch -A wbronze
    
  3. Once you mxterm is up and running start VisIt in the mxterm as you would normally do. This means that you will need to display back via X11 as opposed to running client/server.
  4. When it is time to select the launch options to use for launching your engine, select the parallel mxterm profile and set the number of processors to match what you used in the mxterm.

Llnl tutorial mxterm launch.png