Missing Expressions

This page lists some expressions that VisIt does not have but would be useful at times:

  1. center(mesh) : Return a vector expression containing the coordinate of the center of the cell
  2. in_box(vec, x0, x1, y0, y1 [, z0, z1]) : Return 1 if the vector expression "vec" is in the box, 0 otherwise. For example, "vec" could be the cell centers from center() or it could be node coordinates from coord().
  3. ijk_index(mesh) : Return a vector containing the i,j,k index of the cell for structured meshes (single domain is fine)
  4. in_range(var, min, max) : Return 1 if the value is in [min,max), 0 otherwise. This is easier than and(ge(var,min),lt(var,max))
  5. clamp(var, min, max) : Return var if the value is in [min,max], otherwise return min if var<min or max if var > max. This is easier than if(and(gte(var, 0.), lte(var, 10.)), var, if(lt(var,0.), 0., 10.))
  6. unit_displace(mesh) : Return a node centered vector field that, when applied to a mesh using Displace operator, results in coordinates for x,y,z that are in [0,1]. This could be very useful for coordinate space transforms on rectilinear data via expressions
  7. divide(a,b,<div_by_zero_value>) : Helps execute division expression on meshes with masked out (v = 0) scalar regions.

Some other missing expressions are proposed at Mesh Expressions.