Calc
compute with coordinates and data
Ports
The Calc module performs calculations on input data and input coordinates according to user-defined formulas.
The output grid reuses the topology of the input geometry.
If no grid_formula or normal_formula is provided, also the output coordinates or output normals are reused from the input geometry, respectively.
The result of the calculation described by formula is mapped onto the output grid.
Parameters
name |
description |
type |
|---|---|---|
formula |
formula for computing data with exprtk (use result := {x,y,z} for vector output) |
String |
grid_formula |
formula for computing grid coordinates |
String |
normal_formula |
formula for computing grid normals |
String |
output_type |
type of output (AsInput, AsInputGrid, Vec1, Vec3) |
Int |
species |
species of output data |
String |
Supported System Parameters
name |
description |
type |
|---|---|---|
number of OpenMP threads (0: system default) |
Int |
|
show timing information |
Int |
|
number of tasks to keep in flight per MPI rank (-1: #cores/2) |
Int |
|
input object caching (CacheNone, CacheDeleteEarly, CacheDeleteLate, CacheByName) |
Int |
|
prioritize currently visible timestep |
Int |
|
validate data objects before sending to port (Disable, Quick, Thorough) |
Int |
The meaning of these parameters is described in more detail in the System Parameters documentation.
The expressions in the parameters formula, grid_formula, and normal_formula are
parsed with ExprTK, and so the operations and functions described in SECTION 08 - BUILT-IN OPERATIONS & FUNCTIONS of this document can be used.
The variables listed in this table are available to be used in the expressions.
Individual components of vector variables can be accessed using .x, .y, .z suffixes as shown,
for 1-dimensional variables var and var.x are equivalent.
Symbol / Variable |
Description |
|---|---|
|
assign the computed value to this variable (done implicitly if no assignment is made) |
|
result dimension (typically 1 or 3) |
|
position vector of current point |
|
x coordinate of current point |
|
y coordinate of current point |
|
z coordinate of current point |
|
data value at current item (point or cell) received at |
|
data value at current item (point or cell) received at |
|
data value at current item (point or cell) received at |
|
timestep number for current block |
|
real time for current block |
|
MPI rank number |
|
block ID number of current block |
|
index of current item (point or cell) in current block |