33const Foam::word Foam::functionObjects::properties::resultsName_ =
34 SHA1(
"results").str();
61 const word& objectName
64 return found(objectName);
70 const word& objectName
73 if (!
found(objectName))
78 return subDict(objectName);
84 remove(
"triggerIndex");
102 if (triggeri != getTrigger())
104 set(
"triggerIndex", triggeri);
116 const word& objectName,
117 const word& entryName
120 if (
found(objectName))
122 const dictionary& baseDict = subDict(objectName);
123 return baseDict.
found(entryName);
132 const word& objectName,
133 const word& entryName,
137 if (
found(objectName))
139 const dictionary& baseDict = subDict(objectName);
141 if (baseDict.
found(entryName) && baseDict.
isDict(entryName))
154 const word& objectName
157 if (
found(resultsName_))
159 return subDict(resultsName_).found(objectName);
168 if (
found(resultsName_))
170 return subDict(resultsName_).sortedToc();
179 const word& objectName,
180 const word& entryName
183 if (
found(resultsName_))
185 const dictionary& resultsDict = subDict(resultsName_);
187 if (resultsDict.
found(objectName))
191 for (
const entry& dEntry : objectDict)
195 if (
dict.found(entryName))
209 const word& objectName,
210 const word& entryName
213 if (
found(resultsName_))
215 const dictionary& resultsDict = subDict(resultsName_);
217 if (resultsDict.
found(objectName))
221 for (
const entry& dEntry : objectDict)
225 if (
dict.found(entryName))
227 return dict.dictName();
239 const word& objectName
244 if (
found(resultsName_))
246 const dictionary& resultsDict = subDict(resultsName_);
248 if (resultsDict.
found(objectName))
252 for (
const entry& dEntry : objectDict)
270 const word& objectName,
274 if (
found(resultsName_))
276 const dictionary& resultsDict = subDict(resultsName_);
278 if (resultsDict.
found(objectName))
284 os <<
" Type: " << dataFormat <<
nl;
290 os <<
" " << result <<
nl;
303 if (
found(resultsName_))
305 const dictionary& resultsDict = subDict(resultsName_);
309 os <<
"Object: " << objectName <<
endl;
311 writeResultEntries(objectName,
os);
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void append(const T &val)
Copy append an element to the end of this list.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
void transfer(List< T > &list)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
wordList sortedToc() const
Return the sorted table of contents.
bool isDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Check if entry is found and is a sub-dictionary.
A keyword and a list of tokens is an 'entry'.
Sums a given list of (at least two or more) fields and outputs the result into a new field,...
Storage for function object properties, derived from IOdictionary. Provides functionality to read/wri...
wordList objectNames() const
Return list of object names.
dictionary & getObjectDict(const word &objectName)
Get dictionary for named object. Creates one if required.
bool setTrigger(const label triggeri)
Set new trigger index.
bool foundObjectProperty(const word &objectName, const word &entryName) const
Return true if the property exists.
bool hasResultObjectEntry(const word &objectName, const word &entryName) const
word objectResultType(const word &objectName, const word &entryName) const
Return the type of result.
void writeAllResultEntries(Ostream &os) const
Write the results entries for all objects to stream.
void writeResultEntries(Ostream &os) const
Write the results entries for all objects to stream.
bool hasResultObject(const word &objectName) const
Return true if the object with objectName exists in results.
bool hasObjectDict(const word &objectName) const
Return true if the object with objectName exists.
void clearTrigger()
Remove the trigger index from the properties.
label getTrigger() const
Get the current trigger index.
wordList objectResultNames() const
Return list of objects with results.
wordList objectResultEntries() const
Retrieve the result entries.
A class for handling words, derived from Foam::string.
static const word null
An empty word.
OBJstream os(runTime.globalPath()/outputName)
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
List< word > wordList
A List of words.
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr char nl
The newline '\n' character (0x0a)
propsDict readIfPresent("fields", acceptFields)