unaryFieldOpUpdater

unaryFieldOpUpdater

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

Multifield updater that performs one of the following operations on a field \({\bf F}\), another field \({\bf G}\), and a STFunc \(f\):

(11)\[F_j(x,y,z,t+\Delta t) = f(x,y,z,t)G_j(x,y,z,t)\]
(12)\[F_j(x,y,z,t+\Delta t)= F_j(x,y,z,t)+f(x,y,z,t)G_j(x,y,z,t)\]
(13)\[F_j(x,y,z,t+\Delta t)= F_j(x,y,z,t)f(x,y,z,t)G_j(x,y,z,t)\]
(14)\[F_j(x,y,z,t+\Delta t)= \frac{F_j(x,y,z,t)}{f(x,y,z,t)G_j(x,y,z,t)}\]

For updating a single component of \({\bf F}\), the updater is straightforward; the operation is specified by the operation parameter.

However, for updating multiple components of \({\bf F}\), if different components of \({\bf F}\) are located at different places (e.g., for a Yee electric field, \(E_x\) and \(E_y\) are located at different places within a mesh cell), STFunc is evaluated only once for all components; STFunc is evaluated at the position of the component given by the component parameter of the updater and the field offset of field \({\bf F}\). In this case, the components of \({\bf F}\) that are updated are those given by the parameter writeComponents.

If you want to have \(f\) evaluated at the location of each component, you must use a separate STFuncUpdater definition for each component (or otherwise update all components using FieldMultiUpdater).

unaryFieldOpUpdater Parameters

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

operation (required string)

One of:

readFields (required string vector)

A single element, the name of the field to use in the operation (\(\mathbf{G}\), above).

writeFields (required string vector)

A single element, the name of the field to update (\(\mathbf{F}\), above).

component (optional integer, default = 0)

Component \(j\) of \({\bf F}\) to be updated. However, if writeComponents is not [0], the component, along with the field offset of \({\bf F}\), determines the location in each cell where the function \({\bf f}\) will be evaluated.

readComponents (optional integer vector)

List of components of \({\bf G}\) used to update \({\bf F}\), e.g., if writeComponents = [0 1 3] and readComponents = [2 1 3], then \(F_0=fG_2\), \(F_1=fG_1\), and \(F_3=fG_3\), where \(f\) is evaluated at the location of component. If this is not specified, it defaults to the value of writeComponents.

writeComponents (optional integer vector, default = [0])

List of components \(j\) of \({\bf F}\) that will be updated.

Note

The STFunc \(f\) will be evaluated only once per cell for all components, and the location within each cell at which \(f\) is evaluated is determined by the component parameter.

bumpReadIter (integer vector, default = [0 0 0])

Number of cells in each simulated dimension to offset the location where \(G\) is written from the location where \(F\) is read.

dtCoefficients (optional float vector, default = [1.0 0.0])

Two components [\(c_0\) \(c_1\)]: the function \(f\) will be multiplied by \((c_0 + c_1 \Delta t)\), where \(\Delta t\) is the current time step. If \(c_1\) is not specified it is assumed to be zero.

gridBoundary (optional string)

If provided, only components on the interior of the specified GridBoundary will be updated. The method to define the interior is given in the interiorness parameters. If this parameter is provided, then the field specified in writeFields must have offset = none or offset = center.

interiorness (optional string, default = cellcenter)

If the gridBoundary parameter is specified, this is the method the used to determine whether a component is interior to the boundary. The behavior depends on the .offset specified in the updated Field.

One of:

cellcenter: If offset = none, then a cell is considered interior if its node is adjacent to at least one cell with center inside the boundary.

If offset = center, then a cell is considered interior if its center is inside the boundary.

deymittra: If offset = none, then a cell is considered interior if all nodes adjacent to (i.e. displaced by a single edge from) its node are inside the boundary.

This interiorness option cannot be specified with offset = center.

STFunc (required parameter block)

A parameter block of type STFunc (with any name) must be specified. This describes \(f\).