39 setEnv(
"FOAM_APPLICATION", application,
false);
47 if (controlDict_.
found(
"DebugSwitches"))
49 Info<<
"Overriding DebugSwitches according to " << controlDict_.
name()
73 objects[i]->readData(is);
80 objects[i]->readData(iter().stream());
88 if (controlDict_.
found(
"OptimisationSwitches"))
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());
134 if (controlDict_.
found(
"DimensionedConstants"))
136 Info<<
"Overriding DimensionedConstants according to " 142 controlDict_.
subDict(
"DimensionedConstants")
156 objects[i]->readData(dummyIs);
159 objects[i]->writeData(
Info);
167 if (controlDict_.
found(
"DimensionSets"))
169 Info<<
"Overriding DimensionSets according to " 190 objects[i]->readData(is);
201 if (controlDict_.
found(
"writeControl"))
205 controlDict_.
lookup(
"writeControl")
216 <<
"writeInterval < 1 for writeControl timeStep" 253 <<
", should be >= 0, setting to 0" 260 if (controlDict_.
found(
"timeFormat"))
262 const word formatName(controlDict_.
lookup(
"timeFormat"));
264 if (formatName ==
"general")
268 else if (formatName ==
"fixed")
272 else if (formatName ==
"scientific")
279 <<
"unsupported time format " << formatName
288 if (controlDict_.
found(
"stopAt"))
308 if (controlDict_.
found(
"writeVersion"))
312 controlDict_.
lookup(
"writeVersion")
316 if (controlDict_.
found(
"writeFormat"))
320 controlDict_.
lookup(
"writeFormat")
324 if (controlDict_.
found(
"writePrecision"))
344 if (controlDict_.
found(
"writeCompression"))
348 controlDict_.
lookup(
"writeCompression")
353 controlDict_.
readIfPresent(
"runTimeModifiable", runTimeModifiable_);
355 if (!runTimeModifiable_ && controlDict_.
watchIndex() != -1)
365 if (controlDict_.regIOobject::read())
379 if (runTimeModifiable_)
385 monitorPtr_().updateStates
400 functionObjects_.
read();
405 if (registryModified)
432 timeDict.
add(
"name",
string(tmName));
437 return timeDict.regIOobject::writeObject
bool read()
Read and set the function objects if their data have changed.
string str() const
Return the string.
#define forAll(list, i)
Loop across all elements in list.
static streamFormat formatEnum(const word &)
Return stream format of given format name.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static compressionType compressionEnum(const word &)
Return compression of given compression name.
bool writeAndEnd()
Write the objects now (not at end of iteration) and end the run.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void readModifiedObjects()
Read the objects that have been modified.
Dictionary reading and supplying the dimensioned constants used within OpenFOAM, particularly for the...
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual word timeName() const
Return current time name.
set endTime to stop immediately w/ writing
static unsigned int defaultPrecision()
Return the default precision.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
label watchIndex() const
Return file-monitoring handle.
static fmtflags format_
Time directory name format.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const scalar & value() const
Return const reference to value.
OSstream Serr(cerr,"Serr")
virtual scalar timeToUserTime(const scalar t) const
Convert the real-time (s) into user-time (e.g. CA deg)
simpleObjectRegistry & debugObjects()
Get access to registered debug switch objects.
bool writeTime() const
Return true if this is a write time.
writeControls writeControl_
dictionary & dimensionedConstants()
bool removeWatch(const label) const
Remove watch on a file (using handle)
simpleObjectRegistry & optimisationObjects()
Get access to registered optimisation switch objects.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
static const int maxPrecision_
Maximum time directory name precision.
OSstream Sout(cout,"Sout")
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
virtual int precision() const
Get precision of output field.
fileName path() const
Return complete path.
static fileCheckTypes fileModificationChecking
const word & name() const
Return const reference to name.
static const NamedEnum< stopAtControls, 4 > stopAtControlNames_
virtual bool modified() const
Return true if any of the object's files have been modified.
static int precision_
Time directory name precision.
A class for handling words, derived from string.
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp) const
Write the objects.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
virtual bool readIfModified()
Read object if modified (as set by call to modified)
streamFormat
Enumeration for the format of data in the stream.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
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.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
compressionType
Enumeration for the format of data in the stream.
bool rmDir(const fileName &)
Remove a dirctory and its contents.
prefixOSstream Pout(cout,"Pout")
FIFOStack< word > previousWriteTimes_
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType) const
Write using given format, version and compression.
virtual void readDict()
Read the control dictionary and set the write controls etc.
static const NamedEnum< writeControls, 5 > writeControlNames_
prefixOSstream Perr(cerr,"Perr")
void readModifiedObjects()
Read the objects that have been modified.
simpleObjectRegistry & dimensionSetObjects()
Get access to registered dimensionSets switch objects.
void writeOnce()
Write the objects once (one shot) and continue the run.
dictionary & dimensionSystems()
Top level dictionary.
static bool & parRun()
Is this a parallel run?
virtual bool read()
Read control dictionary, update controls and time.
#define WarningInFunction
Report a warning using Foam::Warning.
static const versionNumber currentVersion
Current version number.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Object registry for simpleRegIOobject. Maintains ordering.
stop when Time reaches the prescribed endTime
Input from memory buffer stream.
simpleObjectRegistry & dimensionedConstantObjects()
Get access to registered dimensionedConstant switch objects.
virtual bool write() const
Write using setting from DB.
bool merge(const dictionary &)
Merge entries from the given dictionary.
virtual bool writeTimeDict() const
Write time dictionary to the <time>/uniform directory.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Enum read(Istream &) const
Read a word from Istream and return the corresponding.
Output to memory buffer stream.
const T * lookupPtr(const word &) const
Find and return an entry if present, otherwise return NULL.
bool setEnv(const word &name, const std::string &value, const bool overwrite)
Set an environment variable.
bool writeNow()
Write the objects now (not at end of iteration) and continue.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.