OOF2: The Manual
Name
PropertyOutputRegistration — Define a new Property-dependent output quantity
Python Synopsis
from oof2.SWIG.engine.IO import propertyoutput
class ScalarPropertyOutputRegistration(PropertyOutputRegistration):def __init__(self, name, initializer=None, parameters=[], tip=None, discussion=None)
class SymmMatrix3PropertyOutputRegistration(PropertyOutputRegistration):def __init__(self, name, initializer=None, parameters=[], tip=None, discussion=None)
class ThreeVectorPropertyOutputRegistration(PropertyOutputRegistration):def __init__(self, name, initializer=None, parameters=[], tip=None, discussion=None)
Description
PropertyOutputRegistration objects
contain the data that's required for OOF2 to compute a Property-dependent
output quantity. Because the actual computation is done in
Property::output,
the registration object doesn't have to do much. It is
basically a container for the name of the output and its Parameters,
if any. It also defines appropriate Output
objects and calls definePositionOutput,
etc on them.
The PropertyOutputRegistration base
class is a swigged C++ class, but it should never be used
directly. Instead, new property outputs should create an
instance of one of the subclasses listed above. (Adding new
subclasses is not difficult, but it won't be discussed
here. If new subclasses are required, the classes in
SRC/engine/IO/propertyoutput.spy can be
used as examples.)
The three subclasses,
ScalarPropertyOutputRegistration,
SymmMatrix3PropertyOutputRegistration,
and
ThreeVectorPropertyOutputRegistration,
are for registering Outputs that compute different types of
data (scalars, symmetric 3×3 matrices, and 3-vectors,
respectively). The constructors for all of the subclasses
take the same arguments (all but the first are optional):
name-
The name of the Output. This is the name that is retrieved by
PropertyOutput::namein aProperty::outputfunction. initializer-
initializer, if provided, must be an instance of an appropriate subclass ofPropertyOutputInit. The initializer is called to make aProperty-independent contribution to the output data before callingProperty::output. parameters-
parametersis a list ofParameterobjects that further define the output. For example, the'Energy'output has anEnumParametercalled'etype'that can be set to'Elastic','Total', etc. The values of the parameters can be retrieved byProperty::outputby callingPropertyOutput::getFloatParam, etc. tip-
tipis a short string describing the output. It will appear in tooltips in the GUI. discussion-
discussionis a more verbose description of the Output, meant for inclusion in the OOF2 users manual. It can either be a string or a reference to a file via thexmlmenudump.loadFilefunction. The string or the contents of the file must be docbook xml code suitable for the contents of a refsection.



