- Scalar
Scalar
A scalar is a grid independent quantity that can be updated in each time step. One scalar carries one value that is advanced in time. Binary operations between scalars, scalar and field, as well as unary operations, are defined via different updaters. A scalar is initialized to 0 unless an initial value is used to set its initial value. Scalars can be recorded via History, or dumped into a MultiField file. External circuit models and ODE solvers can be implemented with scalars in MultiFields.
The synchronization of scalars across ranks is different from fields. For a scalar, its value on the head node is broadcast to all other ranks by setting ‘messageScalars’ in <UpdateStep>. When recorded by History, it is also the head node value that is saved into history file.
Scalar object code block contained between the tags:
<Scalar *nameOfThisScalar*>
</Scalar>
Scalar Parameters
- kind (string, default = default)
Type of field, one of:
regular
. This is the only available option for scalar kind. It defines a scalar with a single value.
Scalar Blocks
- initialValue (optional)
A property that is used as an initial condition for the scalar. This value is evaluated at spatial origin (0,0,0) and time t=0. The result is used as the inital value of the scalar. If this property is not provided, the scalar is initialized to 0.
Example scalar Block
<Scalar A1>
initialValue = 5.0
</Scalar>
<Scalar A2>
kind = regular
</Scalar>