36 namespace functionObjects
45 void Foam::functionObjects::timeControl::readControls(
const dictionary&
dict)
47 dict.readIfPresent(
"startTime",
time().userUnits(), startTime_);
48 dict.readIfPresent(
"endTime",
time().userUnits(), endTime_);
52 bool Foam::functionObjects::timeControl::active()
const
55 time_.value() >= startTime_
56 && time_.value() <= endTime_;
73 executeControl_(t,
dict,
"execute"),
74 writeControl_(t,
dict,
"write"),
87 return foPtr_->fields();
93 return foPtr_->executeAtStart();
104 || executeControl_.execute()
105 || (executeAtStart() && time_.timeIndex() == time_.startTimeIndex())
123 || writeControl_.execute()
124 || (executeAtStart() && time_.timeIndex() == time_.startTimeIndex())
137 if (active() && (executeControl_.execute() || writeControl_.execute()))
150 executeControl_.timeToNextAction(),
151 writeControl_.timeToNextAction()
158 writeControl_.read(
dict);
159 executeControl_.read(
dict);
176 foPtr_->movePoints(mesh);
188 foPtr_->topoChange(map);
200 foPtr_->mapMesh(map);
212 foPtr_->distribute(map);
Macros for easy insertion into run-time selection tables.
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 any number of values (e....
Abstract base-class for Time/database functionObjects.
General time control for functionObjects.
const Time & time() const
Return time database.
virtual wordList fields() const
Return the list of fields required.
timeControl(const word &name, const Time &, const dictionary &)
Construct from components.
virtual bool executeAtStart() const
Return true if the functionObject should be executed.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual void movePoints(const polyMesh &mesh)
Update topology using the given map.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual scalar timeToNextAction()
Return the time to the next execute or write.
virtual bool execute()
Called at each ++ or += of the time-loop.
virtual void topoChange(const polyTopoChangeMap &map)
Update topology using the given map.
virtual bool write()
Called at each ++ or += of the time-loop.
virtual bool end()
Called when Time::run() determines that the time-loop exits.
virtual bool read(const dictionary &)
Read and set the function object if its data have changed.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Mesh consisting of general polyhedral cells.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
void read(const dictionary &)
Read from dictionary.
A class for handling words, derived from string.
defineTypeNameAndDebug(adjustTimeStepToCombustion, 0)
word name(const bool)
Return a word representation of a bool.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)