Creating Results with Imaginary Parts

Creating results for analyses that have complex results requires managing both real and imaginary values. You use the method SetValues() to set values to the real part of the result. You use the method SetImaginaryValues() to set values to the imaginary part of the result.

IronPython code follows for the creation of a complex result:

def Evaluate(result,stepInfo,collector):

    for id in collectors.Ids:
        real_value = 1.
        # Set the real part of the result
        collector.SetValues(id, real_value)

        imaginary_value = 2.
        # Set the imaginary part of the result
        collector.SetImaginaryValues(id, imaginary_value)