Five elementary operators on Result objects have been defined. Also, their corresponding assignment method have been defined. Unless otherwise specified, in the examples given below, , and are Result objects. One of the two operands can be replaced by a “constant” value in most cases, but at least one of the operands must be a Result object:
By “constant” value, one means a scalar real value, a scalar complex value, a real vector (Array of three real values), a complex vector (Array of three complex elements), or a real matrix (Array of real values). These arguments can be used in addition, substraction and multiplication operations. Note that no constant complex matrix is supported.
For the division operation, can be replaced by a scalar real or complex argument, but not by a vector or a matrix. on the other hand, can be replaced by constant scalar, vectorial or matrix, real or complex (except for the matrix).
For the exponentiation operator, the two Results must be scalar. Either or can be replaced by a constant real value.
One can make a few general remarks:
When the two arguments are vectorial or tensorial Results, the coordinate system ids must be the same for each corresponding values.
The coordinate system associated to the values of the constructed Result is defined according the following rules:
For a scalar Result , the cId is always set to -9999 (Result not associated to a coordinate system).
For a vectorial or tensorial Result, the coordinate system for each value is set to the corresponding coordinate systems of the vectorial or tensorial arguments.
When it is not possible to determine the Result coordinate system according to the preceding rules, the CID is set to 0 for all values. An example of such a case is the division of an Array by a scalar Result.
The operators are defined in the Result class. This means that the first operand must be a Result object. However, to the different operators defined in Result class corresponding “operator” methods defined the “Post” module. Several of the “Post” methods allows to replace the first operand by a real object or an Array. (See section I.6.4.)
Note that this rule does not apply to the .NET assembly that allows the first operand of the different operators to be replaced by constant values.
The support for Complex Result operators depends on the type of dyadic operation. See the sub-sections below for more information.