uniformCombiner (1d, 2d, 3d)

Performs an identical arithmetic operation on all components of a set of input nodalArrays and stores the ouput in a single user-specifed nodalArray using an expression evaluator. All input and output data structures must have the same number of components. The expression evaluator recognizes positions x, y, z and time t, along with the current timestep, dt, and the cell volume, dVolume. The expression evaluator checks the user supplied expression for validity and errors on finding undefined expressions.

The uniformCombiner accepts the following parameters, in addition to those required by Updater:

Data

in (string vector, required)
Inputs 1 to N are input nodalArrays which will be supplied to the expression evaluator.
out (string vector, required)
Output is a nodalArray which will contain the evaluation.

Parameters

indVars_inName (string vector, required)
For each input variable an “indVars” string vector must be defined. So if in = [q1,k2] where q1 and electricField are both nodalArray then the uniformCombiner block must define indVars_q1 = [“q1”] and indVars_k2 = [“k2”]. Note that the labels “q1” and “k2” are arbitrary; the requirement is that there is a single unique name for each input data structure, irrespective of the number of components of that data structure.
exprs (string vector, required)
Strings must be put in quotes. The strings are evaluated and placed in the output array. Only one string can be supplied; this same expression is applied to all components of the input arrays uniformly. Available command are defined by the muParser (http://muparser.sourceforge.net/)
preExprs (string vector, optional)
Strings must be put in quotes. The preExprs is used to compute quantities based on indVars that can later be used in the exprs to evaluate the output. Available commands are defined by the muParser (http://muparser.sourceforge.net)
other (strings, optional)
In addition, an arbitrary number of constants can be defined that can then be used in evaluating expression in both preExprs and exprs.

Example

The code block below demonstrates the addition of two input nodalArray and placing the result into one single output nodalArray:

<Updater computeQ2>
  kind = uniformCombiner1d
  onGrid = domain

  in = [q1, k2]
  out = [q2]

  indVars_q1 = ["q1"]
  indVars_k2 = ["k2"]

  exprs = ["q1+dt*k2"]
</Updater>