Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
runTimeCondition Class Referenceabstract

Base class for run time conditions. More...

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

Public Member Functions

 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 wordname () const
 Return the condition name. More...
 
virtual bool active () const
 Return the active flag. More...
 
virtual label groupID () const
 Return the group index. More...
 
virtual bool apply ()=0
 Apply the condition. More...
 
virtual void write ()=0
 Write. More...
 
virtual void reset ()=0
 Reset. More...
 

Static Public Member Functions

static autoPtr< runTimeConditionNew (const word &conditionName, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state)
 Selector. More...
 

Public Attributes

Switch log
 Switch to send output to Info. More...
 

Protected Member Functions

dictionarysetConditionDict ()
 Set the condition dictionary (create if necessary) More...
 
const dictionaryconditionDict () const
 Return const access to the conditions dictionary. More...
 
dictionaryconditionDict ()
 Return non-const access to the conditions dictionary. More...
 

Protected Attributes

word name_
 Condition name. More...
 
const objectRegistryobr_
 Reference to the object registry. More...
 
stateFunctionObjectstate_
 State. More...
 
bool active_
 On/off switch. More...
 
dictionaryconditionDict_
 Reference to the condition dictionary. More...
 
label groupID_
 Group index - if applied, all conditions in a group must be. More...
 

Detailed Description

Base class for run time conditions.

Source files

Definition at line 57 of file runTimeCondition.H.

Constructor & Destructor Documentation

◆ runTimeCondition()

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

Constructor.

Definition at line 71 of file runTimeCondition.C.

◆ ~runTimeCondition()

virtual ~runTimeCondition ( )
virtualdefault

Destructor.

Member Function Documentation

◆ setConditionDict()

Foam::dictionary & setConditionDict ( )
protected

Set the condition dictionary (create if necessary)

Definition at line 41 of file runTimeCondition.C.

References dictionary::add(), dictionary::found(), runTimeCondition::name_, stateFunctionObject::propertyDict(), runTimeCondition::state_, and dictionary::subDict().

Here is the call graph for this function:

◆ conditionDict() [1/2]

const Foam::dictionary & conditionDict ( ) const
protected

Return const access to the conditions dictionary.

Definition at line 55 of file runTimeCondition.C.

Referenced by averageCondition::apply().

Here is the caller graph for this function:

◆ conditionDict() [2/2]

Foam::dictionary & conditionDict ( )
protected

Return non-const access to the conditions dictionary.

Definition at line 62 of file runTimeCondition.C.

◆ TypeName()

TypeName ( "runTimeCondition"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
runTimeCondition  ,
dictionary  ,
(const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state)  ,
(name, obr, dict, state)   
)

Declare runtime constructor selection table.

◆ New()

Foam::autoPtr< Foam::functionObjects::runTimeControls::runTimeCondition > New ( const word conditionName,
const objectRegistry obr,
const dictionary dict,
stateFunctionObject state 
)
static

Selector.

Definition at line 28 of file runTimeConditionNew.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, and Foam::Info.

Here is the call graph for this function:

◆ name()

const Foam::word & name ( ) const
virtual

Return the condition name.

Definition at line 91 of file runTimeCondition.C.

◆ active()

bool active ( ) const
virtual

Return the active flag.

Definition at line 97 of file runTimeCondition.C.

Referenced by runTimeControl::execute().

Here is the caller graph for this function:

◆ groupID()

Foam::label groupID ( ) const
virtual

Return the group index.

Definition at line 104 of file runTimeCondition.C.

Referenced by runTimeControl::execute().

Here is the caller graph for this function:

◆ apply()

virtual bool apply ( )
pure virtual

Apply the condition.

Implemented in equationInitialResidualCondition, minMaxCondition, maxDurationCondition, averageCondition, equationMaxIterCondition, minTimeStepCondition, and noneCondition.

Referenced by runTimeControl::execute().

Here is the caller graph for this function:

◆ write()

virtual void write ( )
pure virtual

◆ reset()

virtual void reset ( )
pure virtual

Member Data Documentation

◆ name_

word name_
protected

◆ obr_

const objectRegistry& obr_
protected

Reference to the object registry.

Definition at line 72 of file runTimeCondition.H.

Referenced by minTimeStepCondition::apply(), equationMaxIterCondition::apply(), and maxDurationCondition::apply().

◆ state_

stateFunctionObject& state_
protected

State.

Definition at line 77 of file runTimeCondition.H.

Referenced by minMaxCondition::apply(), and runTimeCondition::setConditionDict().

◆ active_

bool active_
protected

◆ conditionDict_

dictionary& conditionDict_
protected

Reference to the condition dictionary.

Definition at line 87 of file runTimeCondition.H.

◆ groupID_

label groupID_
protected

Group index - if applied, all conditions in a group must be.

satisfied before condition is met

Definition at line 94 of file runTimeCondition.H.

◆ log

Switch to send output to Info.

Definition at line 172 of file runTimeCondition.H.


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