A list of keyword definitions, which are a keyword followed by a number of values (eg, words and numbers) or by a sub-dictionary. Since the dictionary format is used extensively throughout OpenFOAM for input/output files, there are many examples of its use. More...
Classes | |
class | Searcher |
Generic const/non-const dictionary entry searcher. More... | |
Public Types | |
typedef Searcher< true > | const_searcher |
Searcher with const access. More... | |
typedef Searcher< false > | searcher |
Searcher with non-const access. More... | |
Public Member Functions | |
ClassName ("dictionary") | |
dictionary () | |
Default construct, a top-level empty dictionary. More... | |
dictionary (const fileName &name) | |
Construct top-level empty dictionary with given name. More... | |
dictionary (const fileName &name, const dictionary &parentDict, Istream &is, bool keepHeader=false) | |
dictionary (Istream &is) | |
dictionary (Istream &is, bool keepHeader) | |
dictionary (const dictionary &parentDict, const dictionary &dict) | |
Copy construct given the parent dictionary. More... | |
dictionary (const dictionary &dict) | |
Copy construct top-level dictionary. More... | |
dictionary (const dictionary *dict) | |
Construct top-level dictionary as copy from pointer to dictionary. More... | |
dictionary (const dictionary &parentDict, dictionary &&dict) | |
Move construct for given parent dictionary. More... | |
dictionary (dictionary &&dict) | |
Move construct top-level dictionary. More... | |
autoPtr< dictionary > | clone () const |
Construct and return clone. More... | |
virtual | ~dictionary () |
Destructor. More... | |
const fileName & | name () const |
The dictionary name. More... | |
fileName & | name () |
The dictionary name for modification (use with caution). More... | |
word | dictName () const |
The local dictionary name (final part of scoped name) More... | |
const dictionary & | parent () const |
Return the parent dictionary. More... | |
const dictionary & | topDict () const |
Return the top of the tree. More... | |
label | startLineNumber () const |
Return line number of first token in dictionary. More... | |
label | endLineNumber () const |
Return line number of last token in dictionary. More... | |
SHA1Digest | digest () const |
Return the SHA1 digest of the dictionary contents. More... | |
tokenList | tokens () const |
Return the dictionary as a list of tokens. More... | |
bool | found (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Search for an entry (const access) with the given keyword. More... | |
entry * | findEntry (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) |
Find for an entry (non-const access) with the given keyword. More... | |
const entry * | findEntry (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Find an entry (const access) with the given keyword. More... | |
const entry * | findScoped (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Search for a scoped entry (const access) with the given keyword. More... | |
dictionary * | findDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) |
Find and return a sub-dictionary pointer if present. More... | |
const dictionary * | findDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Find and return a sub-dictionary pointer if present. More... | |
const entry & | lookupEntry (const word &keyword, enum keyType::option matchOpt) const |
Search for an entry (const access) with the given keyword. More... | |
ITstream & | lookup (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
template<class T > | |
T | get (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
template<class T > | |
T | getOrDefault (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const |
template<class T > | |
T | getOrAdd (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) |
template<class T > | |
bool | readEntry (const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const |
template<class T > | |
bool | readIfPresent (const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const |
template<class T , class Predicate > | |
T | getCheck (const word &keyword, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) const |
template<class T , class Predicate > | |
T | getCheckOrDefault (const word &keyword, const T &deflt, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) const |
template<class T , class Predicate > | |
T | getCheckOrAdd (const word &keyword, const T &deflt, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) |
template<class T , class Predicate > | |
bool | readCheck (const word &keyword, T &val, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const |
template<class T , class Predicate > | |
bool | readCheckIfPresent (const word &keyword, T &val, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) const |
bool | isDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Check if entry is found and is a sub-dictionary. More... | |
const dictionary & | subDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Find and return a sub-dictionary. More... | |
dictionary & | subDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) |
Find and return a sub-dictionary for manipulation. More... | |
dictionary & | subDictOrAdd (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) |
Find and return a sub-dictionary for manipulation. More... | |
dictionary | subOrEmptyDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX, const bool mandatory=false) const |
const dictionary & | optionalSubDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Find and return a sub-dictionary, otherwise return this dictionary. More... | |
wordList | toc () const |
Return the table of contents. More... | |
wordList | sortedToc () const |
Return the sorted table of contents. More... | |
template<class Compare > | |
wordList | sortedToc (const Compare &comp) const |
Return table of contents sorted using the specified comparator. More... | |
List< keyType > | keys (bool patterns=false) const |
Return the list of available keys or patterns. More... | |
bool | substituteKeyword (const word &keyword, bool mergeEntry=false) |
Substitute the given keyword (which is prefixed by '$') More... | |
bool | substituteScopedKeyword (const word &keyword, bool mergeEntry=false) |
Substitute the given scoped keyword (which is prefixed by '$') More... | |
entry * | add (entry *entryPtr, bool mergeEntry=false) |
Add a new entry. More... | |
entry * | add (const entry &e, bool mergeEntry=false) |
Add an entry. More... | |
entry * | add (const keyType &k, const word &v, bool overwrite=false) |
Add a word entry. More... | |
entry * | add (const keyType &k, const string &v, bool overwrite=false) |
Add a string entry. More... | |
entry * | add (const keyType &k, const label v, bool overwrite=false) |
Add a label entry. More... | |
entry * | add (const keyType &k, const scalar v, bool overwrite=false) |
Add a scalar entry. More... | |
entry * | add (const keyType &k, const dictionary &d, bool mergeEntry=false) |
Add a dictionary entry. More... | |
template<class T > | |
entry * | add (const keyType &k, const T &v, bool overwrite=false) |
Add a T entry. More... | |
entry * | set (entry *entryPtr) |
Assign a new entry, overwriting any existing entry. More... | |
entry * | set (const entry &e) |
Assign a new entry, overwriting any existing entry. More... | |
entry * | set (const keyType &k, const dictionary &v) |
Assign a dictionary entry, overwriting any existing entry. More... | |
template<class T > | |
entry * | set (const keyType &k, const T &v) |
Assign a T entry, overwriting any existing entry. More... | |
bool | remove (const word &keyword) |
Remove an entry specified by keyword. More... | |
bool | changeKeyword (const keyType &oldKeyword, const keyType &newKeyword, bool overwrite=false) |
Change the keyword for an entry,. More... | |
bool | merge (const dictionary &dict) |
Merge entries from the given dictionary. More... | |
void | clear () |
Clear the dictionary. More... | |
void | transfer (dictionary &dict) |
Transfer the contents of the argument and annul the argument. More... | |
void | checkITstream (const ITstream &is, const word &keyword) const |
bool | read (Istream &is) |
Read dictionary from Istream. More... | |
bool | read (Istream &is, bool keepHeader) |
Read dictionary from Istream, optionally keeping the header. More... | |
void | writeEntry (Ostream &os) const |
Write sub-dictionary with its dictName as its header. More... | |
void | writeEntry (const keyType &keyword, Ostream &os) const |
Write sub-dictionary with the keyword as its header. More... | |
void | writeEntries (Ostream &os, const bool extraNewLine=false) const |
Write dictionary entries. More... | |
void | write (Ostream &os, const bool subDict=true) const |
Write dictionary, normally with sub-dictionary formatting. More... | |
const_searcher | csearch (const word &keyword, enum keyType::option=keyType::REGEX) const |
Search dictionary for given keyword. More... | |
const_searcher | search (const word &keyword, enum keyType::option=keyType::REGEX) const |
Search dictionary for given keyword. More... | |
searcher | search (const word &keyword, enum keyType::option=keyType::REGEX) |
Search dictionary for given keyword. More... | |
const_searcher | csearchScoped (const word &keyword, enum keyType::option) const |
Search using scoping. More... | |
const_searcher | searchScoped (const word &keyword, enum keyType::option) const |
Search using dot or slash scoping. More... | |
searcher | searchScoped (const word &keyword, enum keyType::option) |
Search using dot or slash scoping. More... | |
const dictionary * | cfindScopedDict (const fileName &dictPath) const |
Locate a sub-dictionary using slash-scoping. More... | |
const dictionary * | findScopedDict (const fileName &dictPath) const |
Locate a sub-dictionary using slash-scoping. More... | |
dictionary * | findScopedDict (const fileName &dictPath) |
Locate a sub-dictionary using slash-scoping. More... | |
dictionary * | makeScopedDict (const fileName &dictPath) |
Locate existing or create sub-dictionary using slash-scoping. More... | |
const_searcher | csearchCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option=keyType::REGEX) const |
Search dictionary for given keyword and any compatibility names. More... | |
bool | foundCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option=keyType::REGEX) const |
Search dictionary for given keyword and any compatibility names. More... | |
const entry * | findCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option) const |
const entry & | lookupEntryCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option) const |
ITstream & | lookupCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option=keyType::REGEX) const |
template<class T > | |
T | getCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option=keyType::REGEX) const |
template<class T > | |
T | getOrDefaultCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, const T &deflt, enum keyType::option=keyType::REGEX) const |
template<class T > | |
bool | readCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, T &val, enum keyType::option=keyType::REGEX, bool mandatory=true) const |
template<class T > | |
bool | readIfPresentCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, T &val, enum keyType::option=keyType::REGEX) const |
void | operator= (const dictionary &rhs) |
Copy assignment. More... | |
void | operator+= (const dictionary &rhs) |
Include entries from the given dictionary. More... | |
void | operator|= (const dictionary &rhs) |
Conditionally include entries from the given dictionary. More... | |
void | operator<<= (const dictionary &rhs) |
Unconditionally include entries from the given dictionary. More... | |
template<class T > | |
T | lookupOrDefault (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const |
template<class T > | |
T | lookupOrAddDefault (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) |
template<class T > | |
T | lookupOrDefaultCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const |
ITstream & | operator[] (const word &keyword) const |
Deprecated(2018-07) find and return an entry data stream. More... | |
bool | found (const word &keyword, bool recursive, bool patternMatch=true) const |
Deprecated(2018-10) More... | |
entry * | lookupEntryPtr (const word &keyword, bool recursive, bool patternMatch) |
Deprecated(2018-10) More... | |
const entry * | lookupEntryPtr (const word &keyword, bool recursive, bool patternMatch) const |
Deprecated(2018-10) More... | |
const entry * | lookupScopedEntryPtr (const word &keyword, bool recursive, bool patternMatch) const |
Deprecated(2018-10) More... | |
const dictionary * | subDictPtr (const word &keyword) const |
Deprecated(2018-10) More... | |
dictionary * | subDictPtr (const word &keyword) |
const entry & | lookupEntry (const word &keyword, bool recursive, bool patternMatch) const |
Deprecated(2018-10) More... | |
ITstream & | lookup (const word &keyword, bool recursive, bool patternMatch=true) const |
Deprecated(2018-10) More... | |
template<class T > | |
T | lookupOrDefault (const word &keyword, const T &deflt, bool recursive, bool patternMatch=true) const |
Deprecated(2018-10) More... | |
template<class T > | |
T | lookupOrAddDefault (const word &keyword, const T &deflt, bool recursive, bool patternMatch=true) |
Deprecated(2018-10) More... | |
template<class T > | |
bool | readIfPresent (const word &keyword, T &val, bool recursive, bool patternMatch=true) const |
Deprecated(2018-10) More... | |
template<class T > | |
T | lookupType (const word &keyword, bool recursive=false, bool patternMatch=true) const |
Deprecated(2018-10) find and return a T. More... | |
bool | getBool (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Same as get< bool >(const word&, keyType::option) More... | |
label | getLabel (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Same as get< label >(const word&, keyType::option) More... | |
scalar | getScalar (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Same as get< scalar >(const word&, keyType::option) More... | |
string | getString (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Same as get< string >(const word&, keyType::option) More... | |
word | getWord (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Same as get< word >(const word&, keyType::option) More... | |
fileName | getFileName (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
Same as get< fileName >(const word&, keyType::option) More... | |
template<class Compare > | |
Foam::wordList | sortedToc (const Compare &comp) const |
template<class T > | |
Foam::entry * | add (const keyType &k, const T &v, bool overwrite) |
template<class T > | |
Foam::entry * | set (const keyType &k, const T &v) |
Public Member Functions inherited from ILList< LListBase, T > | |
ILList ()=default | |
Null construct. More... | |
ILList (T *item) | |
Construct and insert the initial T item pointer. More... | |
ILList (Istream &is) | |
Construct from Istream. More... | |
ILList (const ILList< LListBase, T > &lst) | |
Copy construct using the 'clone()' method for each element. More... | |
ILList (ILList< LListBase, T > &&lst) | |
Move construct. More... | |
template<class CloneArg > | |
ILList (const ILList< LListBase, T > &lst, const CloneArg &cloneArg) | |
Copy constructor with additional argument for clone 'clone()'. More... | |
template<class INew > | |
ILList (Istream &is, const INew &inew) | |
Construct from Istream using given Istream constructor class. More... | |
~ILList () | |
Destructor. More... | |
bool | eraseHead () |
Remove the head element specified from the list and delete it. More... | |
bool | erase (T *item) |
Remove the specified element from the list and delete it. More... | |
void | clear () |
Clear the contents of the list. More... | |
void | transfer (ILList< LListBase, T > &lst) |
void | operator= (const ILList< LListBase, T > &lst) |
Copy assignment using the 'clone()' method for each element. More... | |
void | operator= (ILList< LListBase, T > &&lst) |
Move assignment. More... | |
Static Public Member Functions | |
static autoPtr< dictionary > | New (Istream &is) |
Construct top-level dictionary on freestore from Istream. More... | |
Public Attributes | |
friend | const_searcher |
Declare friendship with the searcher classes. More... | |
friend | searcher |
Static Public Attributes | |
static int | writeOptionalEntries |
Report optional keywords and values if not present in dictionary. More... | |
static const dictionary | null |
An empty dictionary, which is also the parent for all dictionaries. More... | |
Friends | |
class | entry |
Declare friendship with the entry class for IO. More... | |
Istream & | operator>> (Istream &is, dictionary &dict) |
Read dictionary from Istream. More... | |
Ostream & | operator<< (Ostream &os, const dictionary &dict) |
Write dictionary to Ostream. More... | |
A list of keyword definitions, which are a keyword followed by a number of values (eg, words and numbers) or by a sub-dictionary. Since the dictionary format is used extensively throughout OpenFOAM for input/output files, there are many examples of its use.
Dictionary keywords are a plain word or a pattern (regular expression). The general order for searching is as follows:
The dictionary class is the base class for IOdictionary and also serves as a bootstrap dictionary for the objectRegistry data dictionaries.
key1 val1; key2 $key1; // use key1 value from current scope key3 $.key1; // use key1 value from current scope subdict1 { key1 val1b; key2 $..key1; // use key1 value from parent subdict2 { key2 val2; key3 $...key1; // use key1 value from grandparent } } key4 $^subdict1.subdict2.key3; // lookup with absolute scoping
It is also possible to use the '${}' syntax for clarity.
Definition at line 121 of file dictionary.H.
typedef Searcher<true> const_searcher |
Searcher with const access.
Definition at line 267 of file dictionary.H.
Searcher with non-const access.
Definition at line 270 of file dictionary.H.
dictionary | ( | ) |
Default construct, a top-level empty dictionary.
Definition at line 81 of file dictionary.C.
Referenced by data::data().
|
explicit |
Construct top-level empty dictionary with given name.
Definition at line 88 of file dictionary.C.
dictionary | ( | const fileName & | name, |
const dictionary & | parentDict, | ||
Istream & | is, | ||
bool | keepHeader = false |
||
) |
Construct given the entry name, parent dictionary and Istream, reading entries until EOF, optionally keeping the header
Definition at line 35 of file dictionaryIO.C.
References Foam::blockMeshTools::read().
dictionary | ( | Istream & | is | ) |
Construct top-level dictionary from Istream, reading entries until EOF. Discards the header.
Definition at line 49 of file dictionaryIO.C.
dictionary | ( | Istream & | is, |
bool | keepHeader | ||
) |
Construct top-level dictionary from Istream, reading entries until EOF, optionally keeping the header
Definition at line 55 of file dictionaryIO.C.
References dictionary::read(), and entry::resetInputMode().
dictionary | ( | const dictionary & | parentDict, |
const dictionary & | dict | ||
) |
Copy construct given the parent dictionary.
Definition at line 96 of file dictionary.C.
References Foam::constant::electromagnetic::e.
dictionary | ( | const dictionary & | dict | ) |
Copy construct top-level dictionary.
Definition at line 119 of file dictionary.C.
References Foam::constant::electromagnetic::e.
dictionary | ( | const dictionary * | dict | ) |
Construct top-level dictionary as copy from pointer to dictionary.
A null pointer is treated like an empty dictionary.
Definition at line 140 of file dictionary.C.
References dict, and dictionary::operator=().
dictionary | ( | const dictionary & | parentDict, |
dictionary && | dict | ||
) |
Move construct for given parent dictionary.
Definition at line 153 of file dictionary.C.
References fileName::concat(), dict, Foam::name(), and dictionary::name().
dictionary | ( | dictionary && | dict | ) |
|
virtual |
Destructor.
Definition at line 186 of file dictionary.C.
ClassName | ( | "dictionary" | ) |
Foam::autoPtr< Foam::dictionary > clone | ( | ) | const |
Construct and return clone.
Definition at line 178 of file dictionary.C.
References autoPtr< T >::New().
Referenced by hexRef8Data::hexRef8Data(), Foam::preservePatchTypes(), and refinementSurfaces::refinementSurfaces().
|
static |
Construct top-level dictionary on freestore from Istream.
Definition at line 69 of file dictionaryIO.C.
References autoPtr< T >::New().
Referenced by objectiveManager::objectiveManager().
|
inline |
The dictionary name.
Definition at line 446 of file dictionary.H.
Referenced by baseIOdictionary::baseIOdictionary(), chemkinReader::chemkinReader(), dictionary::dictionary(), codeStream::evaluate(), includeEtcEntry::execute(), includeEntry::execute(), decompositionMethod::findCoeffsDict(), motionSmootherAlgo::get(), meshRefinement::get(), JobInfo::JobInfo(), meshRefinement::lookup(), dictionaryEntry::name(), messageStream::operator()(), IOerror::operator()(), dictionary::operator=(), Foam::operator>>(), meshRefinement::subDict(), dictionary::transfer(), Foam::unitSet(), codedBase::updateLibrary(), velocityDisplacementMotionSolver::velocityDisplacementMotionSolver(), and Foam::warnCompatDegrees().
|
inline |
The dictionary name for modification (use with caution).
Definition at line 452 of file dictionary.H.
|
inline |
The local dictionary name (final part of scoped name)
Definition at line 458 of file dictionary.H.
References fileName::name().
Referenced by radiation::addSup(), interRegionHeatTransferModel::addSup(), effectivenessHeatExchangerSource::addSup(), hydrostaticPressure::calculateAndWrite(), variableHeatTransfer::calculateHtc(), limitTemperature::correct(), ReynoldsAnalogy::Cp(), ReynoldsAnalogy::devReff(), forces::devRhoReff(), effectivenessHeatExchangerSource::effectivenessHeatExchangerSource(), wallHeatFlux::execute(), jouleHeatingSource::jouleHeatingSource(), forces::mu(), blendingMethod::New(), thermophysicalProperties::New(), basicSolidChemistryModel::New(), liquidProperties::New(), objectiveIncompressible::New(), profileModel::New(), heatTransferCoeffModel::q(), solidificationMeltingSource::solidificationMeltingSource(), mixedUnburntEnthalpyFvPatchScalarField::updateCoeffs(), fixedUnburntEnthalpyFvPatchScalarField::updateCoeffs(), gradientUnburntEnthalpyFvPatchScalarField::updateCoeffs(), outletMappedUniformInletHeatAdditionFvPatchField::updateCoeffs(), turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs(), outletMachNumberPressureFvPatchScalarField::updateCoeffs(), and viscousDissipation::viscousDissipation().
|
inline |
Return the parent dictionary.
Definition at line 472 of file dictionary.H.
const Foam::dictionary & topDict | ( | ) | const |
Return the top of the tree.
Definition at line 192 of file dictionary.C.
References p.
Referenced by includeEntry::execute(), and codeStream::getFunction().
Foam::label startLineNumber | ( | ) | const |
Return line number of first token in dictionary.
Definition at line 205 of file dictionary.C.
Referenced by messageStream::operator()(), IOerror::operator()(), and codedBase::updateLibrary().
Foam::label endLineNumber | ( | ) | const |
Return line number of last token in dictionary.
Definition at line 216 of file dictionary.C.
Referenced by messageStream::operator()(), and IOerror::operator()().
Foam::SHA1Digest digest | ( | ) | const |
Return the SHA1 digest of the dictionary contents.
Definition at line 227 of file dictionary.C.
References OSHA1streamAllocator::digest(), and Foam::constant::electromagnetic::e.
Referenced by functionObjectList::read().
Foam::tokenList tokens | ( | ) | const |
Return the dictionary as a list of tokens.
Definition at line 241 of file dictionary.C.
References Foam::constant::electromagnetic::e, ITstream::parse(), and StringStreamAllocator< StreamType >::str().
bool found | ( | const word & | keyword, |
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Search for an entry (const access) with the given keyword.
matchOpt | the default search is non-recursive with patterns |
Definition at line 364 of file dictionary.C.
Referenced by sixDoFRigidBodyMotion::addConstraints(), sixDoFRigidBodyMotion::addRestraints(), advectiveFvPatchField< Type >::advectiveFvPatchField(), angularOscillatingDisplacementPointPatchVectorField::angularOscillatingDisplacementPointPatchVectorField(), angularOscillatingVelocityPointPatchVectorField::angularOscillatingVelocityPointPatchVectorField(), equationMaxIterCondition::apply(), equationInitialResidualCondition::apply(), atmTurbulentHeatFluxTemperatureFvPatchScalarField::atmTurbulentHeatFluxTemperatureFvPatchScalarField(), averageCondition::averageCondition(), DAC< CompType, ThermoType >::DAC(), Foam::dimensionedConstant(), DRG< CompType, ThermoType >::DRG(), DRGEP< CompType, ThermoType >::DRGEP(), exprMixedFvPatchField< Type >::exprMixedFvPatchField(), filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField(), dictionary::found(), stateFunctionObject::foundProperty(), freeSurfacePressureFvPatchScalarField::freeSurfacePressureFvPatchScalarField(), subModelBase::getModelDict(), subModelBase::getModelProperty(), stateFunctionObject::getObjectDict(), stateFunctionObject::getObjectProperty(), stateFunctionObject::getObjectResult(), refinementParameters::getZoneInfo(), humidityTemperatureCoupledMixedFvPatchScalarField::humidityTemperatureCoupledMixedFvPatchScalarField(), incompressibleInterPhaseTransportModel< Mixture >::incompressibleInterPhaseTransportModel(), oversetFvPatchField< Type >::initEvaluate(), solverInfo::initialiseResidualField(), layerParameters::layerParameters(), basicThermo::lookupThermo(), mappedPatchBase::mappedPatchBase(), liquidProperties::New(), waveModel::New(), stateFunctionObject::objectResultEntries(), stateFunctionObject::objectResultType(), oldCyclicPolyPatch::oldCyclicPolyPatch(), omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField(), optMeshMovement::optMeshMovement(), oscillatingDisplacementPointPatchVectorField::oscillatingDisplacementPointPatchVectorField(), oscillatingVelocityPointPatchVectorField::oscillatingVelocityPointPatchVectorField(), PFA< CompType, ThermoType >::PFA(), Foam::preservePatchTypes(), stateFunctionObject::propertyDict(), tolerances::read(), timeControl::read(), multiphaseMangrovesTurbulenceModel::read(), fixedTemperatureConstraint::read(), Time::readDict(), functionObjectList::readFunctionObject(), liquidProperties::readIfPresent(), refinementSurfaces::refinementSurfaces(), rigidBodyMeshMotion::rigidBodyMeshMotion(), rigidBodyMeshMotionSolver::rigidBodyMeshMotionSolver(), rigidBodyModel::rigidBodyModel(), sampledCuttingPlane::sampledCuttingPlane(), sampledCuttingSurface::sampledCuttingSurface(), sampledInterface::sampledInterface(), sampledIsoSurface::sampledIsoSurface(), sampledPlane::sampledPlane(), sampledThresholdCellFaces::sampledThresholdCellFaces(), searchableSurfaceCollection::searchableSurfaceCollection(), searchableSurfaces::searchableSurfaces(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::setCdSigma(), runTimeCondition::setConditionDict(), subModelBase::setModelProperty(), stateFunctionObject::setObjectProperty(), stateFunctionObject::setObjectResult(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::setPorosityCoefficient(), lduMatrix::setResidualField(), shellSurfaces::shellSurfaces(), sixDoFRigidBodyDisplacementPointPatchVectorField::sixDoFRigidBodyDisplacementPointPatchVectorField(), sixDoFRigidBodyMotion::sixDoFRigidBodyMotion(), solidBodyMotionDisplacementPointPatchVectorField::solidBodyMotionDisplacementPointPatchVectorField(), surfaceZonesInfo::surfaceZonesInfo(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField(), uniformInterpolatedDisplacementPointPatchVectorField::uniformInterpolatedDisplacementPointPatchVectorField(), Foam::unitSet(), solverInfo::updateSolverInfo(), vibrationShellFvPatchScalarField::vibrationShellFvPatchScalarField(), waveMakerPointPatchVectorField::waveMakerPointPatchVectorField(), averageCondition::write(), stateFunctionObject::writeAllResultEntries(), stateFunctionObject::writeResultEntries(), and writer::writeSolution().
Foam::entry * findEntry | ( | const word & | keyword, |
enum keyType::option | matchOpt = keyType::REGEX |
||
) |
Find for an entry (non-const access) with the given keyword.
matchOpt | the search mode |
Definition at line 374 of file dictionary.C.
References Foam::search().
Referenced by Foam::getOrAdd(), dictionary::lookupEntryPtr(), sampledSurfaces::read(), refinementSurfaces::refinementSurfaces(), dynamicCodeContext::setCodeContext(), shellSurfaces::shellSurfaces(), and solution::upgradeSolverDict().
const Foam::entry * findEntry | ( | const word & | keyword, |
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Find an entry (const access) with the given keyword.
matchOpt | the default search is non-recursive with patterns |
Definition at line 384 of file dictionary.C.
const Foam::entry * findScoped | ( | const word & | keyword, |
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Search for a scoped entry (const access) with the given keyword.
Allows scoping using '.'. Special handling for an absolute anchor (^) at start of the keyword and for '..' to ascend into the parent dictionaries.
matchOpt | the default search is non-recursive with patterns |
Definition at line 394 of file dictionary.C.
Referenced by Foam::getVariable(), Foam::getVariableOrDie(), and dictionary::lookupScopedEntryPtr().
Foam::dictionary * findDict | ( | const word & | keyword, |
enum keyType::option | matchOpt = keyType::REGEX |
||
) |
Find and return a sub-dictionary pointer if present.
(and a sub-dictionary) otherwise return nullptr.
matchOpt | the default search is non-recursive with patterns |
Definition at line 508 of file dictionary.C.
References Foam::search().
Referenced by writerCaching::fieldsDict(), oversetFvPatchField< Type >::initEvaluate(), loopControl::loopControl(), namedBlock::namedBlock(), namedVertex::namedVertex(), laminarModel< BasicMomentumTransportModel >::New(), RASModelVariables::New(), blockVertex::read(), adjointRASModel::read(), PDRblock::read(), Time::readDict(), lumpedPointMovement::readDict(), functionObjectList::readFunctionObject(), Time::setMonitoring(), dictionary::subDictPtr(), Foam::unitSet(), blockVertex::write(), and blockDescriptor::write().
const Foam::dictionary * findDict | ( | const word & | keyword, |
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Find and return a sub-dictionary pointer if present.
(and a sub-dictionary) otherwise return nullptr.
matchOpt | the default search is non-recursive with patterns |
Definition at line 518 of file dictionary.C.
const Foam::entry & lookupEntry | ( | const word & | keyword, |
enum keyType::option | matchOpt | ||
) | const |
Search for an entry (const access) with the given keyword.
matchOpt | the default search is non-recursive with patterns |
Definition at line 404 of file dictionary.C.
References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::name(), Foam::nl, and dictionary::Searcher< Const >::ref().
Referenced by lduMatrix::smoother::getName(), lduMatrix::preconditioner::getName(), dictionary::lookupEntry(), lduMatrix::smoother::New(), and lduMatrix::preconditioner::New().
Foam::ITstream & lookup | ( | const word & | keyword, |
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Find and return an entry data stream. FatalIOError if not found, or if the number of tokens is incorrect.
matchOpt | the default search is non-recursive with patterns |
Definition at line 424 of file dictionary.C.
Referenced by equationMaxIterCondition::apply(), Foam::getLazyPair(), Foam::getRadius(), layerParameters::layerParameters(), dictionary::lookup(), interpolation< Foam::Vector >::New(), multivariateIndependentScheme< Type >::operator()(), dictionary::operator[](), dimensionSet::read(), shellSurfaces::shellSurfaces(), and solverInfo::updateSolverInfo().
T get | ( | const word & | keyword, |
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
matchOpt | the default search is non-recursive with patterns |
Definition at line 81 of file dictionaryTemplates.C.
References Foam::T().
Referenced by geometric::add(), columnFvMeshInfo::addLocalPatches(), chemkinReader::chemkinReader(), coalCloudList::coalCloudList(), axisAligned::computeControlPoints(), cyclicAMIPolyPatch::cyclicAMIPolyPatch(), DAC< CompType, ThermoType >::DAC(), dynamicCodeContext::dict(), Foam::dimensionedConstant(), directions::directions(), argList::displayDoc(), thermalShell::evolveRegion(), KirchhoffShell::evolveRegion(), faMesh::faMesh(), FreeStream< CloudType >::FreeStream(), Foam::getLazyPair(), Foam::getRadius(), dynamicMultiMotionSolverFvMesh::init(), InjectionModelList< Foam::KinematicCloud< Cloud< basicKinematicCollidingParcel > > >::InjectionModelList(), ISAT< CompType, ThermoType >::ISAT(), layerParameters::layerParameters(), Foam::MULES::limiterCorr(), basicThermo::lookupThermo(), medialAxisMeshMover::move(), multiDirRefinement::multiDirRefinement(), decompositionMethod::nDomains(), blendingMethod::New(), saturationModel::New(), basicSolidChemistryModel::New(), optimisationManager::New(), objectiveManager::New(), coordinateRotation::New(), laminarFlameSpeed::New(), chemistryReductionMethod< ReactionThermo, ThermoType >::New(), displacementMethod::New(), phaseModel::New(), surfaceTensionModel::New(), adjointTurbulenceModel::New(), ATCModel::New(), optMeshMovement::New(), liquidProperties::New(), cellCellStencil::New(), objectiveIncompressible::New(), profileModel::New(), updateMethod::New(), decompositionMethod::New(), lduMatrix::solver::New(), waveModel::New(), LduMatrix< Type, DType, LUType >::solver::New(), NURBS3DVolume::New(), option::New(), sampledSet::New(), sampledSurface::New(), LduMatrix< Type, DType, LUType >::smoother::New(), functionObject::New(), LduMatrix< Type, DType, LUType >::preconditioner::New(), decomposedBlockData::numBlocks(), objectiveIncompressible::objectiveIncompressible(), objectiveManager::objectiveManager(), offsetSurface::offsetSurface(), omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField(), dynamicCodeContext::operator const dictionary &(), Foam::operator>>(), optMeshMovement::optMeshMovement(), plane::plane(), solutionControl::read(), timeControl::read(), multiphaseMangrovesSource::read(), multiphaseMangrovesTurbulenceModel::read(), patchProbes::read(), heatTransferCoeffModel::read(), areaWrite::read(), jouleHeatingSource::read(), sampledSurfaces::read(), forces::read(), dynamicRefineFvMesh::readDict(), Time::readDict(), functionObjectList::readFunctionObject(), IOobject::readHeader(), SIMPLEControlSingleRun::readIters(), SIMPLEControl::readIters(), refinementSurfaces::refinementSurfaces(), boundaryRegion::rename(), rigidBodyModel::rigidBodyModel(), searchableSurfaceCollection::searchableSurfaceCollection(), searchableSurfaces::searchableSurfaces(), searchableSurfaceWithGaps::searchableSurfaceWithGaps(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::setCdSigma(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::setPorosityCoefficient(), twoPhaseSystem::solve(), multiphaseSystem::solve(), populationBalanceModel::solve(), MultiComponentPhaseModel< BasePhaseModel, phaseThermo >::solveYi(), surfaceZonesInfo::surfaceZonesInfo(), Switch::Switch(), Foam::unitSet(), dynamicRefineFvMesh::update(), WallLocalSpringSliderDashpot< CloudType >::WallLocalSpringSliderDashpot(), thermalBaffleFvPatchScalarField::write(), and ensightWriter::writeCollated().
T getOrDefault | ( | const word & | keyword, |
const T & | deflt, | ||
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Find and return a T, or return the given default value. FatalIOError if it is found and the number of tokens is incorrect.
matchOpt | the default search is non-recursive with patterns |
Definition at line 122 of file dictionaryTemplates.C.
References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::nl, dictionary::Searcher< Const >::ptr(), and Foam::T().
Referenced by atmBoundaryLayerInletEpsilonFvPatchScalarField::atmBoundaryLayerInletEpsilonFvPatchScalarField(), atmBoundaryLayerInletKFvPatchScalarField::atmBoundaryLayerInletKFvPatchScalarField(), atmBoundaryLayerInletOmegaFvPatchScalarField::atmBoundaryLayerInletOmegaFvPatchScalarField(), atmBoundaryLayerInletVelocityFvPatchVectorField::atmBoundaryLayerInletVelocityFvPatchVectorField(), ATCModel::createLimiter(), cyclicAMIPolyPatch::cyclicAMIPolyPatch(), cylindrical::cylindrical(), freeSurfaceVelocityFvPatchVectorField::freeSurfaceVelocityFvPatchVectorField(), stateFunctionObject::getTrigger(), Foam::MULES::limiter(), Foam::MULES::limiterCorr(), dictionary::lookupOrDefault(), tableReader< scalar >::New(), stepUpdate::New(), zeroATCcells::New(), lineSearch::New(), coordinateSystem::New(), Foam::operator>>(), argList::parse(), profiling::profiling(), SIMPLEControlOpt::read(), SIBase::read(), FIBase::read(), adjointMeshMovementSolver::read(), solverControl::read(), sensitivityBezierFI::read(), sensitivitySurfacePoints::read(), solutionControl::read(), timeControl::read(), sensitivitySurface::read(), adjointEikonalSolver::read(), fieldValue::read(), explicitPorositySource::read(), areaWrite::read(), MRFZone::read(), functionObjectList::read(), directionalPressureGradientExplicitSource::read(), targetCoeffTrim::read(), functionObject::read(), sampledSurfaces::read(), PDRblock::read(), smoothSolver::readControls(), lduMatrix::solver::readControls(), temperatureDependent::readDict(), adjointSolver::readDict(), externalFileCoupler::readDict(), lumpedPointMovement::readDict(), refinementSurfaces::refinementSurfaces(), rotatingPressureInletOutletVelocityFvPatchVectorField::rotatingPressureInletOutletVelocityFvPatchVectorField(), searchableSurfaces::searchableSurfaces(), cellTable::selectType(), Time::setMonitoring(), slidingInterface::setTolerances(), stateFunctionObject::setTrigger(), shellSurfaces::shellSurfaces(), shortestPathSet::shortestPathSet(), populationBalanceModel::solve(), fvMatrix< Type >::solveSegregatedOrCoupled(), MultiComponentPhaseModel< BasePhaseModel, phaseThermo >::solveYi(), triSurface::triSurface(), triSurfaceMesh::triSurfaceMesh(), turbulentMixingLengthDissipationRateInletFvPatchScalarField::turbulentMixingLengthDissipationRateInletFvPatchScalarField(), turbulentMixingLengthFrequencyInletFvPatchScalarField::turbulentMixingLengthFrequencyInletFvPatchScalarField(), UnsortedMeshedSurface< Face >::UnsortedMeshedSurface(), dynamicRefineFvMesh::update(), turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs(), turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs(), vtkWriter::vtkWriter(), and ensightWriter::writeCollated().
T getOrAdd | ( | const word & | keyword, |
const T & | deflt, | ||
enum keyType::option | matchOpt = keyType::REGEX |
||
) |
Find and return a T, or return the given default value and add it to dictionary. FatalIOError if it is found and the number of tokens is incorrect.
matchOpt | the default search is non-recursive with patterns |
Definition at line 162 of file dictionaryTemplates.C.
References Foam::add(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::nl, dictionary::Searcher< Const >::ptr(), and Foam::T().
Referenced by Switch::getOrAddToDict(), and dictionary::lookupOrAddDefault().
bool readEntry | ( | const word & | keyword, |
T & | val, | ||
enum keyType::option | matchOpt = keyType::REGEX , |
||
bool | mandatory = true |
||
) | const |
Find entry and assign to T val. FatalIOError if it is found and the number of tokens is incorrect, or it is mandatory and not found.
val | the value to read into |
matchOpt | the default search is non-recursive with patterns |
mandatory | the keyword is mandatory (default: true) |
Definition at line 314 of file dictionaryTemplates.C.
References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::name(), Foam::nl, and dictionary::Searcher< Const >::ptr().
Referenced by advectiveFvPatchField< Type >::advectiveFvPatchField(), BreakupModel< Foam::SprayCloud< Foam::DSMCCloud > >::BreakupModel(), fromFile::computeControlPoints(), cyclicAMIPolyPatch::cyclicAMIPolyPatch(), cyclicPolyPatch::cyclicPolyPatch(), argList::displayDoc(), motionSmootherAlgo::get(), meshRefinement::get(), humidityTemperatureCoupledMixedFvPatchScalarField::humidityTemperatureCoupledMixedFvPatchScalarField(), liquidFilmThermo::initLiquid(), mappedPatchBase::mappedPatchBase(), multiBandZoneAbsorptionEmission::multiBandZoneAbsorptionEmission(), nastranWriter::nastranWriter(), combustionModel::New(), oldCyclicPolyPatch::oldCyclicPolyPatch(), Foam::operator>>(), argList::parse(), exponentialRepulsion::read(), lennardJones::read(), harmonicSpring::read(), restrainedHarmonicSpring::read(), pitchForkRing::read(), dampedCoulomb::read(), anisotropicFilter::read(), laplaceFilter::read(), sigmoid::read(), doubleSigmoid::read(), azizChen::read(), maitlandSmith::read(), thermalBaffle::read(), HerschelBulkley::read(), powerLaw::read(), Arrhenius< ViscousModel >::read(), CrossPowerLaw::read(), consumptionSpeed::read(), BirdCarreau::read(), thermalShell::read(), Casson::read(), multiphaseMangrovesSource::read(), reactionRateFlameArea::read(), multiphaseMangrovesTurbulenceModel::read(), limitVelocity::read(), KirchhoffShell::read(), limitTemperature::read(), phaseModel::read(), radialActuationDiskSource::read(), fieldValue::read(), kinematicSingleLayer::read(), areaWrite::read(), porosityModel::read(), probes::read(), sampledSets::read(), externalHeatFluxSource::read(), adjointRASModel::read(), sampledSurfaces::read(), thermo::readControls(), dynamicRefineFvMesh::readDict(), streamFunction::readDict(), Time::readDict(), externalFileCoupler::readDict(), lumpedPointMovement::readDict(), regionProperties::regionProperties(), rigidBodyMeshMotionSolver::rigidBodyMeshMotionSolver(), sampledCuttingPlane::sampledCuttingPlane(), sampledCuttingSurface::sampledCuttingSurface(), sampledInterface::sampledInterface(), sampledIsoSurface::sampledIsoSurface(), sampledPlane::sampledPlane(), searchableSurfaceCollection::searchableSurfaceCollection(), sizeDistribution::setCellZoneCells(), reducedUnits::setRefValues(), shellSurfaces::shellSurfaces(), sixDoFRigidBodyDisplacementPointPatchVectorField::sixDoFRigidBodyDisplacementPointPatchVectorField(), sixDoFRigidBodyMotionSolver::sixDoFRigidBodyMotionSolver(), slidingInterface::slidingInterface(), surfaceFeatures::surfaceFeatures(), surfaceZonesInfo::surfaceZonesInfo(), constantFilmThermo::Tb(), thermoCoupleProbes::thermoCoupleProbes(), valueAverage::valueAverage(), viscousDissipation::viscousDissipation(), constantFilmThermo::W(), writer::writeSolution(), and zoneCombustion< ReactionThermo >::zoneCombustion().
bool readIfPresent | ( | const word & | keyword, |
T & | val, | ||
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens is incorrect.
Default search: non-recursive with patterns.
val | the value to read into |
matchOpt | the default search is non-recursive with patterns |
Definition at line 417 of file dictionaryTemplates.C.
Referenced by advectiveFvPatchField< Type >::advectiveFvPatchField(), averageCondition::averageCondition(), chemkinReader::chemkinReader(), cloudSolution::cloudSolution(), cyclicAMIPolyPatch::cyclicAMIPolyPatch(), dlLibraryTable::dlLibraryTable(), fvMotionSolverEngineMesh::fvMotionSolverEngineMesh(), geometricSurfacePatch::geometricSurfacePatch(), subModelBase::getBaseProperty(), subModelBase::getModelProperty(), stateFunctionObject::getObjectProperty(), stateFunctionObject::getObjectResult(), refinementParameters::getZoneInfo(), kinematicSingleLayer::info(), objectivePtLosses::initialize(), layeredEngineMesh::layeredEngineMesh(), layerParameters::layerParameters(), lumpedPointDisplacementPointPatchVectorField::lumpedPointDisplacementPointPatchVectorField(), mappedPatchBase::mappedPatchBase(), decompositionMethod::nDomains(), decompositionMethod::New(), decomposedBlockData::numBlocks(), oldCyclicPolyPatch::oldCyclicPolyPatch(), dlLibraryTable::open(), patchIdentifier::patchIdentifier(), pointHistory::pointHistory(), porosityModel::porosityModel(), Foam::preservePatchTypes(), maxDeltaxyz::read(), IDDESDelta::read(), writeFreeSurface::read(), pointHistory::read(), multiphaseMangrovesTurbulenceModel::read(), patchProbes::read(), buoyancyEnergy::read(), heatTransferCoeffModel::read(), fixedTemperatureConstraint::read(), explicitPorositySource::read(), kinematicSingleLayer::read(), areaWrite::read(), porosityModel::read(), jouleHeatingSource::read(), probes::read(), externalHeatFluxSource::read(), noiseModel::read(), Time::readDict(), lumpedPointMovement::readDict(), IOobject::readHeader(), thermophysicalProperties::readIfPresent(), solidProperties::readIfPresent(), Switch::readIfPresent(), liquidProperties::readIfPresent(), dictionary::readIfPresent(), refinementSurfaces::refinementSurfaces(), sampledCuttingPlane::sampledCuttingPlane(), sampledCuttingSurface::sampledCuttingSurface(), sampledInterface::sampledInterface(), sampledIsoSurface::sampledIsoSurface(), sampledMeshedSurface::sampledMeshedSurface(), sampledPlane::sampledPlane(), Time::setControls(), Time::setTime(), sixDoFRigidBodyDisplacementPointPatchVectorField::sixDoFRigidBodyDisplacementPointPatchVectorField(), fvMatrix< Type >::solveSegregatedOrCoupled(), surfaceWriter::surfaceWriter(), surfaceZonesInfo::surfaceZonesInfo(), surfZoneIdentifier::surfZoneIdentifier(), Switch::Switch(), kinematicSingleLayer::transferPrimaryRegionSourceFields(), triSurfaceMesh::triSurfaceMesh(), triSurfaceSearch::triSurfaceSearch(), updateMethod::updateMethod(), writeFreeSurface::writeFreeSurface(), x3dWriter::x3dWriter(), and zeroATCcells::zeroATCcells().
T getCheck | ( | const word & | keyword, |
const Predicate & | pred, | ||
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Find and return a T with additional checking FatalIOError if not found, or if the number of tokens is incorrect.
pred | the value check predicate |
matchOpt | the default search is non-recursive with patterns |
Definition at line 94 of file dictionaryTemplates.C.
References Foam::T().
T getCheckOrDefault | ( | const word & | keyword, |
const T & | deflt, | ||
const Predicate & | pred, | ||
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Find and return a T, or return the given default value. FatalIOError if it is found and the number of tokens is incorrect.
pred | the value check predicate |
matchOpt | the default search is non-recursive with patterns |
Definition at line 203 of file dictionaryTemplates.C.
References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::name(), Foam::nl, dictionary::Searcher< Const >::ptr(), and Foam::T().
T getCheckOrAdd | ( | const word & | keyword, |
const T & | deflt, | ||
const Predicate & | pred, | ||
enum keyType::option | matchOpt = keyType::REGEX |
||
) |
Find and return a T, or return the given default value and add it to dictionary. FatalIOError if it is found and the number of tokens is incorrect.
pred | the value check predicate |
matchOpt | the default search is non-recursive with patterns |
Definition at line 258 of file dictionaryTemplates.C.
References Foam::add(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::name(), Foam::nl, dictionary::Searcher< Const >::ptr(), and Foam::T().
bool readCheck | ( | const word & | keyword, |
T & | val, | ||
const Predicate & | pred, | ||
enum keyType::option | matchOpt = keyType::REGEX , |
||
bool | mandatory = true |
||
) | const |
Find entry and assign to T val. FatalIOError if it is found and the number of tokens is incorrect, or it is mandatory and not found.
val | the value to read into |
pred | the value check predicate |
matchOpt | the default search is non-recursive with patterns |
mandatory | the keyword is mandatory |
Definition at line 346 of file dictionaryTemplates.C.
References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::name(), Foam::nl, and dictionary::Searcher< Const >::ptr().
bool readCheckIfPresent | ( | const word & | keyword, |
T & | val, | ||
const Predicate & | pred, | ||
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens is incorrect.
Default search: non-recursive with patterns.
val | the value to read into |
pred | the value check predicate |
matchOpt | the default search is non-recursive with patterns |
Definition at line 430 of file dictionaryTemplates.C.
bool isDict | ( | const word & | keyword, |
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Check if entry is found and is a sub-dictionary.
matchOpt | the default search is non-recursive with patterns |
Definition at line 498 of file dictionary.C.
Referenced by boundaryRadiationProperties::boundaryRadiationProperties(), stateFunctionObject::getObjectDict(), basicChemistryModel::New(), reader::remapMeshInfo(), and writer::writeSolution().
const Foam::dictionary & subDict | ( | const word & | keyword, |
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Find and return a sub-dictionary.
Fatal if the entry does not exist or is not a sub-dictionary.
matchOpt | the default search is non-recursive with patterns |
Definition at line 528 of file dictionary.C.
References dictionary::Searcher< Const >::dict(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::name(), and Foam::nl.
Referenced by sixDoFRigidBodyMotion::addConstraints(), snappyLayerDriver::addLayers(), sixDoFRigidBodyMotion::addRestraints(), adjointSimple::adjointSimple(), adjointSolverManager::adjointSolverManager(), averageCondition::averageCondition(), boundaryRadiationProperties::boundaryRadiationProperties(), coordinateSystem::coordinateSystem(), DAC< CompType, ThermoType >::DAC(), Foam::dimensionedConstant(), directions::directions(), argList::displayDoc(), DRG< CompType, ThermoType >::DRG(), DRGEP< CompType, ThermoType >::DRGEP(), faMesh::faMesh(), stateFunctionObject::foundProperty(), subModelBase::getBaseProperty(), subModelBase::getModelDict(), subModelBase::getModelProperty(), stateFunctionObject::getObjectDict(), stateFunctionObject::getObjectProperty(), stateFunctionObject::getObjectResult(), refinementParameters::getZoneInfo(), humidityTemperatureCoupledMixedFvPatchScalarField::humidityTemperatureCoupledMixedFvPatchScalarField(), dynamicMultiMotionSolverFvMesh::init(), oversetFvPatchField< Type >::initEvaluate(), cloudSolution::integrationSchemes(), cloudSolution::interpolationSchemes(), multiBandZoneAbsorptionEmission::multiBandZoneAbsorptionEmission(), basicChemistryModel::New(), basicSolidChemistryModel::New(), phaseModel::New(), RASModel< EddyDiffusivity< phaseCompressibleTurbulenceModel > >::New(), LESModel< BasicTurbulenceModel >::New(), waveModel::New(), coordinateSystem::New(), objectiveManager::objectiveManager(), stateFunctionObject::objectResultEntries(), stateFunctionObject::objectResultType(), optimisationManager::optimisationManager(), PFA< CompType, ThermoType >::PFA(), Foam::preservePatchTypes(), stateFunctionObject::propertyDict(), pyrolysisModelCollection::pyrolysisModelCollection(), lennardJones::read(), harmonicSpring::read(), restrainedHarmonicSpring::read(), pitchForkRing::read(), dampedCoulomb::read(), tolerances::read(), sigmoid::read(), doubleSigmoid::read(), porosityModelList::read(), optimisationManager::read(), runTimeControl::read(), multiphaseMangrovesSource::read(), multiphaseMangrovesTurbulenceModel::read(), FixedValueConstraint< Type >::read(), MRFZoneList::read(), kinematicSingleLayer::read(), PDRblock::read(), thermo::readControls(), sensitivityMultiple::readDict(), adjointSolverManager::readDict(), adjointSimple::readDict(), adjointSolver::readDict(), lumpedPointMovement::readDict(), liquidProperties::readIfPresent(), refinementSurfaces::refinementSurfaces(), reader::remapMeshInfo(), rigidBodyMeshMotion::rigidBodyMeshMotion(), rigidBodyMeshMotionSolver::rigidBodyMeshMotionSolver(), rigidBodyModel::rigidBodyModel(), searchableSurfaceCollection::searchableSurfaceCollection(), searchableSurfaces::searchableSurfaces(), subModelBase::setBaseProperty(), runTimeCondition::setConditionDict(), subModelBase::setModelProperty(), stateFunctionObject::setObjectProperty(), stateFunctionObject::setObjectResult(), shellSurfaces::shellSurfaces(), solverControl::solutionDict(), cloudSolution::sourceTermDict(), steadyOptimisation::steadyOptimisation(), volBSplinesBase::volBSplinesBase(), averageCondition::write(), thermalBaffleFvPatchScalarField::write(), stateFunctionObject::writeAllResultEntries(), stateFunctionObject::writeResultEntries(), and writer::writeSolution().
Foam::dictionary & subDict | ( | const word & | keyword, |
enum keyType::option | matchOpt = keyType::REGEX |
||
) |
Find and return a sub-dictionary for manipulation.
Fatal if the entry does not exist or is not a sub-dictionary.
matchOpt | the default search is non-recursive with patterns |
Definition at line 548 of file dictionary.C.
References dictionary::Searcher< Const >::dict(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::name(), Foam::nl, and Foam::search().
Foam::dictionary & subDictOrAdd | ( | const word & | keyword, |
enum keyType::option | matchOpt = keyType::REGEX |
||
) |
Find and return a sub-dictionary for manipulation.
Fatal if the entry exist and is not a sub-dictionary.
matchOpt | the default search is non-recursive with patterns |
Definition at line 568 of file dictionary.C.
References dictionary::Searcher< Const >::dictPtr(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::name(), Foam::nl, Foam::search(), and Foam::BitOps::set().
Referenced by mappedPatchBase::writeDict().
Foam::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.
Warn if the entry exists but is not a sub-dictionary.
matchOpt | the default search is non-recursive with patterns |
mandatory | the keyword is mandatory (default: false) |
Definition at line 608 of file dictionary.C.
References dictionary::Searcher< Const >::dict(), Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), IOWarningInFunction, dictionary::Searcher< Const >::isDict(), Foam::name(), and Foam::nl.
Referenced by blockDescriptor::blockDescriptor(), cloudSolution::cloudSolution(), updateMethod::coeffsDict(), solutionControl::dict(), subModelBase::getModelDict(), solverControl::read(), sensitivityBezierFI::read(), areaWrite::read(), noiseModel::read(), sampledSurfaces::read(), and lumpedPointMovement::readDict().
const Foam::dictionary & optionalSubDict | ( | const word & | keyword, |
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Find and return a sub-dictionary, otherwise return this dictionary.
Warn if the entry exists but is not a sub-dictionary.
Search type: non-recursive with patterns.
Definition at line 645 of file dictionary.C.
References dictionary::Searcher< Const >::dict(), Foam::endl(), dictionary::Searcher< Const >::good(), IOWarningInFunction, dictionary::Searcher< Const >::isDict(), and Foam::name().
Referenced by geometric::add(), stepUpdate::coeffsDict(), lineSearch::coeffsDict(), liquidFilmThermo::initLiquid(), liquidProperties::New(), sampledSet::New(), laplaceFilter::read(), anisotropicFilter::read(), strainRateFunction::read(), CrossPowerLaw::read(), HerschelBulkley::read(), powerLaw::read(), Arrhenius< ViscousModel >::read(), BirdCarreau::read(), diameterModel::read(), solidBodyMotionFunction::read(), Casson::read(), motionSolver::read(), porosityModel::read(), dynamicRefineFvMesh::readDict(), and SIBase::readDict().
Foam::wordList toc | ( | ) | const |
Return the table of contents.
Definition at line 670 of file dictionary.C.
References Foam::constant::electromagnetic::e, and n.
Referenced by adjointSolverManager::adjointSolverManager(), DAC< CompType, ThermoType >::DAC(), removeEntry::execute(), faMesh::faMesh(), FreeStream< CloudType >::FreeStream(), Foam::operator>>(), optimisationManager::optimisationManager(), pyrolysisModelCollection::pyrolysisModelCollection(), runTimeControl::read(), refinementSurfaces::refinementSurfaces(), and shellSurfaces::shellSurfaces().
Foam::wordList sortedToc | ( | ) | const |
Return the sorted table of contents.
Definition at line 684 of file dictionary.C.
Referenced by equationInitialResidualCondition::apply(), solverFieldSelection::updateSelection(), stateFunctionObject::writeAllResultEntries(), and stateFunctionObject::writeResultEntries().
wordList sortedToc | ( | const Compare & | comp | ) | const |
Return table of contents sorted using the specified comparator.
Foam::List< Foam::keyType > keys | ( | bool | patterns = false | ) | const |
Return the list of available keys or patterns.
Definition at line 690 of file dictionary.C.
References Foam::constant::electromagnetic::e, n, and List< T >::resize().
Substitute the given keyword (which is prefixed by '$')
with the corresponding sub-dictionary entries
Definition at line 434 of file dictionary.C.
References Foam::add(), Foam::constant::electromagnetic::e, and keyType::REGEX_RECURSIVE.
Substitute the given scoped keyword (which is prefixed by '$')
with the corresponding sub-dictionary entries
Definition at line 466 of file dictionary.C.
References Foam::add(), Foam::constant::electromagnetic::e, and keyType::REGEX_RECURSIVE.
Referenced by entry::New().
Foam::entry * add | ( | entry * | entryPtr, |
bool | mergeEntry = false |
||
) |
Add a new entry.
mergeEntry | dictionaries are interwoven and primitive entries are overwritten |
Definition at line 708 of file dictionary.C.
References append(), fileName::concat(), entry::dict(), Foam::endl(), IOWarningInFunction, entry::isDict(), keyType::isPattern(), entry::keyword(), dictionary::merge(), entry::name(), and Foam::name().
Referenced by fvMeshTools::createDummyFvMeshFiles(), Foam::dimensionedConstant(), faMesh::faMesh(), Foam::getOrAdd(), refinementParameters::getZoneInfo(), voxelMeshSearch::makeMesh(), dictionary::makeScopedDict(), namedBlock::namedBlock(), namedVertex::namedVertex(), entry::New(), cellTable::operator=(), argList::parse(), Foam::preservePatchTypes(), stateFunctionObject::propertyDict(), functionObjectList::readFunctionObject(), subModelBase::setBaseProperty(), runTimeCondition::setConditionDict(), subModelBase::setModelProperty(), stateFunctionObject::setObjectProperty(), stateFunctionObject::setObjectResult(), sixDoFRigidBodyMotionSolver::solve(), rigidBodyMeshMotionSolver::solve(), rigidBodyMeshMotion::solve(), kinematicSingleLayer::transferPrimaryRegionSourceFields(), sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), solution::upgradeSolverDict(), averageCondition::write(), thermoCoupleProbes::write(), NURBS3DVolume::writeCpsInDict(), surfaceFeatures::writeDict(), mappedPatchBase::writeDict(), and Time::writeTimeDict().
Foam::entry * add | ( | const entry & | e, |
bool | mergeEntry = false |
||
) |
Add an entry.
mergeEntry | dictionaries are interwoven and primitive entries are overwritten |
Definition at line 786 of file dictionary.C.
References Foam::add(), and Foam::constant::electromagnetic::e.
Foam::entry * add | ( | const keyType & | k, |
const word & | v, | ||
bool | overwrite = false |
||
) |
Add a word entry.
overwrite | force overwrite of an existing entry. |
Definition at line 793 of file dictionary.C.
References Foam::add(), and k.
Foam::entry * add | ( | const keyType & | k, |
const string & | v, | ||
bool | overwrite = false |
||
) |
Add a string entry.
overwrite | force overwrite of an existing entry. |
Definition at line 804 of file dictionary.C.
References Foam::add(), and k.
Foam::entry * add | ( | const keyType & | k, |
const label | v, | ||
bool | overwrite = false |
||
) |
Add a label entry.
overwrite | force overwrite of an existing entry. |
Definition at line 815 of file dictionary.C.
References Foam::add(), and k.
Foam::entry * add | ( | const keyType & | k, |
const scalar | v, | ||
bool | overwrite = false |
||
) |
Add a scalar entry.
overwrite | force overwrite of an existing entry. |
Definition at line 826 of file dictionary.C.
References Foam::add(), and k.
Foam::entry * add | ( | const keyType & | k, |
const dictionary & | d, | ||
bool | mergeEntry = false |
||
) |
Add a dictionary entry.
mergeEntry | merge into an existing sub-dictionary |
Definition at line 837 of file dictionary.C.
References Foam::add(), and k.
Add a T entry.
overwrite | force overwrite of existing entry |
Foam::entry * set | ( | entry * | entryPtr | ) |
Assign a new entry, overwriting any existing entry.
Definition at line 847 of file dictionary.C.
References Foam::add(), dictionary::Searcher< Const >::dict(), dictionary::Searcher< Const >::isDict(), entry::keyword(), keyType::REGEX, and Foam::search().
Referenced by columnFvMeshInfo::addLocalPatches(), meshRefinement::addPatch(), sixDoFRigidBodyMotion::addRestraints(), averageCondition::averageCondition(), data::data(), extrudePatchMesh::extrudePatchMesh(), fvMeshTools::newMesh(), polyMesh::polyMesh(), runTimeControl::read(), functionObjectList::readFunctionObject(), codedFunctionObject::redirectFunctionObject(), CodedSource< Type >::redirectFvOption(), codedPoints0MotionSolver::redirectMotionSolver(), refinementSurfaces::refinementSurfaces(), boundaryRegion::rename(), searchableSurfaceCollection::searchableSurfaceCollection(), SemiImplicitSource< Type >::setFieldData(), stateFunctionObject::setTrigger(), structuredDecomp::structuredDecomp(), solution::upgradeSolverDict(), averageCondition::write(), and mappedPatchBase::writeIOField().
Foam::entry * set | ( | const entry & | e | ) |
Assign a new entry, overwriting any existing entry.
Definition at line 867 of file dictionary.C.
References Foam::constant::electromagnetic::e, and Foam::BitOps::set().
Foam::entry * set | ( | const keyType & | k, |
const dictionary & | v | ||
) |
Assign a dictionary entry, overwriting any existing entry.
Definition at line 873 of file dictionary.C.
References k, and Foam::BitOps::set().
Assign a T entry, overwriting any existing entry.
Remove an entry specified by keyword.
Definition at line 582 of file dictionarySearch.C.
Referenced by removeEntry::execute(), and thermalShellFvPatchScalarField::write().
bool changeKeyword | ( | const keyType & | oldKeyword, |
const keyType & | newKeyword, | ||
bool | overwrite = false |
||
) |
Change the keyword for an entry,.
overwrite | force overwrite of an existing entry. |
Definition at line 611 of file dictionarySearch.C.
References Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, IOWarningInFunction, keyType::isPattern(), Foam::name(), and Foam::nl.
Referenced by CodedSource< Type >::redirectFvOption().
bool merge | ( | const dictionary & | dict | ) |
Merge entries from the given dictionary.
Also merge sub-dictionaries as required.
Definition at line 879 of file dictionary.C.
References Foam::abort(), Foam::add(), dict, Foam::constant::electromagnetic::e, Foam::FatalIOError, FatalIOErrorInFunction, Foam::name(), and Foam::nl.
Referenced by dictionary::add(), snappyLayerDriver::addLayers(), Time::readDict(), and functionObjectList::readFunctionObject().
void clear | ( | ) |
Clear the dictionary.
Definition at line 924 of file dictionary.C.
References clear().
Referenced by Foam::operator>>(), and strainRateFunction::read().
void transfer | ( | dictionary & | dict | ) |
Transfer the contents of the argument and annul the argument.
Definition at line 933 of file dictionary.C.
References dict, Foam::name(), and dictionary::name().
Referenced by csvTableReader< Type >::operator()(), and meshRefinement::updateMesh().
Check after reading if the input token stream has unconsumed tokens remaining or if there were no tokens in the first place.
Emits FatalIOError
Definition at line 258 of file dictionary.C.
References JobInfo::constructed, Foam::endl(), Foam::exit(), Foam::FatalIOError, IOstream::lineNumber(), Foam::name(), Foam::nl, and ITstream::nRemainingTokens().
Read dictionary from Istream.
Definition at line 141 of file dictionaryIO.C.
References Foam::read().
Referenced by atmAmbientTurbSource::atmAmbientTurbSource(), atmBuoyancyTurbSource::atmBuoyancyTurbSource(), atmLengthScaleTurbSource::atmLengthScaleTurbSource(), atmPlantCanopyTurbSource::atmPlantCanopyTurbSource(), dictionary::dictionary(), includeEtcEntry::execute(), includeEntry::execute(), calcEntry::execute(), codeStream::execute(), Foam::operator>>(), vanDriestDelta::read(), PrandtlDelta::read(), smoothDelta::read(), and PDRblock::read().
Read dictionary from Istream, optionally keeping the header.
Definition at line 77 of file dictionaryIO.C.
References IOstream::bad(), token::BEGIN_BLOCK, token::END_BLOCK, Foam::endl(), IOstream::eof(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, entry::GLOBAL, IOstream::good(), InfoInFunction, Foam::name(), entry::New(), Foam::nl, and Istream::putBack().
void writeEntry | ( | Ostream & | os | ) | const |
Write sub-dictionary with its dictName as its header.
Definition at line 164 of file dictionaryIO.C.
References Ostream::beginBlock(), dictName(), and Ostream::endBlock().
Referenced by dictionaryEntry::write(), and thermalBaffleFvPatchScalarField::write().
Write sub-dictionary with the keyword as its header.
Definition at line 172 of file dictionaryIO.C.
References Ostream::beginBlock(), and Ostream::endBlock().
Write dictionary entries.
extraNewLine | adds additional newline between entries for "top-level" dictionaries |
Definition at line 180 of file dictionaryIO.C.
References Foam::constant::electromagnetic::e, Foam::endl(), IOstream::good(), Foam::name(), Foam::nl, dictionary::null, and WarningInFunction.
Write dictionary, normally with sub-dictionary formatting.
Definition at line 206 of file dictionaryIO.C.
References Ostream::beginBlock(), Ostream::endBlock(), and Foam::nl.
Referenced by Foam::entryToString(), Foam::operator<<(), dictionaryListEntry::write(), vibrationShellFvPatchScalarField::write(), thermalShellFvPatchScalarField::write(), objectiveIncompressible::write(), fieldDictionary::writeData(), baseIOdictionary::writeData(), and surfaceFeatures::writeDict().
Foam::dictionary::const_searcher csearch | ( | const word & | keyword, |
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Search dictionary for given keyword.
Default search: non-recursive with patterns.
recursive | search parent dictionaries |
patternMatch | use regular expressions |
Definition at line 265 of file dictionarySearch.C.
References dictionary::null, keyType::RECURSIVE, keyType::REGEX, and dictionary::Searcher< Const >::set().
Referenced by decompositionMethod::findCoeffsDict(), meshRefinement::lookup(), decompositionMethod::optionalRegionDict(), and meshRefinement::subDict().
Foam::dictionary::const_searcher search | ( | const word & | keyword, |
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Search dictionary for given keyword.
Default search: non-recursive with patterns.
recursive | search parent dictionaries |
patternMatch | use regular expressions |
Definition at line 303 of file dictionarySearch.C.
Referenced by entry::New().
Foam::dictionary::searcher search | ( | const word & | keyword, |
enum keyType::option | matchOpt = keyType::REGEX |
||
) |
Search dictionary for given keyword.
Default search: non-recursive with patterns.
recursive | search parent dictionaries |
patternMatch | use regular expressions |
Definition at line 313 of file dictionarySearch.C.
Foam::dictionary::const_searcher csearchScoped | ( | const word & | keyword, |
enum keyType::option | matchOpt | ||
) | const |
Search using scoping.
There are two types of scoping available:
For dot-scoping, a leading '^' traverses to the top-level dictionary, leading dots mean use the parent dictionary and an intermediate dot separates a sub-dictionary or sub-entry. However, since the use of dots is ambiguous ("a.b.c" could be an entry itself or represent a "bc" entry from dictionary "a" etc), the heuristic backtracks and attempts successively longer top-level entries until a suitable match is found.
For slash-scoping, semantics similar to directory structures are used. A leading '/' traverses to the top-level dictionary, a single leading or intermediate '.' references the current dictionary level. A '..' pair references the parent dictionary. Any doubled slashes are silently ignored. Since a slash is not a valid keyword character, there is no ambiguity between separator and content.
recursive | search parent dictionaries |
patternMatch | use regular expressions |
Definition at line 325 of file dictionarySearch.C.
References dictionary::null, and keyType::RECURSIVE.
Referenced by entry::New().
Foam::dictionary::const_searcher searchScoped | ( | const word & | keyword, |
enum keyType::option | matchOpt | ||
) | const |
Search using dot or slash scoping.
recursive | search parent dictionaries |
patternMatch | use regular expressions |
Definition at line 355 of file dictionarySearch.C.
Referenced by removeEntry::execute(), and entry::New().
Foam::dictionary::searcher searchScoped | ( | const word & | keyword, |
enum keyType::option | matchOpt | ||
) |
Search using dot or slash scoping.
recursive | search parent dictionaries |
patternMatch | use regular expressions |
Definition at line 365 of file dictionarySearch.C.
const Foam::dictionary * cfindScopedDict | ( | const fileName & | dictPath | ) | const |
Locate a sub-dictionary using slash-scoping.
Definition at line 377 of file dictionarySearch.C.
References fileName::clean(), fileName::components(), entry::dictPtr(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, fileName::isAbsolute(), entry::isDict(), Foam::nl, dictionary::null, and path().
const Foam::dictionary * findScopedDict | ( | const fileName & | dictPath | ) | const |
Locate a sub-dictionary using slash-scoping.
Definition at line 462 of file dictionarySearch.C.
Foam::dictionary * findScopedDict | ( | const fileName & | dictPath | ) |
Locate a sub-dictionary using slash-scoping.
Definition at line 471 of file dictionarySearch.C.
Foam::dictionary * makeScopedDict | ( | const fileName & | dictPath | ) |
Locate existing or create sub-dictionary using slash-scoping.
Definition at line 480 of file dictionarySearch.C.
References dictionary::add(), fileName::clean(), entry::dictPtr(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, fileName::isAbsolute(), entry::isDict(), Foam::nl, dictionary::null, path(), and Foam::stringOps::split().
Referenced by entry::New().
Foam::dictionary::const_searcher csearchCompat | ( | const word & | keyword, |
std::initializer_list< std::pair< const char *, int >> | compat, | ||
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Search dictionary for given keyword and any compatibility names.
Default search: non-recursive with patterns.
compat | list of old compatibility keywords and the last OpenFOAM version for which they were used. Old version 1600=OpenFOAM-v3.0, 240=OpenFOAM-2.4.x, 170=OpenFOAM-1.7.x,... |
recursive | search parent dictionaries |
patternMatch | use regular expressions |
Definition at line 51 of file dictionaryCompat.C.
References Foam::endl(), dictionary::Searcher< Const >::good(), Foam::name(), Foam::nl, and validate().
Referenced by functionObject::New().
bool foundCompat | ( | const word & | keyword, |
std::initializer_list< std::pair< const char *, int >> | compat, | ||
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Search dictionary for given keyword and any compatibility names.
Default search: non-recursive with patterns.
compat | list of old compatibility keywords and the last OpenFOAM version for which they were used. |
recursive | search parent dictionaries |
patternMatch | use regular expressions |
Definition at line 99 of file dictionaryCompat.C.
const Foam::entry * findCompat | ( | const word & | keyword, |
std::initializer_list< std::pair< const char *, int >> | compat, | ||
enum keyType::option | matchOpt | ||
) | const |
Find and return an entry pointer if present, or return a nullptr, using any compatibility names if needed.
compat | list of old compatibility keywords and the last OpenFOAM version for which they were used. |
recursive | search parent dictionaries |
patternMatch | use regular expressions |
Definition at line 110 of file dictionaryCompat.C.
const Foam::entry & lookupEntryCompat | ( | const word & | keyword, |
std::initializer_list< std::pair< const char *, int >> | compat, | ||
enum keyType::option | matchOpt | ||
) | const |
Find and return an entry if present, otherwise FatalIOError, using any compatibility names if needed.
compat | list of old compatibility keywords and the last OpenFOAM version for which they were used. |
recursive | search parent dictionaries |
patternMatch | use regular expressions |
Definition at line 121 of file dictionaryCompat.C.
References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::name(), and dictionary::Searcher< Const >::ref().
Foam::ITstream & lookupCompat | ( | const word & | keyword, |
std::initializer_list< std::pair< const char *, int >> | compat, | ||
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Find and return an entry data stream, using any compatibility names if needed.
Default search: non-recursive with patterns.
compat | list of old compatibility keywords and the last OpenFOAM version for which they were used. |
recursive | search parent dictionaries |
patternMatch | use regular expressions |
Definition at line 142 of file dictionaryCompat.C.
T getCompat | ( | const word & | keyword, |
std::initializer_list< std::pair< const char *, int >> | compat, | ||
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Find and return a T using any compatibility names if needed. FatalIOError if not found, or if there are excess tokens.
Default search: non-recursive with patterns.
compat | list of old compatibility keywords and the last OpenFOAM version for which they were used. |
recursive | search parent dictionaries |
patternMatch | use regular expressions |
Definition at line 108 of file dictionaryTemplates.C.
References Foam::T().
Referenced by basicChemistryModel::New(), motionSolver::New(), and plane::plane().
T getOrDefaultCompat | ( | const word & | keyword, |
std::initializer_list< std::pair< const char *, int >> | compat, | ||
const T & | deflt, | ||
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Find and return a T, or return the given default value using any compatibility names if needed.
Default search: non-recursive with patterns.
compat | list of old compatibility keywords and the last OpenFOAM version for which they were used. |
recursive | search parent dictionaries |
patternMatch | use regular expressions |
Definition at line 444 of file dictionaryTemplates.C.
References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::nl, dictionary::Searcher< Const >::ptr(), and Foam::T().
bool readCompat | ( | const word & | keyword, |
std::initializer_list< std::pair< const char *, int >> | compat, | ||
T & | val, | ||
enum keyType::option | matchOpt = keyType::REGEX , |
||
bool | mandatory = true |
||
) | const |
Find entry and assign to T val using any compatibility names if needed. FatalIOError if there are excess tokens.
Default search: non-recursive with patterns.
compat | list of old compatibility keywords and the last OpenFOAM version for which they were used. |
val | the value to read |
recursive | search parent dictionaries |
patternMatch | use regular expressions |
Definition at line 384 of file dictionaryTemplates.C.
References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::name(), Foam::nl, and dictionary::Searcher< Const >::ptr().
Referenced by codedPoints0MotionSolver::codedPoints0MotionSolver(), and RASModelVariables::New().
bool readIfPresentCompat | ( | const word & | keyword, |
std::initializer_list< std::pair< const char *, int >> | compat, | ||
T & | val, | ||
enum keyType::option | matchOpt = keyType::REGEX |
||
) | const |
Find an entry if present, and assign to T val using any compatibility names if needed. FatalIOError if it is found and there are excess tokens.
Default search: non-recursive with patterns.
compat | list of old compatibility keywords and the last OpenFOAM version for which they were used. |
val | the value to read |
recursive | search parent dictionaries |
patternMatch | use regular expressions |
Definition at line 485 of file dictionaryTemplates.C.
Referenced by solidProperties::readIfPresent().
void operator= | ( | const dictionary & | rhs | ) |
Copy assignment.
Definition at line 948 of file dictionary.C.
References Foam::add(), clear(), Foam::constant::electromagnetic::e, Foam::name(), and dictionary::name().
Referenced by dictionary::dictionary(), IOdictionary::IOdictionary(), localIOdictionary::localIOdictionary(), baseIOdictionary::operator=(), and unwatchedIOdictionary::unwatchedIOdictionary().
void operator+= | ( | const dictionary & | rhs | ) |
Include entries from the given dictionary.
Warn, but do not overwrite existing entries.
Definition at line 968 of file dictionary.C.
References Foam::abort(), Foam::add(), Foam::constant::electromagnetic::e, Foam::FatalIOError, FatalIOErrorInFunction, Foam::name(), and Foam::nl.
void operator|= | ( | const dictionary & | rhs | ) |
Conditionally include entries from the given dictionary.
Do not overwrite existing entries.
Definition at line 985 of file dictionary.C.
References Foam::abort(), Foam::add(), Foam::constant::electromagnetic::e, Foam::FatalIOError, FatalIOErrorInFunction, found, Foam::name(), and Foam::nl.
void operator<<= | ( | const dictionary & | rhs | ) |
Unconditionally include entries from the given dictionary.
Overwrite existing entries.
Definition at line 1005 of file dictionary.C.
References Foam::abort(), Foam::constant::electromagnetic::e, Foam::FatalIOError, FatalIOErrorInFunction, Foam::name(), Foam::nl, and Foam::BitOps::set().
|
inline |
Find and return a T, or return the given default value. FatalIOError if it is found and the number of tokens is incorrect.
matchOpt | the default search is non-recursive with patterns |
Definition at line 1244 of file dictionary.H.
|
inline |
Find and return a T, or return the given default value and add it to dictionary. FatalIOError if it is found and the number of tokens is incorrect.
matchOpt | the default search is non-recursive with patterns |
Definition at line 1261 of file dictionary.H.
|
inline |
Find and return a T, or return the given default value using any compatibility names if needed.
Default search: non-recursive with patterns.
compat | list of old compatibility keywords and the last OpenFOAM version for which they were used. |
recursive | search parent dictionaries |
patternMatch | use regular expressions |
Definition at line 1280 of file dictionary.H.
Deprecated(2018-07) find and return an entry data stream.
Definition at line 1294 of file dictionary.H.
References dictionary::lookup().
Deprecated(2018-10)
Definition at line 1303 of file dictionary.H.
References dictionary::found().
Deprecated(2018-10)
Definition at line 1316 of file dictionary.H.
References dictionary::findEntry().
|
inline |
Deprecated(2018-10)
Definition at line 1329 of file dictionary.H.
References dictionary::findEntry().
|
inline |
Deprecated(2018-10)
Definition at line 1342 of file dictionary.H.
References dictionary::findScoped().
|
inline |
Deprecated(2018-10)
Find and return a sub-dictionary pointer if present (and a sub-dictionary) otherwise return nullptr.
Search type: non-recursive with patterns.
Definition at line 1358 of file dictionary.H.
References dictionary::findDict(), and keyType::REGEX.
|
inline |
Deprecated(2018-10) Find and return a sub-dictionary pointer if present
(and a sub-dictionary) otherwise return nullptr.
Search type: non-recursive with patterns.
Definition at line 1370 of file dictionary.H.
References dictionary::findDict(), and keyType::REGEX.
Deprecated(2018-10)
Definition at line 1379 of file dictionary.H.
References dictionary::lookupEntry().
Deprecated(2018-10)
Definition at line 1392 of file dictionary.H.
References dictionary::lookup().
|
inline |
Deprecated(2018-10)
Definition at line 1406 of file dictionary.H.
References dictionary::getOrDefault().
|
inline |
Deprecated(2018-10)
Definition at line 1421 of file dictionary.H.
References dictionary::getOrAdd().
|
inline |
Deprecated(2018-10)
Definition at line 1436 of file dictionary.H.
References dictionary::readIfPresent().
|
inline |
Deprecated(2018-10) find and return a T.
Definition at line 1456 of file dictionary.H.
|
inline |
Same as get< bool >(const word&, keyType::option)
Definition at line 1496 of file dictionary.H.
|
inline |
Same as get< label >(const word&, keyType::option)
Definition at line 1497 of file dictionary.H.
|
inline |
Same as get< scalar >(const word&, keyType::option)
Definition at line 1498 of file dictionary.H.
|
inline |
Same as get< string >(const word&, keyType::option)
Definition at line 1499 of file dictionary.H.
|
inline |
Same as get< word >(const word&, keyType::option)
Definition at line 1500 of file dictionary.H.
Referenced by incompressibleInterPhaseTransportModel< Mixture >::incompressibleInterPhaseTransportModel().
|
inline |
Same as get< fileName >(const word&, keyType::option)
Definition at line 1501 of file dictionary.H.
Foam::wordList sortedToc | ( | const Compare & | comp | ) | const |
Definition at line 59 of file dictionaryTemplates.C.
Foam::entry* add | ( | const keyType & | k, |
const T & | v, | ||
bool | overwrite | ||
) |
Definition at line 66 of file dictionaryTemplates.C.
References Foam::add(), and k.
Foam::entry* set | ( | const keyType & | k, |
const T & | v | ||
) |
Definition at line 73 of file dictionaryTemplates.C.
References k, and Foam::BitOps::set().
|
friend |
Declare friendship with the entry class for IO.
Definition at line 276 of file dictionary.H.
|
friend |
Read dictionary from Istream.
|
friend |
Write dictionary to Ostream.
friend const_searcher |
Declare friendship with the searcher classes.
Definition at line 279 of file dictionary.H.
friend searcher |
Definition at line 280 of file dictionary.H.
|
static |
Report optional keywords and values if not present in dictionary.
For value greater than 1: fatal. Set/unset via an InfoSwitch
Definition at line 382 of file dictionary.H.
|
static |
An empty dictionary, which is also the parent for all dictionaries.
Definition at line 385 of file dictionary.H.
Referenced by cellModel::cellModel(), dictionary::cfindScopedDict(), entry::clone(), Stokes< BasicTurbulenceModel >::coeffDict(), dictionary::csearch(), dictionary::csearchScoped(), primitiveEntry::dict(), Foam::dimensionedConstant(), directionalPressureGradientExplicitSource::directionalPressureGradientExplicitSource(), writerCaching::fieldsDict(), decompositionMethod::findCoeffsDict(), dictionary::makeScopedDict(), RASModelVariables::New(), entry::New(), functionObjectList::New(), phase::iNew::operator()(), motionSolver::iNew::operator()(), phaseModel::iNew::operator()(), sizeGroup::iNew::operator()(), Foam::operator>>(), Foam::functionObjects::operator>>(), decompositionMethod::optionalRegionDict(), PDRblock::PDRblock(), primitiveEntry::primitiveEntry(), meshRefinement::subDict(), triSurfaceMeshPointSet::triSurfaceMeshPointSet(), dynamicCodeContext::valid(), and dictionary::writeEntries().