Average run time condition - satisfied when average does not change by more than a given value. More...
Public Types | |
| enum | windowType { NONE, APPROXIMATE, EXACT } |
Public Member Functions | |
| TypeName ("average") | |
| Runtime type information. More... | |
| averageCondition (const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state) | |
| Constructor. More... | |
| virtual | ~averageCondition ()=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... | |
Static Public Attributes | |
| static const Enum< windowType > | windowTypeNames |
Protected Member Functions | |
| template<class Type > | |
| void | calc (const label fieldi, bool &satisfied, bool &processed) |
| Templated function to calculate the average. 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... | |
Protected Attributes | |
| word | functionObjectName_ |
| Name of function object to retrieve data from. More... | |
| wordList | fieldNames_ |
| List of fields on which to operate. More... | |
| const scalar | tolerance_ |
| Satisfied when difference in mean values is less than this value. More... | |
| const scalar | window_ |
| Averaging window. More... | |
| windowType | windowType_ |
| Averaging window type. More... | |
| List< scalar > | totalTime_ |
| Average time per field. More... | |
| Switch | resetOnRestart_ |
| Reset the averaging process on restart flag. More... | |
| label | nIterStartUp_ |
| Number of start-up iterations before allowing satisfied checks. More... | |
| label | iter_ |
| Current iteration count. 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... | |
Average run time condition - satisfied when average does not change by more than a given value.
Definition at line 59 of file averageCondition.H.
|
strong |
| Enumerator | |
|---|---|
| NONE | |
| APPROXIMATE | |
| EXACT | |
Definition at line 67 of file averageCondition.H.
| averageCondition | ( | const word & | name, |
| const objectRegistry & | obr, | ||
| const dictionary & | dict, | ||
| stateFunctionObject & | state | ||
| ) |
Constructor.
Definition at line 62 of file averageCondition.C.
References forAll, dictionary::found(), dictionary::readIfPresent(), dictionary::set(), and dictionary::subDict().
|
virtualdefault |
Destructor.
Templated function to calculate the average.
Definition at line 36 of file averageConditionTemplates.C.
References Foam::constant::atomic::alpha, beta(), LList< LListBase, T >::cbegin(), delta, dict, Log, Foam::mag(), Foam::nl, FIFOStack< T >::pop(), and FIFOStack< T >::push().
| TypeName | ( | "average" | ) |
Runtime type information.
|
virtual |
Apply the condition.
Implements runTimeCondition.
Definition at line 115 of file averageCondition.C.
References runTimeCondition::active_, TimeState::deltaTValue(), Foam::endl(), averageCondition::fieldNames_, forAll, averageCondition::functionObjectName_, Foam::Info, averageCondition::iter_, Log, runTimeCondition::name_, averageCondition::nIterStartUp_, Foam::nl, runTimeCondition::obr_, objectRegistry::time(), averageCondition::totalTime_, Foam::type(), and WarningInFunction.
|
virtual |
Write.
Implements runTimeCondition.
Definition at line 172 of file averageCondition.C.
References dictionary::add(), forAll, dictionary::found(), dictionary::set(), and dictionary::subDict().
|
static |
Definition at line 74 of file averageCondition.H.
|
protected |
Name of function object to retrieve data from.
Definition at line 82 of file averageCondition.H.
Referenced by averageCondition::apply().
|
protected |
List of fields on which to operate.
Definition at line 85 of file averageCondition.H.
Referenced by averageCondition::apply().
|
protected |
Satisfied when difference in mean values is less than this value.
Definition at line 88 of file averageCondition.H.
|
protected |
Averaging window.
Definition at line 91 of file averageCondition.H.
|
protected |
Averaging window type.
Definition at line 94 of file averageCondition.H.
|
protected |
Average time per field.
Definition at line 97 of file averageCondition.H.
Referenced by averageCondition::apply().
|
protected |
Reset the averaging process on restart flag.
Definition at line 100 of file averageCondition.H.
|
protected |
Number of start-up iterations before allowing satisfied checks.
Definition at line 103 of file averageCondition.H.
Referenced by averageCondition::apply().
|
protected |
Current iteration count.
Definition at line 106 of file averageCondition.H.
Referenced by averageCondition::apply().