FloatParameter = parameter.FloatParameter AutoNumericParameter = parameter.AutoNumericParameter ValueSetParameter = parameter.ValueSetParameter # ZDisplayParams does not include the "level" one, because it needs to # have different defaults for the ContourDisplay and for the other z # displays, such as the MeshCenterFillDisplay. # TODO: Add a vector plot DisplayMethod, and maybe an ellipsoid plot # for symmetric tensors. zdisplayparams = [ placeholder.TimeParameter('when', value=placeholder.latest, tip='Time at which to plot'), output.ScalarOutputParameter('what', tip='Quantity to be plotted'), output.PositionOutputParameter( 'where', outputDefs.originalPosition, tip="Plot at displaced or original position?"), AutoNumericParameter('min', automatic.automatic, tip="level of lowest contour, or 'automatic'"), AutoNumericParameter('max', automatic.automatic, tip="level of highest contour, or 'automatic'") ] class ZDisplay(displaymethods.MeshDisplayMethod): def __init__(self, when, what, where, min, max, levels):
if minuend is None: return return minuend.outputInstance() ScalarDifferenceOutput = output.Output( name="difference", callback=_difference, otype=outputval.ScalarOutputValPtr, instancefn=_difference_instancefn, column_names=single_column_name, # The minuend and subtrahend are *parameters*, not inputs, so that # they can be specified by the user at run time. params=[ output.ScalarOutputParameter( 'minuend', tip='The quantity from which the subtrahend is subtracted.'), output.ScalarOutputParameter( 'subtrahend', tip='The quantity to subtract from the minuend.') ], srepr=_difference_shortrepr, tip="Compute the difference between two quantities.") # It's important that the ordering parameter for # ScalarDifferenceOutput and AggregateDifferenceOutput be greater than # the ordering for at least one other Output in each category. # Putting the difference outputs first in the list leads to infinite # recursion when initializing Output widgets. output.defineScalarOutput('Difference', ScalarDifferenceOutput, ordering=1000)