52Foam::functionObjects::setTimeStepFunctionObject::setTimeStepFunctionObject
72 static label index = -1;
81 const_cast<Time&
>(
time_).setDeltaT(newDeltaT,
false);
95 timeStepPtr_ = Function1<scalar>::New(
"deltaT",
dict, &time_);
98 if (!time_.controlDict().getOrDefault(
"adjustTimeStep",
false))
101 <<
"Need to set 'adjustTimeStep' true to allow timestep control"
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
scalar timeOutputValue() const
Return the current user-time value. (ie, after applying any timeToUserTime() conversion).
label timeIndex() const noexcept
Return the current time index.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base-class for Time/database function objects.
const word & name() const noexcept
Return the name of this functionObject.
virtual bool read(const dictionary &dict)
Read and set the function object if its data have changed.
This function object overrides the calculation time step.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
virtual bool adjustTimeStep()
Called at the end of Time::adjustDeltaT() if adjustTime is true.
virtual bool execute()
Execute the function-object operations (no-op).
virtual bool write()
Write the function-object results (no-op).
const Time & time_
Reference to the time database.
timeFunctionObject(const timeFunctionObject &)=delete
No copy construct.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).