Skip to content
  • Andrew Heather's avatar
    ENH: LimitRange Function1 - extended and renamed · 89ddc271
    Andrew Heather authored and Mark OLESEN's avatar Mark OLESEN committed
    Description
        Function1 wrapper that maps the input value prior to it being used by
        another Function1.
    
        Example usage for limiting a polynomial:
        \verbatim
            <entryName>
            {
                type            inputValueMapper;
                mode            minMax;
    
                min             0.4;
                max             1.4;
    
                value polynomial
                (
                    (5 1)
                    (-2 2)
                    (-2 3)
                    (1 4)
                );
            }
        \endverbatim
    
        Here the return value will be:
        - poly(0.4) for x <= 0.4;
        - poly(1.4) for x >= 1.4; and
        - poly(x) for 0.4 < x < 1.4.
    
        Example usage for supplying a patch mass flux for a table lookup:
        \verbatim
            <entryName>
            {
                type            inputValueMapper;
                mode            function;
    
                function
                {
                    type            functionObjectValue;
                    functionObject  surfaceFieldValue1;
                    functionObjectResult sum(outlet,phi);
                }
    
                value
                {
                    type        table;
                    file        "<system>/fanCurve.txt";
                }
            }
        \endverbatim
    
        Where:
        \table
            Property | Description                                  | Required
            mode     | Mapping mode (see below)                     | yes
            function | Mapping Function1                            | no*
            min      | Minimum input value                          | no*
            max      | Maximum input value                          | no*
            value    | Function of type Function1<Type>             | yes
        \endtable
    
        Mapping modes include
        - none     : the input value is simply passed to the 'value' Function1
        - function : the input value is passed through the 'function' Function1
                     before being passed to the 'value' Function1
        - minMax   : limits the input value to 'min' and 'max' values before being
                     passed to the 'value' Function1
    
    Note
        Replaces the LimitRange Function1 (v2106 and earlier)
    89ddc271