36 namespace functionObjects
38 namespace runTimeControls
64 duration_(
dict.
get<scalar>(
"duration")),
67 resetOnRestart_(
dict.getOrDefault(
"resetOnRestart", false))
90 startTime_ = obr_.time().value();
94 scalar
delta = obr_.time().value() - startTime_;
98 <<
" Completed " <<
delta <<
" out of " << duration_ <<
nl;
100 return delta >= duration_;
108 conditionDict().set(
"startTime", startTime_);
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
virtual void write()
Write.
static bool initialised_(false)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
scalar startTime_
Time when the condition is activated.
constexpr char nl
The newline '\n' character (0x0a)
Macros for easy insertion into run-time selection tables.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Switch resetOnRestart_
Reset on restart (ignores any state information)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
A class for handling words, derived from Foam::string.
Base class for run time conditions.
defineTypeNameAndDebug(averageCondition, 0)
virtual void reset()
Reset.
bool initialised_
Initialisation flag.
addToRunTimeSelectionTable(runTimeCondition, averageCondition, dictionary)
meshDefDict readIfPresent("polyMeshPatches", polyPatchNames)
Base class for function objects, adding functionality to read/write state information (data required ...
Registry of regIOobjects.
virtual bool apply()
Apply the condition.
const dictionary & conditionDict() const
Return const access to the conditions dictionary.
maxDurationCondition(const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state)
Constructor.