60 stateFunctionObject& state
63 runTimeCondition(
name, obr,
dict, state),
64 duration_(
dict.get<scalar>(
"duration")),
67 resetOnRestart_(
dict.getOrDefault(
"resetOnRestart", false))
90 startTime_ = obr_.time().value();
94 scalar
delta = obr_.time().value() - startTime_;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
propsDict readIfPresent("fields", acceptFields)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Activated after a user-specified duration.
maxDurationCondition(const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state)
Constructor.
virtual bool apply()
Apply the condition.
bool initialised_
Initialisation flag.
scalar duration_
Duration.
Switch resetOnRestart_
Reset on restart (ignores any state information).
virtual void write()
Write.
virtual void reset()
Reset.
scalar startTime_
Time when the condition is activated.
Base class for run time conditions.
bool active_
On/off switch.
const objectRegistry & obr_
Reference to the object registry.
word name_
Condition name.
const dictionary & conditionDict() const
Return const access to the conditions dictionary.
runTimeCondition(const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state)
Constructor.
virtual const word & name() const
Return the condition name.
Base class for function objects, adding functionality to read/write state information (data required ...
Registry of regIOobjects.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
constexpr char nl
The newline '\n' character (0x0a).
static bool initialised_(false)