ENH: add Function1 wrapping for functionObject trigger

Returns a 0/1 value corresponding to function object trigger levels.

    Usage:
    \verbatim
        <entryName> functionObjectTrigger;
        <entryName>Coeffs
        {
            triggers        (1 3 5);
            defaultValue    false;  // Default when no triggers activated
        }
    \endverbatim

ENH: add reset() method for Constant Function1

ENH: allow forced change of trigger index

- the triggers are normally increase only,
  but can now override this optionally
This commit is contained in:
Mark Olesen
2021-11-25 15:41:32 +01:00
committed by Mark Olesen
parent 30a2fa4b27
commit adcf41bd13
13 changed files with 458 additions and 34 deletions

View File

@ -117,11 +117,20 @@ public:
const word& entryName
) const;
//- Remove the trigger index from the properties
void clearTrigger();
//- Get the current trigger index
label getTrigger() const;
//- Set the current trigger index
bool setTrigger(const label triggeri);
//- Set the trigger index. Normally only if greater than current
//
// \param triggeri the new trigger index
// \param increaseOnly (default) only change if new index
// is greater than the current index.
//
// \return True if the index changed
bool setTrigger(const label triggeri, bool increaseOnly = true);
//- Set dictionary from named object, return true if set
bool getObjectDict