The following is a list of functions available in the Python Calculator. Note that this list is partial since most of the NumPy and SciPy functions can be used in the Python Calculator. Many of these functions can take single values or arrays as argument.
abs (x) : Returns the absolute value(s) of x.
add (x, y): Returns the sum of two values. x and y can be single values or arrays. Same as x+y.
area (dataset) : Returns the surface area of each cell in a mesh.
aspect (dataset) : Returns the aspect ratio of each cell in a mesh.
aspect_gamma (dataset) : Returns the aspect ratio gamma of each cell in a mesh.
condition (dataset) : Returns the condition number of each cell in a mesh.
cross (x, y) : Returns the cross product for two 3D vectors from two arrays of 3D vectors.
curl (array): Returns the curl of an array of 3D vectors.
divergence (array): Returns the divergence of an array of 3D vectors.
divide (x, y): Element by element division. x and y can be single values or arrays. Same as x/y.
det (array) : Returns the determinant of an array of 2D square matrices.
determinant (array) : Returns the determinant of an array of 2D square matrices.
diagonal (dataset) : Returns the diagonal length of each cell in a dataset.
dot (a1, a2): Returns the dot product of two scalars/vectors of two array of scalars/vectors.
eigenvalue (array) : Returns the eigenvalue of an array of 2D square matrices.
eigenvector (array) : Returns the eigenvector of an array of 2D square matrices.
exp (x): Returns power(e, x).
global_max(array): Returns the maximum value of an array of scalars/vectors/tensors among all process. Not yet supported for multi-block and AMR datasets.
global_mean (array) : Returns the mean value of an array of scalars/vectors/tensors among all process. Not yet supported for multi-block and AMR datasets.
global_min(array): Returns the minimum value of an array of scalars/vectors/tensors among all process. Not yet supported for multi-block and AMR datasets.
gradient(array): Returns the gradient of an array of scalars/vectors.
inv (array) : Returns the inverse an array of 2D square matrices.
inverse (array) : Returns the inverse of an array of 2D square matrices.
jacobian (dataset) : Returns the jacobian of an array of 2D square matrices.
laplacian (array) : Returns the jacobian of an array of scalars.
ln (array) : Returns the natural logarithm of an array of scalars/vectors/tensors.
log (array) : Returns the natural logarithm of an array of scalars/vectors/tensors.
log10 (array) : Returns the base 10 logarithm of an array of scalars/vectors/tensors.
max (array): Returns the maximum value of the array as a single value. Note that this function returns the maximum within a block for AMR and multi-block datasets, not across blocks/grids. Also, this returns the maximum within each process when running in parallel.
max_angle (dataset) : Returns the maximum angle of each cell in a dataset.
mag (a) : Returns the magnigude of an array of scalars/vectors.
mean (array) : Returns the mean value of an array of scalars/vectors/tensors.
min (array) : Returns the minimum value of the array as a single value. Note that this function returns the minimum within a block for AMR and multi-block datasets, not across blocks/grids. Also, this returns the minimum within each process when running in parallel.
min_angle (dataset) : Returns the minimum angle of each cell in a dataset.
mod (x, y): Same as remainder (x, y).
multiply (x, y): Returns the product of x and y. x and y can be single values or arrays. Note that this is an element by element operation when x and y are both arrays. Same as x * y.
negative (x): Same as -x.
norm (a) : Returns the normalized values of an array of scalars/vectors.
power (x, a): Exponentiation of x with a. Here both x and a can either be a single value or an array. If x and y are both arrays, a one-by-one mapping is used between two arrays.
reciprocal (x): Returns 1/x.
remainder (x, y): Returns x − y*floor(x/y). x and y can be single values or arrays.
rint (x): Rounds x to the nearest integer(s).
shear (dataset) : Returns the shear of each cell in a dataset.
skew (dataset) : Returns the skew of each cell in a dataset.
square (x): Returns x*x.
sqrt (x): Returns square root of x.
strain (array) : Returns the strain of an array of 3D vectors.
subtract (x, y): Returns the difference between two values. x and y can be single values or arrays. Same as x - y.
surface_normal (dataset) : Returns the surface normal of each cell in a dataset.
trace (array) : Returns the trace of an array of 2D square matrices.
volume (dataset) : Returns the volume normal of each cell in a dataset.
vorticity(array): Returns the vorticity/curl of an array of 3D vectors.
vertex_normal (dataset) : Returns the vertex normal of each point in a dataset.