Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
averageCondition Class Reference

Average run time condition - satisfied when average does not change by more than a given value. More...

Inheritance diagram for averageCondition:
Inheritance graph
[legend]
Collaboration diagram for averageCondition:
Collaboration graph
[legend]

Public Types

enum  windowType { NONE, APPROXIMATE, EXACT }
 

Public Member Functions

 TypeName ("average")
 
 averageCondition (const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state)
 
virtual ~averageCondition ()=default
 
virtual bool apply ()
 
virtual void write ()
 
- Public Member Functions inherited from runTimeCondition
 TypeName ("runTimeCondition")
 
 declareRunTimeSelectionTable (autoPtr, runTimeCondition, dictionary,(const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state),(name, obr, dict, state))
 
 runTimeCondition (const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state)
 
virtual ~runTimeCondition ()=default
 
virtual const wordname () const
 
virtual bool active () const
 
virtual label groupID () const
 

Static Public Attributes

static const Enum< windowTypewindowTypeNames
 

Protected Member Functions

template<class Type >
void calc (const label fieldi, bool &satisfied, bool &processed)
 
- Protected Member Functions inherited from runTimeCondition
dictionarysetConditionDict ()
 
const dictionaryconditionDict () const
 
dictionaryconditionDict ()
 

Protected Attributes

word functionObjectName_
 
wordList fieldNames_
 
const scalar tolerance_
 
const scalar window_
 
windowType windowType_
 
List< scalar > totalTime_
 
Switch resetOnRestart_
 
label nIterStartUp_
 
label iter_
 
- Protected Attributes inherited from runTimeCondition
word name_
 
const objectRegistryobr_
 
stateFunctionObjectstate_
 
bool active_
 
dictionaryconditionDict_
 
label groupID_
 

Additional Inherited Members

- Static Public Member Functions inherited from runTimeCondition
static autoPtr< runTimeConditionNew (const word &conditionName, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state)
 
- Public Attributes inherited from runTimeCondition
Switch log
 

Detailed Description

Average run time condition - satisfied when average does not change by more than a given value.

Source files

Definition at line 55 of file averageCondition.H.

Member Enumeration Documentation

◆ windowType

enum windowType
strong
Enumerator
NONE 
APPROXIMATE 
EXACT 

Definition at line 63 of file averageCondition.H.

Constructor & Destructor Documentation

◆ averageCondition()

averageCondition ( const word name,
const objectRegistry obr,
const dictionary dict,
stateFunctionObject state 
)

Definition at line 55 of file averageCondition.C.

References forAll, dictionary::found(), dictionary::readIfPresent(), dictionary::set(), and dictionary::subDict().

Here is the call graph for this function:

◆ ~averageCondition()

virtual ~averageCondition ( )
virtualdefault

Member Function Documentation

◆ calc()

void calc ( const label  fieldi,
bool satisfied,
bool processed 
)
protected

Definition at line 29 of file averageConditionTemplates.C.

References Foam::constant::atomic::alpha, beta(), LList::cbegin(), delta, dict, Log, Foam::mag(), Foam::nl, FIFOStack< T >::pop(), and FIFOStack< T >::push().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "average"  )

◆ apply()

bool apply ( )
virtual

◆ write()

void write ( )
virtual

Implements runTimeCondition.

Definition at line 165 of file averageCondition.C.

References dictionary::add(), forAll, dictionary::found(), dictionary::set(), and dictionary::subDict().

Here is the call graph for this function:

Member Data Documentation

◆ windowTypeNames

Definition at line 70 of file averageCondition.H.

◆ functionObjectName_

word functionObjectName_
protected

Definition at line 78 of file averageCondition.H.

Referenced by averageCondition::apply().

◆ fieldNames_

wordList fieldNames_
protected

Definition at line 81 of file averageCondition.H.

Referenced by averageCondition::apply().

◆ tolerance_

const scalar tolerance_
protected

Definition at line 84 of file averageCondition.H.

◆ window_

const scalar window_
protected

Definition at line 87 of file averageCondition.H.

◆ windowType_

windowType windowType_
protected

Definition at line 90 of file averageCondition.H.

◆ totalTime_

List<scalar> totalTime_
protected

Definition at line 93 of file averageCondition.H.

Referenced by averageCondition::apply().

◆ resetOnRestart_

Switch resetOnRestart_
protected

Definition at line 96 of file averageCondition.H.

◆ nIterStartUp_

label nIterStartUp_
protected

Definition at line 99 of file averageCondition.H.

Referenced by averageCondition::apply().

◆ iter_

label iter_
protected

Definition at line 102 of file averageCondition.H.

Referenced by averageCondition::apply().


The documentation for this class was generated from the following files: