Go to the documentation of this file.
34 const char* NamedEnum<outputFilterOutputControl::outputControls, 8>::
63 outputControl_(ocTimeStep),
65 outputTimeLastDump_(0),
82 const word controlName(prefix_ +
"Control");
83 const word intervalName(prefix_ +
"Interval");
87 outputControl_ = outputControlNames_.read(
dict.
lookup(controlName));
91 outputControl_ = ocTimeStep;
94 switch (outputControl_)
111 case ocAdjustableTime:
129 switch (outputControl_)
135 (outputInterval_ <= 1)
136 || !(time_.timeIndex() % outputInterval_)
143 if (time_.outputTime())
145 outputTimeLastDump_ ++;
146 return !(outputTimeLastDump_ % outputInterval_);
152 case ocAdjustableTime:
157 (time_.value() - time_.startTime().value())
158 + 0.5*time_.deltaTValue()
163 if (outputIndex > outputTimeLastDump_)
165 outputTimeLastDump_ = outputIndex;
178 if (outputIndex > outputTimeLastDump_)
180 outputTimeLastDump_ = outputIndex;
193 if (outputIndex > outputTimeLastDump_)
195 outputTimeLastDump_ = outputIndex;
203 scalar endTime = time_.endTime().value() - 0.5*time_.deltaTValue();
204 return time_.value() > endTime;
217 <<
"Undefined output control: "
218 << outputControlNames_[outputControl_] <<
nl
outputFilterOutputControl(const outputFilterOutputControl &)
Disallow default bitwise copy construct and assignment.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static const NamedEnum< outputControls, 8 > outputControlNames_
String representation of outputControls enums.
A class for handling words, derived from string.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
bool read(const char *, int32_t &)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
~outputFilterOutputControl()
Destructor.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
A list of keyword definitions, which are a keyword followed by any number of values (e....
bool output()
Flag to indicate whether to output.
errorManip< error > abort(error &err)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
void read(const dictionary &)
Read from dictionary.
Initialise the NamedEnum HashTable from the static list of names.