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
| Direction | Name | Type | Description |
|---|---|---|---|
| Input | Input Field | Field | The field to use when calculating the expression. |
| Input | Input Number Variable 1 | Number | A value used as a variable in the expression. |
| Input | Input Number Variable 2 | Number | A value used as a variable in the expression. |
| Input | Input Z Scale | Number | The factor for vertical scaling. |
| Output | OutputField | Field | The field created when applying the expression with the result being false. |
| Output | Output Number Variable 1 | Number | A value used as a variable in the expression. |
| Output | Output Number Variable 2 | Number | A value used as a variable in the expression. |
| Output | Output Object | Renderable | A renderable object to display. |
Properties
| Property | Type | Description |
|---|---|---|
| Allow Run | Boolean | The Allow Run toggle will prevent the module from running when unselected. |
| Execute | Button | The Run Once button will cause the module to run one time even if the Allow Run toggle has been turned off. |
| Z Scale | Double | The Z Scale is the vertical exaggeration to apply to the display object. |
| Subset By | Choice: Nodal Data, Cell Data | The Subset By control allows the user to choose which criteria to use for subsetting cells. |
| N1 | Double | The N1 value may be passed in via the Input Number Variable 1 port and is usable by the expression. |
| N2 | Double | The N2 value may be passed in via the Input Number Variable 2 port and is usable by the expression. |
| Subset Expression | String | The 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 Variables | String (read-only) | The Variables to use to set the criteria when subsetting by nodal data. |
| Expression Cells To Include | Choice: All Nodes Match Criteria, Any Node Matches Criteria | The 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 Variables | String (read-only) | The Variables to use to set the criteria when subsetting by cell data. |