[Back] [Up] [Next]

## Creating a new expression

You can create a new expression by clicking on the Expression Window's New button. When you click on the New button, VisIt adds a new expression and shows its new, empty definition in the Definitions area. The initial name for a new expression is "unnamed" followed by some integer suffix. As you type a new name for the expression into the Name text field, the expression's name in the Expression list will update.

Each expression has an expression type that determines the variable menu in which the new variable appears. The available expression types are: Scalar Mesh Variable, Vector Mesh Variable, Mesh variable, Tensor variable, S ymmetric Tensor Variable. Since the expression type determines the menu in which the variable appears, it also determines the plots that can operate on the variable. Scalar mesh variables and species variables can be used in the Contour, Pseudocolor, and Volume plots. Vector mesh variables are used in the Streamline and Vector plots. Tensor mesh variables are used in the Tensor plot.

Figure 3

To edit an expression's actual definition, you can type a new expression comprised of constants, variable names, and other VisIt expressions into the Definition text field. The expression definition can span multiple lines as the VisIt expression parser ignores whitespace. For a complete list of VisIt's built-in expressions, refer to page 183. You can also use the Insert Function... menu, shown in figure, to insert any of VisIt's built-in expressions directly into the expression definition. The list of built-in expressions divided into certain categories as evidenced by the structure of the Insert Function... menu.

Figure 4

In addition to the Insert Function... menu, which lets you insert built-in functions into the expression definition, VisIt's Expression Window provides an Insert Variable... menu that allows you to insert variables for the active database into the expression definition. The Insert Variable... menu, shown in figure, is broken up into Scalars, Vectors, Meshes, etc. and has the available variables under the appropriate heading so they are easy to find.

Some variables can only be expressed as very complex expressions containing several intermediate subexpressions that are only used to simplify the overall expression definition. These types of subexpressions are seldom visualized on their own. If you want to prevent them from being added to the Plot menu, turn off the Show variable in plot menus check box.