Activated after a user-specified duration. More...
Public Member Functions | |
| TypeName ("maxDuration") | |
| Runtime type information. More... | |
| maxDurationCondition (const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state) | |
| Constructor. More... | |
| virtual | ~maxDurationCondition ()=default |
| Destructor. More... | |
| virtual bool | apply () |
| Apply the condition. More... | |
| virtual void | write () |
| Write. More... | |
Public Member Functions inherited from runTimeCondition | |
| TypeName ("runTimeCondition") | |
| Runtime type information. More... | |
| declareRunTimeSelectionTable (autoPtr, runTimeCondition, dictionary,(const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state),(name, obr, dict, state)) | |
| Declare runtime constructor selection table. More... | |
| runTimeCondition (const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state) | |
| Constructor. More... | |
| virtual | ~runTimeCondition ()=default |
| Destructor. More... | |
| virtual const word & | name () const |
| Return the condition name. More... | |
| virtual bool | active () const |
| Return the active flag. More... | |
| virtual label | groupID () const |
| Return the group index. More... | |
Protected Attributes | |
| scalar | duration_ |
| Duration. More... | |
| scalar | startTime_ |
| Time when the condition is activated. More... | |
| bool | initialised_ |
| Initialisation flag. More... | |
| Switch | resetOnRestart_ |
| Reset on restart (ignores any state information) More... | |
Protected Attributes inherited from runTimeCondition | |
| word | name_ |
| Condition name. More... | |
| const objectRegistry & | obr_ |
| Reference to the object registry. More... | |
| stateFunctionObject & | state_ |
| State. More... | |
| bool | active_ |
| On/off switch. More... | |
| dictionary & | conditionDict_ |
| Reference to the condition dictionary. More... | |
| label | groupID_ |
| Group index - if applied, all conditions in a group must be. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from runTimeCondition | |
| static autoPtr< runTimeCondition > | New (const word &conditionName, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state) |
| Selector. More... | |
Public Attributes inherited from runTimeCondition | |
| Switch | log |
| Switch to send output to Info. More... | |
Protected Member Functions inherited from runTimeCondition | |
| dictionary & | setConditionDict () |
| Set the condition dictionary (create if necessary) More... | |
| const dictionary & | conditionDict () const |
| Return const access to the conditions dictionary. More... | |
| dictionary & | conditionDict () |
| Return non-const access to the conditions dictionary. More... | |
Activated after a user-specified duration.
Definition at line 55 of file maxDurationCondition.H.
| maxDurationCondition | ( | const word & | name, |
| const objectRegistry & | obr, | ||
| const dictionary & | dict, | ||
| stateFunctionObject & | state | ||
| ) |
Constructor.
Definition at line 56 of file maxDurationCondition.C.
|
virtualdefault |
Destructor.
| TypeName | ( | "maxDuration" | ) |
Runtime type information.
|
virtual |
Apply the condition.
Implements runTimeCondition.
Definition at line 81 of file maxDurationCondition.C.
References runTimeCondition::active_, delta, maxDurationCondition::duration_, maxDurationCondition::initialised_, Log, runTimeCondition::name_, Foam::nl, runTimeCondition::obr_, maxDurationCondition::startTime_, objectRegistry::time(), TimeState::timeToUserTime(), Foam::type(), and dimensioned< Type >::value().
|
virtual |
|
protected |
Duration.
Definition at line 64 of file maxDurationCondition.H.
Referenced by maxDurationCondition::apply().
|
protected |
Time when the condition is activated.
Definition at line 67 of file maxDurationCondition.H.
Referenced by maxDurationCondition::apply().
|
protected |
Initialisation flag.
Definition at line 70 of file maxDurationCondition.H.
Referenced by maxDurationCondition::apply().
|
protected |
Reset on restart (ignores any state information)
Definition at line 73 of file maxDurationCondition.H.