33bool Foam::subModelBase::subModelBase::inLine()
const
44 properties_(properties),
58 const word& modelType,
63 properties_(properties),
74 const word& modelName,
81 modelName_(modelName),
82 properties_(properties),
93 modelName_(smb.modelName_),
94 properties_(smb.properties_),
96 baseName_(smb.baseName_),
97 modelType_(smb.modelType_),
143 bool def = coeffDict_.getOrDefault(
"defaultCoeffs",
false);
174 if (!modelName_.empty())
185 const word& entryName,
189 if (properties_.found(baseName_))
191 const dictionary& baseDict = properties_.subDict(baseName_);
193 if (inLine() && baseDict.found(modelName_))
195 const dictionary& modelDict = baseDict.subDict(modelName_);
196 dict = modelDict.subOrEmptyDict(entryName);
199 else if (baseDict.found(modelType_))
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,...
dictionary subOrEmptyDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX, const bool mandatory=false) const
Find and return a sub-dictionary as a copy, otherwise return an empty dictionary.
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
Find an entry (const access) with the given keyword.
A class for handling file names.
Base class for generic sub-models requiring to be read from dictionary. Provides a mechanism to read ...
const word modelType_
Type of the sub-model.
const word modelName_
Name of the sub-model.
const word & baseName() const
Return const access to the base name of the sub-model.
virtual void cacheFields(const bool store)
Cache dependent sub-model fields.
bool inLine() const
Flag to indicate whether data is/was read in-line.
virtual fileName localPath() const
Output directory.
virtual void write(Ostream &os) const
Write.
const dictionary & coeffDict() const
Return const access to the coefficients dictionary.
const dictionary & properties() const
Return const access to the properties dictionary.
bool getModelDict(const word &entryName, dictionary &dict) const
Retrieve dictionary, return true if set.
const dictionary coeffDict_
Coefficients dictionary.
const word baseName_
Name of the sub-model base class.
const dictionary dict_
Copy of dictionary used during construction.
const dictionary & dict() const
Return const access to the cloud dictionary.
const word & modelName() const
Return const access to the name of the sub-model.
const word & modelType() const
Return const access to the sub-model type.
virtual bool active() const
Return the model 'active' status - default active = true.
virtual bool defaultCoeffs(const bool printMsg) const
Returns true if defaultCoeffs is true and outputs on printMsg.
bool log
Flag to write log into Info.
subModelBase(dictionary &properties)
Construct null.
dictionary & properties_
Reference to properties dictionary e.g. for restart.
virtual bool writeTime() const
Flag to indicate when to write a property.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & indent(Ostream &os)
Indent stream.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.