mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Function objects - updated logic to determine whether or not to instantiate a time-based function object. Fixes #439
This commit is contained in:
@ -93,6 +93,24 @@ Foam::functionObjects::timeControl::timeControl
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::functionObjects::timeControl::entriesPresent(const dictionary& dict)
|
||||
{
|
||||
if
|
||||
(
|
||||
Foam::timeControl::entriesPresent(dict, "write")
|
||||
|| Foam::timeControl::entriesPresent(dict, "output") // backwards compat
|
||||
|| Foam::timeControl::entriesPresent(dict, "execute")
|
||||
|| dict.found("timeStart")
|
||||
|| dict.found("timeEnd")
|
||||
)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObjects::timeControl::execute()
|
||||
{
|
||||
if (active() && (postProcess || executeControl_.execute()))
|
||||
|
||||
Reference in New Issue
Block a user