35 namespace functionObjects
44 void Foam::functionObjects::timeControl::readControls()
46 dict_.readIfPresent(
"timeStart", timeStart_);
47 dict_.readIfPresent(
"timeEnd", timeEnd_);
48 dict_.readIfPresent(
"nStepsToStartTimeChange", nStepsToStartTimeChange_);
52 bool Foam::functionObjects::timeControl::active()
const 55 time_.value() >= timeStart_
56 && time_.value() <= timeEnd_;
62 Foam::functionObjects::timeControl::timeControl
74 nStepsToStartTimeChange_
78 executeControl_(t, dict,
"execute"),
79 writeControl_(t, dict,
"write"),
90 if (active() && (postProcess || executeControl_.execute()))
101 if (active() && (postProcess || writeControl_.execute()))
112 if (active() && (executeControl_.execute() || writeControl_.execute()))
130 const label writeTimeIndex = writeControl_.executionIndex();
131 const scalar writeInterval = writeControl_.interval();
137 (writeTimeIndex + 1)*writeInterval
138 - (time_.value() - time_.startTime().value())
155 writeControl_.read(dict);
156 executeControl_.read(dict);
175 foPtr_->updateMesh(mpm);
187 foPtr_->movePoints(mesh);
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
virtual bool execute()
Called at each ++ or += of the time-loop.
Abstract base-class for Time/database function objects.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Macros for easy insertion into run-time selection tables.
virtual bool write()
Called at each ++ or += of the time-loop.
A class for handling words, derived from string.
virtual void updateMesh(const mapPolyMesh &mpm)
Update for changes of mesh.
virtual scalar timeToNextWrite()
Return the time to the next write.
virtual void movePoints(const polyMesh &mesh)
Update for changes of mesh.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
static autoPtr< functionObject > New(const word &name, const Time &, const dictionary &)
Select from dictionary, based on its "type" entry.
Adjust time step for execution.
Mesh consisting of general polyhedral cells.
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
virtual bool read(const dictionary &)
Read and set the function object if its data have changed.
virtual bool end()
Called when Time::run() determines that the time-loop exits.