Base class for run time conditions. More...
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 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... | |
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< runTimeCondition > | New (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 | |
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 | 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... | |
Base class for run time conditions.
Definition at line 57 of file runTimeCondition.H.
runTimeCondition | ( | const word & | name, |
const objectRegistry & | obr, | ||
const dictionary & | dict, | ||
stateFunctionObject & | state | ||
) |
Constructor.
Definition at line 71 of file runTimeCondition.C.
|
virtualdefault |
Destructor.
|
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().
|
protected |
Return const access to the conditions dictionary.
Definition at line 55 of file runTimeCondition.C.
Referenced by averageCondition::apply().
|
protected |
Return non-const access to the conditions dictionary.
Definition at line 62 of file runTimeCondition.C.
TypeName | ( | "runTimeCondition" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
runTimeCondition | , | ||
dictionary | , | ||
(const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state) | , | ||
(name, obr, dict, state) | |||
) |
Declare runtime constructor selection table.
|
static |
Selector.
Definition at line 28 of file runTimeConditionNew.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, and Foam::Info.
|
virtual |
Return the condition name.
Definition at line 91 of file runTimeCondition.C.
|
virtual |
Return the active flag.
Definition at line 97 of file runTimeCondition.C.
Referenced by runTimeControl::execute().
|
virtual |
Return the group index.
Definition at line 104 of file runTimeCondition.C.
Referenced by runTimeControl::execute().
|
pure virtual |
Apply the condition.
Implemented in equationInitialResidualCondition, minMaxCondition, maxDurationCondition, averageCondition, equationMaxIterCondition, minTimeStepCondition, and noneCondition.
Referenced by runTimeControl::execute().
|
pure virtual |
Write.
Implemented in equationInitialResidualCondition, minMaxCondition, maxDurationCondition, averageCondition, equationMaxIterCondition, minTimeStepCondition, and noneCondition.
|
pure virtual |
Reset.
Implemented in equationInitialResidualCondition, minMaxCondition, maxDurationCondition, averageCondition, equationMaxIterCondition, minTimeStepCondition, and noneCondition.
Referenced by runTimeControl::execute().
|
protected |
Condition name.
Definition at line 67 of file runTimeCondition.H.
Referenced by equationMaxIterCondition::apply(), maxDurationCondition::apply(), and runTimeCondition::setConditionDict().
|
protected |
Reference to the object registry.
Definition at line 72 of file runTimeCondition.H.
Referenced by minTimeStepCondition::apply(), equationMaxIterCondition::apply(), and maxDurationCondition::apply().
|
protected |
State.
Definition at line 77 of file runTimeCondition.H.
Referenced by minMaxCondition::apply(), and runTimeCondition::setConditionDict().
|
protected |
On/off switch.
Definition at line 82 of file runTimeCondition.H.
Referenced by minTimeStepCondition::apply(), equationMaxIterCondition::apply(), averageCondition::apply(), maxDurationCondition::apply(), and minMaxCondition::apply().
|
protected |
Reference to the condition dictionary.
Definition at line 87 of file runTimeCondition.H.
|
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.
Switch to send output to Info.
Definition at line 172 of file runTimeCondition.H.