twoFieldOpCrossDev

twoFieldOpCrossDev

Works with XSimBase license.

MultiField updater for Cross Devices that performs cell-by-cell operations on two regularCrossDev fields. Denote the read components by R_1 and R_2 for the two fields, and the write components by W. Further let \(f_i(t)\), \(f_f(t)\), and \(f_s(t)\) be STFunc expressions, and \(C_i, C_f, C_s\), and \(C_p\) be constants. This updater computes the writeField as \(W = C_i f_i(t) W + C_{f1} f_{f1}(t) R_1 + C_{f2} f_{f2}(t) R_2 + C_s f_s(t) + C_p f_p(x,y,z,t) R_1 R_2\).

twoFieldOpCrossDev Parameters

The twoFieldOpCrossDev updater takes the lowerBounds, upperBounds, lowerCoords, upperCoords, gridBndry, writeFields, and readFields parameters of Field Slab updaters, as well as the following parameters:

readField1Components (required integer vector)

For the first readField, a vector of components on which to operate.

readField2Components (required integer vector)

For the second readField, a vector of components on which to operate.

writeComponents (required integer vector)

For each writeField, a vector of components to which to write.

incrementCoeff (float, required)

The constant \(C_i\).

field1Coeff (float, required)

The constant \(C_{f1}\).

field2Coeff (float, required)

The constant \(C_{f2}\).

scalarCoeff (float, required)

The constant \(C_s\).

productCoeff (float, required)

The constant \(C_p\).

incrementCoeffMult (expression, optional)

A userFunc expression that multiplies the writeComponent, \(f_i(t)\).

field1CoeffMult (expression, optional)

A userFunc expression that multiplies the readComponent, \(f_{f1}(t)\).

field2CoeffMult (expression, optional)

A userFunc expression that multiplies the readComponent, \(f_{f2}(t)\).

scalarCoeffMult (expression, optional)

A userFunc expression that does not multiply any field components, \(f_s(t)\).

productCoeffMult (expression, optional)

A userFunc expression that multiplies the readComponent product, \(f_p(t)\).

readItersShiftInX (integer vector, optional)

The number of grid cells by which to shift the first and second readField in the x-direction when reading.

readItersShiftInY (integer vector, optional)

The number of grid cells by which to shift the first and second readField in the y-direction when reading.

readItersShiftInZ (integer vector, optional)

The number of grid cells by which to shift the first and second readField in the z-direction when reading.

Example twoFieldOpCrossDev block

<FieldUpdater excUpdater>
  kind = twoFieldOpCrossDev
  lowerBounds = [0 1  0]
  upperBounds = [1 NY NZ]
  readComponents = [2 2]
  readFields = [Exc E]
  readItersShiftInX = [0 0]
  readItersShiftInY = [0 0]
  readItersShiftInZ = [0 0]
  writeFields = [E]
  writeComponents = [2]
  incrementCoeff = 0.0
  scalarCoeff = 0.0
  field1Coeff = 1.0
  field2Coeff = 1.0
  productCoeff = 0.0
  <Expression field1CoeffMult>
    expression = exp(-(PULSESTART+LIGHTSPEED*t)^2/$(PULSELEN)**2$)
  </Expression>
</FieldUpdater>

Notes

twoFieldOpCrossDev is only available with text-based setup.

History

twoFieldOpCrossDev was introduced in XSim 1.