mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: added functionObject::execute(int) method
- this is a provision for defining execute actions that can be called largely independently of the normal time-loop constraints. This can be useful to provide hooks for sub-cycling, or to define an action that can be triggered manually or on some other event.
This commit is contained in:
@ -450,6 +450,18 @@ bool Foam::functionObjects::timeControl::execute()
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObjects::timeControl::execute(const label subIndex)
|
||||
{
|
||||
if (active())
|
||||
{
|
||||
// Call underlying function object directly
|
||||
foPtr_->execute(subIndex);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObjects::timeControl::write()
|
||||
{
|
||||
if (active() && (postProcess || writeControl_.execute()))
|
||||
@ -726,10 +738,8 @@ bool Foam::functionObjects::timeControl::read(const dictionary& dict)
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user