fieldBinOpUpdater

fieldBinOpUpdater

Works with VSimBase, VSimEM, VSimPD, VSimPA, and VSimMD licenses.

MultiField updater that applies a mathematical operation on two fields (F and G) specified through the readFields parameter, and writes the result to the writeFields parameter.

fieldBinOpUpdater Parameters

The fieldBinOpUpdater takes the lowerBounds and upperBounds parameters of FieldUpdater, as well as the following parameters:

readFields (required string vector)

A vector of the names of the two fields on which to operate.

writeFields (required string vector)

A vector containing a single element, the name of field to update.

binOp (required string)

Operation to apply to the field; one of add, subtract, multiply or divide. Operations are:

add:       (aCoeff*Fj)+(bCoeff*Gj)
subtract:   (aCoeff*Fj)-(bCoeff*Gj)
multiply:   (aCoeff+Fj)*(bCoeff+Gj)
divide:      (aCoeff+Fj)/(bCoeff+Gj)
readComponents (optional integer vector)

The components to use in the operand fields.

writeComponent (optional integer)

The component to update.

Note

The readComponents and writeComponent parameters work together, and if one is specified, the other must be as well. If neither are specified, then all the components are updated. In that case, both of the readFields and the writeFields must all have the same number of components.

aCoeff (optional float)

Coefficient for first field (F, as described above). Default values:

add:       1.0
subtract:   1.0
multiply:   0.0
divide: 0.0.
bCoeff (optional float)

Coefficient for second field (G, as described above). Default values:

add:       1.0
subtract:   1.0
multiply:   0.0
divide: 0.0.

Example fieldBinOpUpdater Block

<FieldUpdater addUpdate> # aA + bB
  kind = fieldBinOpUpdater
  lowerBounds = [0 0 0]
  upperBounds = [NX1 NY1 NZ1]
  binOp = add
  aCoeff = 1.0
  bCoeff = 1.0
  readFields = [F1 F2]
  writeFields = [addField]
</FieldUpdater>