33 bool Foam::subModelBase::subModelBase::inLine()
const 35 return (modelName_ != word::null);
44 properties_(properties),
49 log(properties.getOrDefault<bool>(
"log", true))
58 const word& modelType,
63 properties_(properties),
66 modelType_(modelType),
67 coeffDict_(
dict.subDict(modelType + dictExt)),
68 log(coeffDict_.getOrDefault<bool>(
"log", true))
74 const word& modelName,
81 modelName_(modelName),
82 properties_(properties),
85 modelType_(modelType),
87 log(coeffDict_.getOrDefault<bool>(
"log", true))
93 modelName_(smb.modelName_),
94 properties_(smb.properties_),
96 baseName_(smb.baseName_),
97 modelType_(smb.modelType_),
98 coeffDict_(smb.coeffDict_),
99 log(coeffDict_.getOrDefault<bool>(
"log", true))
143 bool def = coeffDict_.getOrDefault(
"defaultCoeffs",
false);
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_);
199 else if (baseDict.found(modelType_))
201 const dictionary& modelDict = baseDict.
subDict(modelType_);
virtual fileName localPath() const
Output directory.
const dictionary & properties() const
Return const access to the properties dictionary.
A class for handling file names.
Ostream & indent(Ostream &os)
Indent stream.
dimensionedScalar log(const dimensionedScalar &ds)
subModelBase(dictionary &properties)
Construct null.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Ostream & endl(Ostream &os)
Add newline and flush stream.
const word & modelName() const
Return const access to the name of the sub-model.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
const dictionary & dict() const
Return const access to the cloud dictionary.
virtual void write(Ostream &os) const
Write.
A class for handling words, derived from Foam::string.
bool getModelDict(const word &entryName, dictionary &dict) const
Retrieve dictionary, return true if set.
static const word null
An empty word.
const dictionary & coeffDict() const
Return const access to the coefficients dictionary.
const word & modelType() const
Return const access to the sub-model type.
virtual void cacheFields(const bool store)
Cache dependent sub-model fields.
OBJstream os(runTime.globalPath()/outputName)
virtual bool defaultCoeffs(const bool printMsg) const
Returns true if defaultCoeffs is true and outputs on printMsg.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
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. ...
Base class for generic sub-models requiring to be read from dictionary. Provides a mechanism to read ...
virtual bool writeTime() const
Flag to indicate when to write a property.
const word & baseName() const
Return const access to the base name of the sub-model.
messageStream Info
Information stream (stdout output on master, null elsewhere)
const word modelName_
Name of the sub-model.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
virtual bool active() const
Return the model 'active' status - default active = true.