subset by expression

subset by expression

The subset by expression module creates a subset of the input grid with the same dimensionality. It can receive a field (blue port) model with cells which are points, lines, surfaces and/or volumes and its output will be a subset of the same type of cells.

Subset by expression is different from plume in that it outputs entire cells making its output “lego-like”.

It uses a mathematical expression allowing you to do complex subsetting calculations on coordinates and multiple data components with a single module, which can dramatically simplify your network and reduce memory usage. It has 2 floating point variables (N1, N2) which are setup with ports so they can be easily animated.

Operators:

  • == Equal to
  • < Less than
  • > Greater Than
  • <= Less than or Equal to
  • >= Greater Than or Equal to
  • or
  • and
  • in (as in list)

Example Expressions:

  • If Nodal data is selected:
    • D0 >= N1 All nodes with the first analyte greater than or equal to N1 will be used for inclusion determination.
    • (D0 < N1) or (D1 < N2) All nodes with the first analyte less than or equal to N1 OR the second analyte less than or equal to N2 will be used for inclusion determination.
  • If Cell data is selected:
    • D1 in [0, 2] where D1 is Layer will give you the uppermost and third layers.
    • D1 in [1] where D1 is Layer will give you the middle layer.
    • D1 == 0 where D1 is Layer will give you the uppermost layer
    • D1 >= 1 where D1 is Layer will give you all but the uppermost layer

Ports

DirectionNameTypeDescription
InputInput FieldFieldThe field to use when calculating the expression.
InputInput Number Variable 1NumberA value used as a variable in the expression.
InputInput Number Variable 2NumberA value used as a variable in the expression.
InputInput Z ScaleNumberThe factor for vertical scaling.
OutputOutputFieldFieldThe field created when applying the expression with the result being false.
OutputOutput Number Variable 1NumberA value used as a variable in the expression.
OutputOutput Number Variable 2NumberA value used as a variable in the expression.
OutputOutput ObjectRenderableA renderable object to display.

Properties

PropertyTypeDescription
Allow RunBooleanThe Allow Run toggle will prevent the module from running when unselected.
ExecuteButtonThe Run Once button will cause the module to run one time even if the Allow Run toggle has been turned off.
Z ScaleDoubleThe Z Scale is the vertical exaggeration to apply to the display object.
Subset ByChoice: Nodal Data, Cell DataThe Subset By control allows the user to choose which criteria to use for subsetting cells.
N1DoubleThe N1 value may be passed in via the Input Number Variable 1 port and is usable by the expression.
N2DoubleThe N2 value may be passed in via the Input Number Variable 2 port and is usable by the expression.
Subset ExpressionStringThe Subset Expression is used to determine which node or cell to include in the output. All expressions should resolve to either a true or false for each node (if using a nodal subset) or cell (if using a cell subset).
Nodal Subset VariablesString (read-only)The Variables to use to set the criteria when subsetting by nodal data.
Expression Cells To IncludeChoice: All Nodes Match Criteria, Any Node Matches CriteriaThe Expression Cells To Include value allows the user to include a cell if all nodes in the cell match the expression criteria, or if any of the nodes in the cell match the expression criteria.
Cell Subset VariablesString (read-only)The Variables to use to set the criteria when subsetting by cell data.