Beispiel #1
0
if parallel_enable.enabled():
    from ooflib.common.IO import parallelmainmenu
    ipcops_menu = parallelmainmenu.ipcmenu.addItem(
        oofmenu.OOFMenuItem('Analyze', secret=1, no_log=1)
        )

# Parameters to all the menu items.

mesh_param =  whoville.WhoParameter(
    'mesh', ooflib.engine.mesh.meshes,
    tip="The mesh on which to compute the output")

time_param = placeholder.TimeParameter(
    'time', tip='Time at which to perform the analysis.')

output_param = output.ValueOutputParameter(
    'data', tip="The output data source.")

domain_param = parameter.RegisteredParameter(
    'domain', analysisdomain.Domain,
    tip="Where on the mesh to compute the data.")

sample_param = parameter.RegisteredParameter(
    'sampling', analysissample.SampleSet,
    tip="How to sample the domain.")

destination_param = outputdestination.OutputDestinationParameter(
    'destination',
    value=outputdestination.msgWindowOutputDestination,
    tip='Where the data should be written.')

common_analysis_params = [mesh_param,
Beispiel #2
0
    while not it.end():
        names.append("%s[%s]" % (sr, it.shortstring()))
        it.next()
    return names


AggregateDifferenceOutput = output.Output(
    name="difference",
    callback=_difference,
    otype=outputval.OutputValPtr,
    srepr=_difference_shortrepr,
    instancefn=_difference_instancefn,
    column_names=_aggdiff_column_names,
    params=[
        output.ValueOutputParameter(
            'minuend',
            tip='The quantity from which the subtrahend is subtracted.'),
        output.ValueOutputParameter(
            'subtrahend', tip='The quantity to subtract from the minuend.')
    ],
    tip="Compute the difference between two quantities.")

output.defineOutput('Difference', AggregateDifferenceOutput, ordering=1000)

#=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=#

# The Concatenate Output allows two Outputs to be printed on the same
# line of the output file.  Its value type is the
# ConcatenatedOutputVal class, which defines a bunch of arithmetic
# operations that it just passes through to the OutputVals that it's
# concatenating.  ConcatenatedOutputVal is itself *not* an OutputVal.