In this tutorial, you will learn how to: select files, generate different kinds of plots, modify plot properties, save an image, and print an image on a color printer.
One of the first things you must do after starting MeshTV is select the files you want work with. By default the files you can work with are all the files in the directory you were in when you started MeshTV that match the filter "*". To change the selected file list, you must bring up the File selection window.
· Start MeshTV by typing meshtv at the prompt.
· Select "Select file" from the File pulldown menu on the MeshTV Main window.
The File selection window is used to define the list of files you want to use. Once the Selected files list contains the files you want to work with, press the OK button to transfer the contents of the Selected files list in the File selection window to the Selected files list on the MeshTV Main window.
To add entries to the Selected files list:
· Highlight the entries to be added from the Files list. The Select button will become active.
· Press the Select button. The highlighted entries will be added to the Selected files list.
To delete entries from the Selected files list:
· Highlight the entries to be deleted from the Selected files list. The Remove button will become active.
· Press the Remove button. The highlighted entries will be deleted from the Selected files list.
If your SILO files have directories within them, you may open the directories from within the File selection window.
· Highlight all the entries in the Selected files list that contain directories.
· Press the Check for directories within file button. An entry will appear for each directory within the file.
The Files list contains all the files in the directory specified in the Path text field that match the filter specified in the Filter text field. The Path text field contains the current location within your directory structure. To change the Path text field:
· Edit the Path text field and press the <Return> key.
· Double click on an entry in the Directories list. The Path text field will be concatenated with the double clicked entry to form a new Path text field.
The Filter text field recognizes the wildcard characters * and ?. The * character matches zero or more characters. The ? character matches exactly one character. To change the Filter text field:
· Edit the Filter text field and press the <Return> key.
Changing the Path or Filter text fields will cause the Directories and Files lists to be updated.
· Position yourself in the MeshTV's data directory. For most people, this directory will be /usr/local/meshtv/data . Others might need to check /usr/local/apps/meshtv/data . If neither of those locations exists, go to a shell window and type which meshtv , which should return a path. That path might look like /usr/local/meshtv/bin/meshtv , but in any event, the last part of the path will be /bin/meshtv . If you take the full path and replace /bin/meshtv with /data , you have MeshTV's data directory. In the example given above, that would be /usr/local/meshtv/data .
· Highlight all the entries in the Files list. The Selec t button will now become active.
· Press the Select button to transfer the highlighted files from the Files list to the Selected files list.
· Highlight the entry ucd3d.silo in the Selected files list. The Remove button and Check for directories within file button will now become active.
· Press the Remove button to delete the ucd3d.silo entry from the Selected files list.
You can change the selected files at any time while you are using MeshTV.
A file can be opened in either of the two following manners:
· Double click on the desired file in the Selected files list on the MeshTV Main window.
· Highlight the desired file in the Selected files list on the MeshTV Main window.
· Press the Open button next to the Selected files list on the MeshTV Main window.
When a file is highlighted in the Selected files list, the Open and Replace buttons next to the list become active. This indicates that one of the two buttons should be pressed. As was previously mentioned, if the Open button is pressed the file will be opened. If the Replace button is pressed, then in addition to opening the file, all the plots in the Active plots list will have the file associated with them changed so they are associated with the newly opened file. The association with the original file is lost. Once either of the buttons is pressed, they will both become inactive.
· Double click on the entry rect2d.silo in the Selected files list.
The Output window contains all the messages generated by MeshTV. The types of messages that are sent include information about opened files, error messages, pick and query information, and information about images saved and printed. When a new message is added to the Output window a red border will appear around the output indicator. The border will remain until you display the Output window. To bring up the Output window press on the output indicator on the MeshTV Main window.
· Press on the output indicator on the MeshTV Main window. The Output window should contain the copyright message and some information about the file you opened.
· Press the Dismiss button. The red border on the output indicator will have disappeared.
All error messages will be displayed in the Error message window that automatically pops up when an error occurs. You can either dismiss the window via the Dismiss button, or leave it up for future reference. All errors are also logged to the Output window. If an action results in more than one error, only the first one will be displayed along with a count of the remaining errors. If you wish to see the remaining errors, you will need to look in the Output window.
· Press the Delete button on the MeshTV Main window. The Error message window will be brought up.
· Bring up the Output window. You should see the error message from the Error message window at the bottom of the output.
To select plots to be plotted in the vis window, use the Plots pulldown menu in the MeshTV Main window. Pulling right from an entry in the Plots pulldown menu will bring up a list of all the variables in the current file appropriate for the given plot type.
· Select "quadmesh2d" from the pullright menu from the "Mesh" entry from the Plots pulldown menu.
· Select "d" from the pullright menu from the "Pseudocolor" entry from the Plots pulldown menu.
As you make selections from the Plots pulldown menu you will see corresponding entries appear in the Active plots scrolling list. Each entry in the Active plots consists of a file number, a plot type, and a plot variable.
Even though you have selected plots to draw, nothing appears in the vis window. To make plots appear, you must tell MeshTV that you want them drawn.
· Press the Draw button, which is located above the Active plots list.
The next thing you will do is add a material boundary plot on top of the current plots.
· Select "mat1" from the pullright menu from the "Boundary" entry from the Plots pulldown menu.
You will now hide the material boundary and then bring it back.
· First highlight the boundary plot from the Active plots list.
· Unhide the hidden boundary plot by selecting it in the Active plots list and pressing the Hide/Show button again.
Finally, you will delete the mesh plot.
· Highlight the mesh plot from the Active plots list.
· Press the Delete button above the list.
When you delete a plot, hide a plot, or unhide a plot, the effect on the vis window is immediate (unlike adding a plot).
Up to this point, whenever you added a plot it was overlaid on top of any existing plots in the vis window. This was because Replace plots was turned off. When Replace plots is turned on, the currently active plots are replaced with the newly selected plot.
· Click on the box beside Replace plots . The box becomes "pushed in" and highlighted, indicating the Replace mode is on.
· Select "d" from the pullright menu from the "Pseudocolor" entry from the Plots pulldown menu. Notice that the boundary and pseudocolor plots were replaced with the new pseudocolor plot.
· Press the Draw button to make it visible.
This mode is useful if you want to look at one plot at a time and are frequently switching between plots. Let's put things back the way they were.
· Click on the box beside Replace plots . The box becomes "pushed out," indicating the Replace mode is turned off and plots will overlay each other.
· Select "mat1" from the pullright menu from the "Boundary" entry from the Plots pullright menu.
Every plot in MeshTV has a variable associated with it. The variable used by a plot or group of plots is changed by highlighting one or more plots from the Active plots list and selecting a new variable from the Variable pulldown menu on the MeshTV Main window.
· Highlight the pseudocolor plot from the Active plots list.
In this section, we will change the smoothing for the pseudocolor plot. Smoothing is based on the "centering" of the variable being plotted. Basically, a variable can be either "node-centered" (the data reside at the nodes), or "zone-centered" (the data reside at the zones.) In this section we will change the setting for the centering of the variable.
To change the attributes of the pseudocolor plot, you must bring up the Pseudocolor plot attributes window.
· Select "Pseudocolor" from the Plot attributes pulldown menu.
The Pseudocolor plot attributes window contains the Centering toggle buttons, a Limits on/off button, and two text fields for setting the minimum and maximum limits. There is also a Log on/off button that allows you to plot the scale in log and a Legend on/off button that specifies if you want to display a legend for this plot.
The default for Centering is Natural . Natural uses whatever centering the variable naturally has. If the variable is node-centered, the data are plotted at the nodes, and colors are interpolated between them, giving a smoothly-shaded plot. If the variable is zone-centered, one color is plotted for each zone, producing a "blocky" plot. If you select Nodal or Zonal , you instruct MeshTV to interpolate your data (rather than just your colors) to the nodes or zones and to plot the data accordingly.
You will now switch from Natural to Nodal .
· Click the Nodal button so it is "popped out."
The changes take effect as soon as the Apply button is pressed.
Pressing the Make default button makes the current setting in the window the default for any future pseudocolor plots. Pressing the Reset button changes the settings to match the current default attributes.
The data operators are listed in the Operators pulldown menu on the MeshTV Main window. One or more operations can be applied to the data before it is plotted by successively choosing operators from the Operators pulldown menu. The operations being applied to the data can be seen in the variable name section of a plot entry in the Active plots list.
To reflect the data in the plots using the default reflection attributes:
In this section we will change the reflect attributes to reflect the data into different quadrants.
To change the properties of the reflect operator you must bring up the Reflect attributes window.
· Select "Reflect plot" from the Operator attributes pulldown menu.
The Reflect plot attributes window two sections. The first section, titled Positive Z, works for both 2D and 3D problems, while the second section, titled Negative Z (3D only) applies only for 3D problems. You can think of the section as representing the problem in the first quadrant. If you want to reflect the data into the negative Y section, you can select the quadrant below the one selected in the picture. If you want to reflect the data into the negative X section of the coordinate system, you can click on the quadrant to the left of the one selected in the picture.
You will now reflect the plot data.
· Select the squares to the left and bottom of the currently selected square.
You can only change the attributes of the last operator applied of a particular type. This means that if you are applying two index select operators to the data, then you can only change the attributes of the second index select operator applied. To change the attributes of the first one requires removing the second index select operator, changing the attributes of the first index select operator, and then reapplying the second index select operator. This restriction does not apply to operators of two different types. If you apply both the index select and reflect operator you could change the attributes of either one of them with the appropriate attribute window. Of course, there really is no practical reason to apply the reflect operator more than once.
The notepad is a scrolling window you can use for posting many of the popup windows. The notepad is for frequently used windows that you want to access quickly, but don't constantly want to have present. All the popup windows that can be posted will have a Post button located at the bottom of the window. All the plot and operator attribute windows, along with several other windows, may be posted to the notepad.
· Press the Post button on the Pseudocolor attributes window. The window will be posted to the notepad, and the Post button will change to the Unpost button.
· Press the Post button on the Reflect plot attributes window.
Windows can be unposted by pressing the Unpost button. Windows can also be dismissed directly from the notepad by pressing the Dismiss button.
· Press the Unpost button on the Pseudocolor attributes window.
· Press the Dismiss button on the Pseudocolor attributes window.
· Press the Dismiss button on the Reflect attributes window.
In this section, we will save the contents of a vis window to a disk file.
To save a window using the current save options, simply select "Save window" from the File pulldown menu on the MeshTV Main window. This saves a window using the default options. Many times, however, you might want to modify the defaults before you save. Let's change the default save options.
· Select "Set save options" from the File pulldown menu on the MeshTV Main window.
The Set save options window contains a Name text field, a File type setting, a Family on/off button, an Autosave on/off button, a Save tiled on/off button, a Screen Capture on/off button, an X/Y resolution text field, and a Banner text field. The File type setting selects the format that the contents of the window will be saved as. The options are Raster postscript TM , Postscript, PPM, SGI's rgb, TIFF, and STL. The Postscript format should only be used for 2D images, while the raster formats, including Raster postscript, work for all images. STL works only for 3D datasets, and it provides a way for a special machine, called a Stereolithography machine, to construct 3D replicas of the plots in the vis window. Because MeshTV outputs STL, it's more exact to refer to saving the "contents of the window" rather than saving the "image," but this manual often does the latter for simplicity's sake.
If the Family setting is not selected ("popped out"), the name of the file used to store the image will match that in the File text field, else the name of the file will be the Name text concatenated with four digits. The digits start at 0000 and are incremented after each image is stored. If the Autosave setting is selected ("pushed in") , the image on the screen will be saved whenever the image changes. If Save tiled is selected, MeshTV saves all open vis windows to one image. If the Screen capture setting is selected, the image that is saved is captured from the screen, otherwise an image is created from the screen at the appropriate resolution and saved. If the Screen capture is not selected, the X/Y resolution text field is used to set the size of the image. If the user specifies a banner in the Banner text field, a banner will appear at the top and bottom of the saved image. The banner only works with Postscript files.
When you are saving an image with the Screen capture setting On , you should not have any other windows obscuring the window you are saving because they will appear in the saved image.
· Change the File type setting to Tiff .
· Select "Save window" from the File pulldown menu on the MeshTV Main window or "Save image" from the popup menu in the vis window.
The Busy indicator will appear while the image is being saved. The image will have been saved in the directory from which MeshTV was started, and the name of the file will be "meshtv0000.tif".
You can display the saved image using the xv utility.
In this section, we will print the contents of a vis window.
To print using the current print options, simply select "Print window" from File pulldown menu on the MeshTV Main window. Many times, however, you might want to modify the defaults before you print the window. Let's change the default print options.
· Select "Set print options" from the File pulldown menu on the MeshTV Main window.
The Set print options window contains a Printer command selection, a Printer text field, a Printer type setting, a Print tiled on/off button, a Screen Capture on/off button, an X/Y resolution text field, and a Banner text field. The Printer command selection indicates whether to use lpr or lp for your printer command; once set, this should not normally need to be changed. The Printer text field specifies the name of your printer. The Printer type setting specifies the format of the image files that it prints. The options are Raster postscript and Postscript. The Postscript format should only be used for 2D images, while Raster postscript will work for all images. The Print tiled and Screen capture settings, as well as the X/Y Resolution and Banner text fields, function the same as on the Set save options window.
When you are printing a window with the Screen capture setting selected ("pushed in"), you should not have any other windows obscuring the window you are printing because they will appear in the printed image. In addition, when capturing the image from the screen, you should make the window as large as possible before printing to get the highest resolution image possible.
· Change the Printer text field to the name of a color printer.
· Set the Printer type setting to the correct type.
· Select "Print window" from the File pulldown menu on the MeshTV Main window or "Print image" from the popup menu in the vis window.
The Busy indicator will appear while the image is being printed.
You are now ready to exit MeshTV.
· Select "Quit" from the File pulldown menu on the MeshTV Main window.