Go to the documentation of this file.
34 const Foam::word Foam::functionObjects::stateFunctionObject::resultsName_ =
49 return const_cast<IOdictionary&
>(time_.functionObjects().stateDict());
90 if (triggeri > oldTriggeri)
92 stateDict.
set(
"triggerIndex", triggeri);
110 const word& entryName
118 return baseDict.
found(entryName);
127 const word& entryName,
131 return getObjectDict(
name(), entryName,
dict);
137 const word& objectName,
138 const word& entryName,
144 if (stateDict.
found(objectName))
147 if (baseDict.
found(entryName) && baseDict.
isDict(entryName))
160 const word& entryName
163 return objectResultType(
name(), entryName);
169 const word& objectName,
170 const word& entryName
176 if (stateDict.
found(resultsName_))
180 if (resultsDict.
found(objectName))
184 for (
const entry& dEntry : objectDict)
188 if (
dict.found(entryName))
190 return dict.dictName();
203 return objectResultEntries(
name());
210 const word& objectName
217 if (stateDict.
found(resultsName_))
221 if (resultsDict.
found(objectName))
225 for (
const entry& dEntry : objectDict)
251 const word& objectName,
257 if (stateDict.
found(resultsName_))
261 if (resultsDict.
found(objectName))
267 os <<
" Type: " << dataFormat <<
nl;
273 os <<
" " << result <<
nl;
288 if (stateDict.
found(resultsName_))
294 for (
const word& objectName : allObjectNames)
296 os <<
"Object: " << objectName <<
endl;
298 writeResultEntries(objectName, os);
A keyword and a list of tokens is an 'entry'.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
dictionary & propertyDict()
Return access to the property dictionary.
A class for handling words, derived from Foam::string.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
const Time & time_
Reference to the time database.
IOdictionary & stateDict()
Virtual base class for function objects with a reference to Time.
const functionObjectList & functionObjects() const
Return the list of function objects.
bool setTrigger(const label triggeri)
Set the current trigger index.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word resultType(const word &entryName) const
Retrieve the result type.
stateFunctionObject(const stateFunctionObject &)=delete
No copy construct.
entry * set(entry *entryPtr)
Assign a new entry, overwriting any existing entry.
label getTrigger() const
Get the current trigger index.
bool getObjectDict(const word &objectName, const word &entryName, dictionary &dict) const
Set dictionary from named object, return true if set.
void writeAllResultEntries(Ostream &os) const
Write the results entries for all objects to stream.
word name(const complex &c)
Return string representation of complex.
DynamicList< T, SizeMin > & append(const T &val)
Append an element to the end of this list.
void transfer(List< T > &list)
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
bool foundProperty(const word &entryName) const
Return true if the property exists.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool getDict(const word &entryName, dictionary &dict) const
Set dictionary, return true if set.
const IOdictionary & stateDict() const
Return a const reference to the state dictionary.
word objectResultType(const word &objectName, const word &entryName) const
Return the type of result.
bool isDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Check if entry is found and is a sub-dictionary.
List< word > objectResultEntries() const
Retrieve the result entries.
static const word null
An empty word.
entry * add(entry *entryPtr, bool mergeEntry=false)
Add a new entry.
void writeResultEntries(Ostream &os) const
Write the results entries for all objects to stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
wordList sortedToc() const
Return the sorted table of contents.