Go to the documentation of this file.
39 setEnv(
"FOAM_APPLICATION", application,
false);
73 objects[i]->readData(is);
80 objects[i]->readData(iter().stream());
90 Info<<
"Overriding OptimisationSwitches according to "
96 "OptimisationSwitches"
100 const word&
name = iter().keyword();
117 objects[i]->readData(is);
124 objects[i]->readData(iter().stream());
136 Info<<
"Overriding DimensionedConstants according to "
156 objects[i]->readData(dummyIs);
159 objects[i]->writeData(
Info);
169 Info<<
"Overriding DimensionSets according to "
190 objects[i]->readData(is);
217 <<
"writeInterval < 1 for writeControl timeStep"
239 "secondaryWriteInterval",
251 <<
"secondaryWriteInterval < 1"
252 <<
" for secondaryWriteControl timeStep"
296 * oldSecondaryWriteInterval
312 <<
", should be >= 0, setting to 0"
324 <<
"invalid value for secondaryPurgeWrite "
326 <<
", should be >= 0, setting to 0"
337 if (formatName ==
"general")
341 else if (formatName ==
"fixed")
345 else if (formatName ==
"scientific")
352 <<
"unsupported time format " << formatName
438 if (controlDict_.regIOobject::read())
452 if (runTimeModifiable_)
458 monitorPtr_().updateStates
470 if (controlDict_.readIfModified())
473 functionObjects_.read();
478 if (registryModified)
511 timeDict.
add(
"value",
timeName(timeToUserTime(value()), maxPrecision_));
512 timeDict.
add(
"name",
string(tmName));
513 timeDict.
add(
"index", timeIndex_);
514 timeDict.
add(
"deltaT", timeToUserTime(deltaT_));
515 timeDict.
add(
"deltaT0", timeToUserTime(deltaT0_));
517 timeDict.regIOobject::writeObject(fmt, ver, cmp);
526 if (primaryOutputTime_ && purgeWrite_)
528 previousOutputTimes_.push(tmName);
530 while (previousOutputTimes_.size() > purgeWrite_)
538 && secondaryOutputTime_
539 && secondaryPurgeWrite_
543 previousSecondaryOutputTimes_.push(tmName);
547 previousSecondaryOutputTimes_.size()
548 > secondaryPurgeWrite_
555 previousSecondaryOutputTimes_.pop()
573 primaryOutputTime_ =
true;
581 stopAt_ = saWriteNow;
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static fmtflags format_
Time directory name format.
A class for handling words, derived from string.
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType) const
Write using given format, version and compression.
#define forAll(list, i)
Loop across all elements in list.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
label secondaryPurgeWrite_
compressionType
Enumeration for the format of data in the stream.
label watchIndex() const
Return file-monitoring handle.
static bool & parRun()
Is this a parallel run?
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const T * lookupPtr(const word &) const
Find and return an entry if present, otherwise return NULL.
prefixOSstream Perr(cerr, "Perr")
const word & name() const
Return const reference to name.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool setEnv(const word &name, const std::string &value, const bool overwrite)
Set an environment variable.
const Type & value() const
Return const reference to value.
void writeOnce()
Write the objects once (one shot) and continue the run.
scalar secondaryWriteInterval_
virtual bool read()
Read control dictionary, update controls and time.
string str() const
Return the string.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
bool writeAndEnd()
Write the objects now (not at end of iteration) and end the run.
virtual word timeName() const
Return current time name.
simpleObjectRegistry & optimisationObjects()
Get access to registered optimisation switch objects.
word graphFormat_
Default graph format.
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.
simpleObjectRegistry & debugObjects()
Get access to registered debug switch objects.
dictionary & dimensionSystems()
Top level dictionary.
OSstream Serr(cerr, "Serr")
bool merge(const dictionary &)
Merge entries from the given dictionary.
static const NamedEnum< stopAtControls, 4 > stopAtControlNames_
static streamFormat formatEnum(const word &)
Return stream format of given format name.
simpleObjectRegistry & dimensionSetObjects()
Get access to registered dimensionSets switch objects.
writeControls secondaryWriteControl_
Switch runTimeModifiable_
Is runtime modification of dictionaries allowed?
A list of keyword definitions, which are a keyword followed by any number of values (e....
IOstream::compressionType writeCompression_
Default output compression.
IOdictionary controlDict_
The controlDict.
simpleObjectRegistry & dimensionedConstantObjects()
Get access to registered dimensionedConstant switch objects.
Input from memory buffer stream.
label secondaryOutputTimeIndex_
static compressionType compressionEnum(const word &)
Return compression of given compression name.
static int precision_
Time directory name precision.
errorManipArg< error, int > exit(error &err, const int errNo=1)
IOstream::streamFormat writeFormat_
Default write option.
virtual bool modified() const
Return true if any of the object's files have been modified.
void readModifiedObjects()
Read the objects that have been modified.
virtual int precision() const
Get precision of output field.
static fileCheckTypes fileModificationChecking
virtual void readDict()
Read the control dictionary and set the write controls etc.
Enum read(Istream &) const
Read a word from Istream and return the corresponding.
void readModifiedObjects()
Read the objects that have been modified.
const word & name() const
Name function is needed to disambiguate those inherited.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
static unsigned int defaultPrecision()
Return the default precision.
prefixOSstream Pout(cout, "Pout")
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp) const
Write the objects.
Output to memory buffer stream.
bool removeWatch(const label) const
Remove watch on a file (using handle)
bool writeNow()
Write the objects now (not at end of iteration) and continue.
static const NamedEnum< writeControls, 5 > writeControlNames_
IOstream::versionNumber writeVersion_
Default output file format version number.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
dictionary & dimensionedConstants()
OSstream Sout(cout, "Sout")
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
fileName path() const
Return complete path.
writeControls writeControl_
#define WarningInFunction
Report a warning using Foam::Warning.
bool rmDir(const fileName &)
Remove a dirctory and its contents.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
Dictionary reading and supplying the dimensioned constants used within OpenFOAM, particularly for the...
Object registry for simpleRegIOobject. Maintains ordering.
streamFormat
Enumeration for the format of data in the stream.