mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Initial implementation for FO activation by trigger
This commit is contained in:
@ -78,6 +78,34 @@ Foam::dictionary& Foam::functionObjects::stateFunctionObject::propertyDict()
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObjects::stateFunctionObject::setTrigger
|
||||
(
|
||||
const label triggeri
|
||||
)
|
||||
{
|
||||
IOdictionary& stateDict = this->stateDict();
|
||||
|
||||
label oldTriggeri =
|
||||
stateDict.lookupOrDefault<label>("triggerIndex", labelMin);
|
||||
|
||||
if (triggeri > oldTriggeri)
|
||||
{
|
||||
stateDict.set("triggerIndex", triggeri);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Foam::label Foam::functionObjects::stateFunctionObject::getTrigger() const
|
||||
{
|
||||
const IOdictionary& stateDict = this->stateDict();
|
||||
|
||||
return stateDict.lookupOrDefault<label>("triggerIndex", labelMin);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObjects::stateFunctionObject::foundProperty
|
||||
(
|
||||
const word& entryName
|
||||
|
||||
Reference in New Issue
Block a user