dictionary Class Reference

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...

Inheritance diagram for dictionary:
[legend]
Collaboration diagram for dictionary:
[legend]

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 ()
 Construct top-level dictionary null. 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< dictionaryclone () const
 Construct and return clone. More...
 
virtual ~dictionary ()
 Destructor. More...
 
const fileNamename () const
 The dictionary name. More...
 
fileNamename ()
 The dictionary name for modification (use with caution). More...
 
word dictName () const
 The local dictionary name (final part of scoped name) More...
 
const dictionaryparent () const
 Return the parent dictionary. More...
 
const dictionarytopDict () 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...
 
entryfindEntry (const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
 Find for an entry (non-const access) with the given keyword. More...
 
const entryfindEntry (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Find an entry (const access) with the given keyword. More...
 
const entryfindScoped (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Search for a scoped entry (const access) with the given keyword. More...
 
dictionaryfindDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
 Find and return a sub-dictionary pointer if present. More...
 
const dictionaryfindDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Find and return a sub-dictionary pointer if present. More...
 
const entrylookupEntry (const word &keyword, enum keyType::option matchOpt) const
 Search for an entry (const access) with the given keyword. More...
 
ITstreamlookup (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) const
 Check if entry is found and and is a sub-dictionary. More...
 
const dictionarysubDict (const word &keyword) const
 Find and return a sub-dictionary. More...
 
dictionarysubDict (const word &keyword)
 Find and return a sub-dictionary for manipulation. More...
 
dictionary subOrEmptyDict (const word &keyword, const bool mandatory=false) const
 
const dictionaryoptionalSubDict (const word &keyword) 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< keyTypekeys (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...
 
entryadd (entry *entryPtr, bool mergeEntry=false)
 Add a new entry. More...
 
entryadd (const entry &e, bool mergeEntry=false)
 Add an entry. More...
 
entryadd (const keyType &k, const word &v, bool overwrite=false)
 Add a word entry. More...
 
entryadd (const keyType &k, const string &v, bool overwrite=false)
 Add a string entry. More...
 
entryadd (const keyType &k, const label v, bool overwrite=false)
 Add a label entry. More...
 
entryadd (const keyType &k, const scalar v, bool overwrite=false)
 Add a scalar entry. More...
 
entryadd (const keyType &k, const dictionary &d, bool mergeEntry=false)
 Add a dictionary entry. More...
 
template<class T >
entryadd (const keyType &k, const T &v, bool overwrite=false)
 Add a T entry. More...
 
entryset (entry *entryPtr)
 Assign a new entry, overwriting any existing entry. More...
 
entryset (const entry &e)
 Assign a new entry, overwriting any existing entry. More...
 
entryset (const keyType &k, const dictionary &v)
 Assign a dictionary entry, overwriting any existing entry. More...
 
template<class T >
entryset (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 (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 dictionarycfindScopedDict (const fileName &dictPath) const
 Locate a sub-dictionary using slash-scoping. More...
 
const dictionaryfindScopedDict (const fileName &dictPath) const
 Locate a sub-dictionary using slash-scoping. More...
 
dictionaryfindScopedDict (const fileName &dictPath)
 Locate a sub-dictionary using slash-scoping. More...
 
dictionarymakeScopedDict (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 entryfindCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option) const
 
const entrylookupEntryCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option) const
 
ITstreamlookupCompat (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
 
ITstreamFOAM_DEPRECATED_FOR (2018-07, "lookup() method") operator[](const word &keyword) const
 Deprecated(2018-07) find and return an entry data stream. More...
 
template<class T >
T FOAM_DEPRECATED_FOR (2018-10, "get() method") lookupType(const word &keyword
 Deprecated(2018-10) find and return a T. 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::entryadd (const keyType &k, const T &v, bool overwrite)
 
template<class T >
Foam::entryset (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< dictionaryNew (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
 
T bool recursive = false
 
T bool bool patternMatch
 

Static Public Attributes

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...
 
Istreamoperator>> (Istream &is, dictionary &dict)
 Read dictionary from Istream. More...
 
Ostreamoperator<< (Ostream &os, const dictionary &dict)
 Write dictionary to Ostream. More...
 

Detailed Description

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:

  • exact match
  • pattern match (in reverse order)
  • optional recursion into the enclosing (parent) dictionaries

The dictionary class is the base class for IOdictionary and also serves as a bootstrap dictionary for the objectRegistry data dictionaries.

Note
Within dictionaries, entries can be referenced by using the '$' syntax familiar from shell programming. A '.' separator is used when referencing sub-dictionary entries. Leading '.' prefixes can be used to specify an entry from a parent dictionary. An initial '^' anchor (or ':' for backward compatibility) specifies starting from the top-level entry. For example,
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.

Source files
See also

Definition at line 120 of file dictionary.H.

Member Typedef Documentation

◆ const_searcher

typedef Searcher<true> const_searcher

Searcher with const access.

Definition at line 266 of file dictionary.H.

◆ searcher

typedef Searcher<false> searcher

Searcher with non-const access.

Definition at line 269 of file dictionary.H.

Constructor & Destructor Documentation

◆ dictionary() [1/10]

Construct top-level dictionary null.

Definition at line 53 of file dictionary.C.

Referenced by data::data().

Here is the caller graph for this function:

◆ dictionary() [2/10]

dictionary ( const fileName name)
explicit

Construct top-level empty dictionary with given name.

Definition at line 60 of file dictionary.C.

◆ dictionary() [3/10]

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().

Here is the call graph for this function:

◆ dictionary() [4/10]

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() [5/10]

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().

Here is the call graph for this function:

◆ dictionary() [6/10]

dictionary ( const dictionary parentDict,
const dictionary dict 
)

Copy construct given the parent dictionary.

Definition at line 68 of file dictionary.C.

References Foam::constant::electromagnetic::e.

◆ dictionary() [7/10]

dictionary ( const dictionary dict)

Copy construct top-level dictionary.

Definition at line 91 of file dictionary.C.

References Foam::constant::electromagnetic::e.

◆ dictionary() [8/10]

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 112 of file dictionary.C.

References dict, and dictionary::operator=().

Here is the call graph for this function:

◆ dictionary() [9/10]

dictionary ( const dictionary parentDict,
dictionary &&  dict 
)

Move construct for given parent dictionary.

Definition at line 125 of file dictionary.C.

References dict, Foam::name(), and dictionary::name().

Here is the call graph for this function:

◆ dictionary() [10/10]

dictionary ( dictionary &&  dict)

Move construct top-level dictionary.

Definition at line 139 of file dictionary.C.

References dict.

◆ ~dictionary()

~dictionary ( )
virtual

Destructor.

Definition at line 158 of file dictionary.C.

Member Function Documentation

◆ ClassName()

ClassName ( "dictionary"  )

◆ clone()

Foam::autoPtr< Foam::dictionary > clone ( ) const

Construct and return clone.

Definition at line 150 of file dictionary.C.

References autoPtr< T >::New().

Referenced by hexRef8Data::hexRef8Data(), Foam::preservePatchTypes(), and refinementSurfaces::refinementSurfaces().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ New()

Foam::autoPtr< Foam::dictionary > New ( Istream is)
static

Construct top-level dictionary on freestore from Istream.

Definition at line 69 of file dictionaryIO.C.

References autoPtr< T >::New().

Here is the call graph for this function:

◆ name() [1/2]

◆ name() [2/2]

fileName& name ( )
inline

The dictionary name for modification (use with caution).

Definition at line 439 of file dictionary.H.

◆ dictName()

word dictName ( ) const
inline

The local dictionary name (final part of scoped name)

Definition at line 445 of file dictionary.H.

References fileName::name().

Referenced by radiation::addSup(), interRegionHeatTransferModel::addSup(), effectivenessHeatExchangerSource::addSup(), hydrostaticPressure::calculateAndWrite(), variableHeatTransfer::calculateHtc(), limitTemperature::correct(), ReynoldsAnalogy::devReff(), forces::devRhoReff(), effectivenessHeatExchangerSource::effectivenessHeatExchangerSource(), wallHeatFlux::execute(), jouleHeatingSource::jouleHeatingSource(), temperatureCoupledBase::kappa(), forces::mu(), profileModel::New(), thermophysicalProperties::New(), basicSolidChemistryModel::New(), liquidProperties::New(), objectiveIncompressible::New(), heatTransferCoeffModel::q(), solidificationMeltingSource::solidificationMeltingSource(), fixedUnburntEnthalpyFvPatchScalarField::updateCoeffs(), mixedUnburntEnthalpyFvPatchScalarField::updateCoeffs(), gradientUnburntEnthalpyFvPatchScalarField::updateCoeffs(), outletMappedUniformInletHeatAdditionFvPatchField::updateCoeffs(), turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs(), outletMachNumberPressureFvPatchScalarField::updateCoeffs(), viscousDissipation::viscousDissipation(), WLFTransport< Thermo >::write(), and eRefConstThermo< EquationOfState >::write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parent()

const dictionary& parent ( ) const
inline

Return the parent dictionary.

Definition at line 459 of file dictionary.H.

◆ topDict()

const Foam::dictionary & topDict ( ) const

Return the top of the tree.

Definition at line 164 of file dictionary.C.

References p.

Referenced by includeEntry::execute(), and sincludeEntry::execute().

Here is the caller graph for this function:

◆ startLineNumber()

Foam::label startLineNumber ( ) const

Return line number of first token in dictionary.

Definition at line 177 of file dictionary.C.

Referenced by messageStream::operator()(), IOerror::operator()(), and codedBase::updateLibrary().

Here is the caller graph for this function:

◆ endLineNumber()

Foam::label endLineNumber ( ) const

Return line number of last token in dictionary.

Definition at line 188 of file dictionary.C.

Referenced by messageStream::operator()(), and IOerror::operator()().

Here is the caller graph for this function:

◆ digest()

Foam::SHA1Digest digest ( ) const

Return the SHA1 digest of the dictionary contents.

Definition at line 199 of file dictionary.C.

References OSHA1streamAllocator::digest(), and Foam::constant::electromagnetic::e.

Referenced by functionObjectList::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tokens()

Foam::tokenList tokens ( ) const

Return the dictionary as a list of tokens.

Definition at line 213 of file dictionary.C.

References Foam::constant::electromagnetic::e, ITstream::parse(), and StringStreamAllocator< StreamType >::str().

Here is the call graph for this function:

◆ found()

bool found ( const word keyword,
enum keyType::option  matchOpt = keyType::REGEX 
) const

Search for an entry (const access) with the given keyword.

Parameters
matchOptthe default search is non-recursive with patterns
Returns
True if entry was found

Definition at line 331 of file dictionary.C.

Referenced by sixDoFRigidBodyMotion::addConstraints(), sixDoFRigidBodyMotion::addRestraints(), advectiveFvPatchField< Type >::advectiveFvPatchField(), angularOscillatingDisplacementPointPatchVectorField::angularOscillatingDisplacementPointPatchVectorField(), angularOscillatingVelocityPointPatchVectorField::angularOscillatingVelocityPointPatchVectorField(), equationMaxIterCondition::apply(), equationInitialResidualCondition::apply(), atmBoundaryLayerInletEpsilonFvPatchScalarField::atmBoundaryLayerInletEpsilonFvPatchScalarField(), atmBoundaryLayerInletKFvPatchScalarField::atmBoundaryLayerInletKFvPatchScalarField(), atmBoundaryLayerInletVelocityFvPatchVectorField::atmBoundaryLayerInletVelocityFvPatchVectorField(), averageCondition::averageCondition(), DAC< CompType, ThermoType >::DAC(), Foam::dimensionedConstant(), DRG< CompType, ThermoType >::DRG(), DRGEP< CompType, ThermoType >::DRGEP(), filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField(), stateFunctionObject::foundProperty(), subModelBase::getModelDict(), subModelBase::getModelProperty(), stateFunctionObject::getObjectDict(), stateFunctionObject::getObjectProperty(), stateFunctionObject::getObjectResult(), refinementParameters::getZoneInfo(), humidityTemperatureCoupledMixedFvPatchScalarField::humidityTemperatureCoupledMixedFvPatchScalarField(), oversetFvPatchField< Type >::initEvaluate(), solverInfo::initialiseResidualField(), layerParameters::layerParameters(), NamedEnum< EnumType, nEnum >::lookupOrDefault(), basicThermo::lookupThermo(), mappedPatchBase::mappedPatchBase(), laminarModel< BasicTurbulenceModel >::New(), liquidProperties::New(), waveModel::New(), stateFunctionObject::objectResultEntries(), stateFunctionObject::objectResultType(), oldCyclicPolyPatch::oldCyclicPolyPatch(), oscillatingDisplacementPointPatchVectorField::oscillatingDisplacementPointPatchVectorField(), oscillatingVelocityPointPatchVectorField::oscillatingVelocityPointPatchVectorField(), PFA< CompType, ThermoType >::PFA(), Foam::preservePatchTypes(), stateFunctionObject::propertyDict(), tolerances::read(), fixedTemperatureConstraint::read(), multiphaseMangrovesTurbulenceModel::read(), Time::readDict(), functionObjectList::readFunctionObject(), liquidProperties::readIfPresent(), refinementSurfaces::refinementSurfaces(), rigidBodyMeshMotion::rigidBodyMeshMotion(), rigidBodyMeshMotionSolver::rigidBodyMeshMotionSolver(), rigidBodyModel::rigidBodyModel(), sampledCuttingPlane::sampledCuttingPlane(), sampledCuttingSurface::sampledCuttingSurface(), 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(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField(), uniformInterpolatedDisplacementPointPatchVectorField::uniformInterpolatedDisplacementPointPatchVectorField(), Foam::unitSet(), solverInfo::updateSolverInfo(), waveMakerPointPatchVectorField::waveMakerPointPatchVectorField(), averageCondition::write(), stateFunctionObject::writeAllResultEntries(), ensightWriter::writeCollated(), stateFunctionObject::writeResultEntries(), writer::writeSolution(), and zeroATCcells::zeroATCcells().

◆ findEntry() [1/2]

Foam::entry * findEntry ( const word keyword,
enum keyType::option  matchOpt = keyType::REGEX 
)

Find for an entry (non-const access) with the given keyword.

Parameters
matchOptthe search mode
Returns
the entry pointer found or a nullptr.

Definition at line 341 of file dictionary.C.

References Foam::search().

Referenced by sampledSurfaces::read(), refinementSurfaces::refinementSurfaces(), dynamicCodeContext::setCodeContext(), shellSurfaces::shellSurfaces(), Switch::Switch(), and solution::upgradeSolverDict().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findEntry() [2/2]

const Foam::entry * findEntry ( const word keyword,
enum keyType::option  matchOpt = keyType::REGEX 
) const

Find an entry (const access) with the given keyword.

Parameters
matchOptthe default search is non-recursive with patterns
Returns
the entry pointer found or a nullptr.

Definition at line 351 of file dictionary.C.

◆ findScoped()

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.

Parameters
matchOptthe default search is non-recursive with patterns
Returns
the entry pointer found or a nullptr.

Definition at line 361 of file dictionary.C.

◆ findDict() [1/2]

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.

Parameters
matchOptthe default search is non-recursive with patterns

Definition at line 468 of file dictionary.C.

References Foam::search().

Referenced by oversetFvPatchField< Type >::initEvaluate(), loopControl::loopControl(), namedBlock::namedBlock(), namedVertex::namedVertex(), blockVertex::read(), adjointRASModel::read(), Time::readDict(), lumpedPointMovement::readDict(), functionObjectList::readFunctionObject(), Time::setMonitoring(), Foam::unitSet(), blockVertex::write(), and blockDescriptor::write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findDict() [2/2]

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.

Parameters
matchOptthe default search is non-recursive with patterns

Definition at line 478 of file dictionary.C.

◆ lookupEntry()

const Foam::entry & lookupEntry ( const word keyword,
enum keyType::option  matchOpt 
) const

Search for an entry (const access) with the given keyword.

Parameters
matchOptthe default search is non-recursive with patterns
Returns
return an entry if present, otherwise FatalIOError.

Definition at line 371 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(), lduMatrix::smoother::New(), and lduMatrix::preconditioner::New().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lookup()

◆ get()

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.

Parameters
matchOptthe default search is non-recursive with patterns

Definition at line 56 of file dictionaryTemplates.C.

References Foam::T(), and Foam::val.

Referenced by geometric::add(), columnFvMeshInfo::addLocalPatches(), chemkinReader::chemkinReader(), DAC< CompType, ThermoType >::DAC(), dynamicCodeContext::dict(), Foam::dimensionedConstant(), directions::directions(), argList::displayDoc(), dynamicMultiMotionSolverFvMesh::dynamicMultiMotionSolverFvMesh(), faMesh::faMesh(), FreeStream< CloudType >::FreeStream(), InjectionModelList< Foam::KinematicCloud< Cloud< basicKinematicCollidingParcel > > >::InjectionModelList(), ISAT< CompType, ThermoType >::ISAT(), layerParameters::layerParameters(), basicThermo::lookupThermo(), medialAxisMeshMover::move(), multiDirRefinement::multiDirRefinement(), decompositionMethod::nDomains(), renumberMethod::New(), profileModel::New(), tetherPotential::New(), energyScalingFunction::New(), optionAdjoint::New(), optimisationManager::New(), objectiveManager::New(), viscosityModel::New(), coordinateRotation::New(), solidBodyMotionFunction::New(), laminarFlameSpeed::New(), pairPotential::New(), laminarModel< BasicTurbulenceModel >::New(), surfaceTensionModel::New(), adjointTurbulenceModel::New(), ATCModel::New(), liquidProperties::New(), RASModel< EddyDiffusivity< phaseCompressibleTurbulenceModel > >::New(), cellCellStencil::New(), objectiveIncompressible::New(), LESModel< BasicTurbulenceModel >::New(), pyrolysisModel::New(), updateMethod::New(), option::New(), decompositionMethod::New(), adjointRASModel::New(), lduMatrix::solver::New(), waveModel::New(), LduMatrix< Type, DType, LUType >::solver::New(), sampledSet::New(), sampledSurface::New(), functionObject::New(), LduMatrix< Type, DType, LUType >::smoother::New(), LduMatrix< Type, DType, LUType >::preconditioner::New(), decomposedBlockData::numBlocks(), objectiveIncompressible::objectiveIncompressible(), objectiveManager::objectiveManager(), offsetSurface::offsetSurface(), dynamicCodeContext::operator const dictionary &(), Foam::operator>>(), plane::plane(), solutionControl::read(), heatTransferCoeffModel::read(), multiphaseMangrovesSource::read(), multiphaseMangrovesTurbulenceModel::read(), patchProbes::read(), areaWrite::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(), sensitivity::sensitivity(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::setCdSigma(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::setPorosityCoefficient(), surfaceFeatures::surfaceFeatures(), Switch::Switch(), Foam::unitSet(), dynamicRefineFvMesh::update(), WallLocalSpringSliderDashpot< CloudType >::WallLocalSpringSliderDashpot(), thermalBaffleFvPatchScalarField::write(), ensightWriter::writeCollated(), and zeroATCcells::zeroATCcells().

Here is the call graph for this function:

◆ getOrDefault()

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.

Parameters
matchOptthe default search is non-recursive with patterns

Definition at line 97 of file dictionaryTemplates.C.

References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), IOInfoInFunction, Foam::nl, dictionary::Searcher< Const >::ptr(), Foam::T(), and Foam::val.

Referenced by argList::parse().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getOrAdd()

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.

Parameters
matchOptthe default search is non-recursive with patterns

Definition at line 139 of file dictionaryTemplates.C.

References Foam::add(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), IOInfoInFunction, Foam::nl, dictionary::Searcher< Const >::ptr(), Foam::T(), and Foam::val.

Referenced by Switch::getOrAddToDict().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readEntry()

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.

Parameters
valthe value to read into
matchOptthe default search is non-recursive with patterns
mandatorythe keyword is mandatory
Returns
true if the entry was found.

Definition at line 297 of file dictionaryTemplates.C.

References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::name(), Foam::nl, dictionary::Searcher< Const >::ptr(), and Foam::val.

Referenced by advectiveFvPatchField< Type >::advectiveFvPatchField(), boxToCell::boxToCell(), boxToFace::boxToFace(), boxToPoint::boxToPoint(), BreakupModel< Foam::SprayCloud< Foam::DSMCCloud > >::BreakupModel(), cellToFace::cellToFace(), cellToPoint::cellToPoint(), cyclicAMIPolyPatch::cyclicAMIPolyPatch(), cyclicPolyPatch::cyclicPolyPatch(), argList::displayDoc(), faceToCell::faceToCell(), faceToPoint::faceToPoint(), motionSmootherAlgo::get(), meshRefinement::get(), humidityTemperatureCoupledMixedFvPatchScalarField::humidityTemperatureCoupledMixedFvPatchScalarField(), liquidFilmThermo::initLiquid(), mappedPatchBase::mappedPatchBase(), nastranWriter::nastranWriter(), combustionModel::New(), surfaceFilmModel::New(), radiationModel::New(), oldCyclicPolyPatch::oldCyclicPolyPatch(), Foam::operator>>(), argList::parse(), pointToCell::pointToCell(), pointToFace::pointToFace(), exponentialRepulsion::read(), lennardJones::read(), harmonicSpring::read(), pitchForkRing::read(), restrainedHarmonicSpring::read(), dampedCoulomb::read(), anisotropicFilter::read(), laplaceFilter::read(), sigmoid::read(), doubleSigmoid::read(), azizChen::read(), maitlandSmith::read(), thermalBaffle::read(), limitVelocity::read(), Arrhenius< ViscousModel >::read(), HerschelBulkley::read(), CrossPowerLaw::read(), powerLaw::read(), limitTemperature::read(), BirdCarreau::read(), consumptionSpeed::read(), multiphaseMangrovesSource::read(), Casson::read(), reactionRateFlameArea::read(), multiphaseMangrovesTurbulenceModel::read(), radialActuationDiskSource::read(), kinematicSingleLayer::read(), areaWrite::read(), runTimePostProcessing::read(), porosityModel::read(), sampledSets::read(), probes::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(), sampledIsoSurface::sampledIsoSurface(), sampledPlane::sampledPlane(), searchableSurfaceCollection::searchableSurfaceCollection(), reducedUnits::setRefValues(), shellSurfaces::shellSurfaces(), sixDoFRigidBodyDisplacementPointPatchVectorField::sixDoFRigidBodyDisplacementPointPatchVectorField(), sixDoFRigidBodyMotionSolver::sixDoFRigidBodyMotionSolver(), surfaceZonesInfo::surfaceZonesInfo(), constantFilmThermo::Tb(), thermoCoupleProbes::thermoCoupleProbes(), valueAverage::valueAverage(), viscousDissipation::viscousDissipation(), constantFilmThermo::W(), and writer::writeSolution().

Here is the call graph for this function:

◆ readIfPresent()

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.

Parameters
valthe value to read into
matchOptthe default search is non-recursive with patterns
Returns
true if the entry was found.

Definition at line 400 of file dictionaryTemplates.C.

References Foam::val.

Referenced by advectiveFvPatchField< Type >::advectiveFvPatchField(), averageCondition::averageCondition(), boxToCell::boxToCell(), boxToFace::boxToFace(), boxToPoint::boxToPoint(), cellToFace::cellToFace(), cellToPoint::cellToPoint(), chemkinReader::chemkinReader(), cloudSolution::cloudSolution(), cyclicAMIPolyPatch::cyclicAMIPolyPatch(), faceToCell::faceToCell(), faceToPoint::faceToPoint(), faceZoneToCell::faceZoneToCell(), fvMotionSolverEngineMesh::fvMotionSolverEngineMesh(), geometricSurfacePatch::geometricSurfacePatch(), subModelBase::getBaseProperty(), subModelBase::getModelProperty(), stateFunctionObject::getObjectProperty(), stateFunctionObject::getObjectResult(), refinementParameters::getZoneInfo(), kinematicSingleLayer::info(), layeredEngineMesh::layeredEngineMesh(), layerParameters::layerParameters(), mappedPatchBase::mappedPatchBase(), decompositionMethod::nDomains(), decompositionMethod::New(), decomposedBlockData::numBlocks(), oldCyclicPolyPatch::oldCyclicPolyPatch(), dlLibraryTable::open(), patchToCell::patchToCell(), patchToFace::patchToFace(), pointToCell::pointToCell(), pointToFace::pointToFace(), porosityModel::porosityModel(), Foam::preservePatchTypes(), maxDeltaxyz::read(), IDDESDelta::read(), heatTransferCoeffModel::read(), fixedTemperatureConstraint::read(), explicitPorositySource::read(), multiphaseMangrovesTurbulenceModel::read(), patchProbes::read(), kinematicSingleLayer::read(), areaWrite::read(), porosityModel::read(), noiseModel::read(), probes::read(), Time::readDict(), lumpedPointMovement::readDict(), IOobject::readHeader(), solidProperties::readIfPresent(), thermophysicalProperties::readIfPresent(), Switch::readIfPresent(), liquidProperties::readIfPresent(), refinementSurfaces::refinementSurfaces(), sampledCuttingPlane::sampledCuttingPlane(), sampledCuttingSurface::sampledCuttingSurface(), sampledIsoSurface::sampledIsoSurface(), sampledPlane::sampledPlane(), Time::setControls(), Time::setTime(), sixDoFRigidBodyDisplacementPointPatchVectorField::sixDoFRigidBodyDisplacementPointPatchVectorField(), fvMatrix< Type >::solveSegregatedOrCoupled(), surfaceWriter::surfaceWriter(), surfaceZonesInfo::surfaceZonesInfo(), surfZoneIdentifier::surfZoneIdentifier(), kinematicSingleLayer::transferPrimaryRegionSourceFields(), triSurfaceMesh::triSurfaceMesh(), triSurfaceSearch::triSurfaceSearch(), updateMethod::updateMethod(), x3dWriter::x3dWriter(), zoneToCell::zoneToCell(), zoneToFace::zoneToFace(), and zoneToPoint::zoneToPoint().

◆ getCheck()

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.

Parameters
predthe value check predicate
matchOptthe default search is non-recursive with patterns

Definition at line 69 of file dictionaryTemplates.C.

References Foam::T(), and Foam::val.

Here is the call graph for this function:

◆ getCheckOrDefault()

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.

Parameters
predthe value check predicate
matchOptthe default search is non-recursive with patterns

Definition at line 182 of file dictionaryTemplates.C.

References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), IOInfoInFunction, Foam::name(), Foam::nl, dictionary::Searcher< Const >::ptr(), Foam::T(), and Foam::val.

Here is the call graph for this function:

◆ getCheckOrAdd()

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.

Parameters
predthe value check predicate
matchOptthe default search is non-recursive with patterns

Definition at line 239 of file dictionaryTemplates.C.

References Foam::add(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), IOInfoInFunction, Foam::name(), Foam::nl, dictionary::Searcher< Const >::ptr(), Foam::T(), and Foam::val.

Here is the call graph for this function:

◆ readCheck()

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.

Parameters
valthe value to read into
predthe value check predicate
matchOptthe default search is non-recursive with patterns
mandatorythe keyword is mandatory
Returns
true if the entry was found.

Definition at line 329 of file dictionaryTemplates.C.

References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::name(), Foam::nl, dictionary::Searcher< Const >::ptr(), and Foam::val.

Here is the call graph for this function:

◆ readCheckIfPresent()

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.

Parameters
valthe value to read into
predthe value check predicate
matchOptthe default search is non-recursive with patterns
Returns
true if the entry was found.

Definition at line 413 of file dictionaryTemplates.C.

References Foam::val.

◆ isDict()

bool isDict ( const word keyword) const

Check if entry is found and and is a sub-dictionary.

Search type: non-recursive with patterns.

Definition at line 460 of file dictionary.C.

References keyType::REGEX.

Referenced by boundaryRadiationProperties::boundaryRadiationProperties(), stateFunctionObject::getObjectDict(), basicChemistryModel::New(), reader::remapMeshInfo(), and writer::writeSolution().

Here is the caller graph for this function:

◆ subDict() [1/2]

const Foam::dictionary & subDict ( const word keyword) const

Find and return a sub-dictionary.

Fatal if the entry does not exist or is not a sub-dictionary.

Search type: non-recursive with patterns.

Definition at line 487 of file dictionary.C.

References dictionary::Searcher< Const >::dict(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::name(), Foam::nl, and keyType::REGEX.

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(), dynamicMultiMotionSolverFvMesh::dynamicMultiMotionSolverFvMesh(), faMesh::faMesh(), stateFunctionObject::foundProperty(), subModelBase::getBaseProperty(), subModelBase::getModelDict(), subModelBase::getModelProperty(), stateFunctionObject::getObjectDict(), stateFunctionObject::getObjectProperty(), stateFunctionObject::getObjectResult(), refinementParameters::getZoneInfo(), humidityTemperatureCoupledMixedFvPatchScalarField::humidityTemperatureCoupledMixedFvPatchScalarField(), oversetFvPatchField< Type >::initEvaluate(), cloudSolution::integrationSchemes(), cloudSolution::interpolationSchemes(), basicChemistryModel::New(), basicSolidChemistryModel::New(), laminarModel< BasicTurbulenceModel >::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(), pitchForkRing::read(), restrainedHarmonicSpring::read(), dampedCoulomb::read(), tolerances::read(), sigmoid::read(), doubleSigmoid::read(), FixedValueConstraint< Type >::read(), porosityModelList::read(), optimisationManager::read(), runTimeControl::read(), multiphaseMangrovesSource::read(), multiphaseMangrovesTurbulenceModel::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(), meshRefinement::subDict(), averageCondition::write(), thermalBaffleFvPatchScalarField::write(), stateFunctionObject::writeAllResultEntries(), stateFunctionObject::writeResultEntries(), and writer::writeSolution().

Here is the call graph for this function:

◆ subDict() [2/2]

Foam::dictionary & subDict ( const word keyword)

Find and return a sub-dictionary for manipulation.

Fatal if the entry does not exist or is not a sub-dictionary.

Search type: non-recursive with patterns.

Definition at line 504 of file dictionary.C.

References dictionary::Searcher< Const >::dict(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::name(), Foam::nl, keyType::REGEX, and Foam::search().

Here is the call graph for this function:

◆ subOrEmptyDict()

Foam::dictionary subOrEmptyDict ( const word keyword,
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.

Search type: non-recursive with patterns.

Definition at line 522 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 keyType::REGEX.

Referenced by blockDescriptor::blockDescriptor(), cloudSolution::cloudSolution(), solutionControl::dict(), subModelBase::getModelDict(), RASModelVariables::New(), solverControl::read(), areaWrite::read(), noiseModel::read(), sampledSurfaces::read(), incompressiblePrimalSolver::readDict(), incompressibleAdjointSolver::readDict(), and lumpedPointMovement::readDict().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ optionalSubDict()

const Foam::dictionary & optionalSubDict ( const word keyword) 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 558 of file dictionary.C.

References dictionary::Searcher< Const >::dict(), Foam::endl(), dictionary::Searcher< Const >::good(), IOWarningInFunction, dictionary::Searcher< Const >::isDict(), Foam::name(), and keyType::REGEX.

Referenced by geometric::add(), liquidFilmThermo::initLiquid(), liquidProperties::New(), sampledSet::New(), anisotropicFilter::read(), laplaceFilter::read(), strainRateFunction::read(), Arrhenius< ViscousModel >::read(), HerschelBulkley::read(), CrossPowerLaw::read(), powerLaw::read(), BirdCarreau::read(), solidBodyMotionFunction::read(), Casson::read(), motionSolver::read(), porosityModel::read(), and dynamicRefineFvMesh::readDict().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toc()

Foam::wordList toc ( ) const

Return the table of contents.

Definition at line 583 of file dictionary.C.

References Foam::constant::electromagnetic::e, and n.

Referenced by adjointSolverManager::adjointSolverManager(), DAC< CompType, ThermoType >::DAC(), removeEntry::execute(), FreeStream< CloudType >::FreeStream(), Foam::operator>>(), optimisationManager::optimisationManager(), pyrolysisModelCollection::pyrolysisModelCollection(), runTimeControl::read(), refinementSurfaces::refinementSurfaces(), and shellSurfaces::shellSurfaces().

Here is the caller graph for this function:

◆ sortedToc() [1/3]

Foam::wordList sortedToc ( ) const

Return the sorted table of contents.

Definition at line 597 of file dictionary.C.

Referenced by equationInitialResidualCondition::apply(), solverFieldSelection::updateSelection(), stateFunctionObject::writeAllResultEntries(), and stateFunctionObject::writeResultEntries().

Here is the caller graph for this function:

◆ sortedToc() [2/3]

wordList sortedToc ( const Compare &  comp) const

Return table of contents sorted using the specified comparator.

◆ keys()

Foam::List< Foam::keyType > keys ( bool  patterns = false) const

Return the list of available keys or patterns.

Definition at line 603 of file dictionary.C.

References Foam::constant::electromagnetic::e, n, and List< T >::resize().

Here is the call graph for this function:

◆ substituteKeyword()

bool substituteKeyword ( const word keyword,
bool  mergeEntry = false 
)

Substitute the given keyword (which is prefixed by '$')

with the corresponding sub-dictionary entries

Definition at line 400 of file dictionary.C.

References Foam::add(), Foam::constant::electromagnetic::e, and keyType::REGEX_RECURSIVE.

Here is the call graph for this function:

◆ substituteScopedKeyword()

bool substituteScopedKeyword ( const word keyword,
bool  mergeEntry = false 
)

Substitute the given scoped keyword (which is prefixed by '$')

with the corresponding sub-dictionary entries

Definition at line 429 of file dictionary.C.

References Foam::add(), Foam::constant::electromagnetic::e, and keyType::REGEX_RECURSIVE.

Referenced by entry::New().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add() [1/9]

Foam::entry * add ( entry entryPtr,
bool  mergeEntry = false 
)

Add a new entry.

Parameters
mergeEntrydictionaries are interwoven and primitive entries are overwritten
Returns
pointer to inserted entry, or place of merging or nullptr on failure

Definition at line 621 of file dictionary.C.

References append(), entry::dict(), Foam::endl(), IOWarningInFunction, entry::isDict(), keyType::isPattern(), entry::keyword(), dictionary::merge(), entry::name(), and Foam::name().

Referenced by error::abort(), IOerror::abort(), fvMeshTools::createDummyFvMeshFiles(), Foam::dimensionedConstant(), calcEntry::execute(), error::exit(), IOerror::exit(), faMesh::faMesh(), refinementParameters::getZoneInfo(), voxelMeshSearch::makeMesh(), dictionary::makeScopedDict(), namedBlock::namedBlock(), namedVertex::namedVertex(), entry::New(), lineSearch::operator++(), 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(), WLFTransport< Thermo >::write(), eRefConstThermo< EquationOfState >::write(), thermoCoupleProbes::write(), surfaceFeatures::writeDict(), and Time::writeTimeDict().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add() [2/9]

Foam::entry * add ( const entry e,
bool  mergeEntry = false 
)

Add an entry.

Parameters
mergeEntrydictionaries are interwoven and primitive entries are overwritten
Returns
pointer to inserted entry, or place of merging or nullptr on failure

Definition at line 696 of file dictionary.C.

References Foam::add(), and Foam::constant::electromagnetic::e.

Here is the call graph for this function:

◆ add() [3/9]

Foam::entry * add ( const keyType k,
const word v,
bool  overwrite = false 
)

Add a word entry.

Parameters
overwriteforce overwrite of an existing entry.
Returns
pointer to inserted entry or nullptr on failure

Definition at line 703 of file dictionary.C.

References Foam::add(), and k.

Here is the call graph for this function:

◆ add() [4/9]

Foam::entry * add ( const keyType k,
const string v,
bool  overwrite = false 
)

Add a string entry.

Parameters
overwriteforce overwrite of an existing entry.
Returns
pointer to inserted entry or nullptr on failure

Definition at line 714 of file dictionary.C.

References Foam::add(), and k.

Here is the call graph for this function:

◆ add() [5/9]

Foam::entry * add ( const keyType k,
const label  v,
bool  overwrite = false 
)

Add a label entry.

Parameters
overwriteforce overwrite of an existing entry.
Returns
pointer to inserted entry or nullptr on failure

Definition at line 725 of file dictionary.C.

References Foam::add(), and k.

Here is the call graph for this function:

◆ add() [6/9]

Foam::entry * add ( const keyType k,
const scalar  v,
bool  overwrite = false 
)

Add a scalar entry.

Parameters
overwriteforce overwrite of an existing entry.
Returns
pointer to inserted entry or nullptr on failure

Definition at line 736 of file dictionary.C.

References Foam::add(), and k.

Here is the call graph for this function:

◆ add() [7/9]

Foam::entry * add ( const keyType k,
const dictionary d,
bool  mergeEntry = false 
)

Add a dictionary entry.

Parameters
mergeEntrymerge into an existing sub-dictionary
Returns
pointer to inserted entry, or place of merging or nullptr on failure

Definition at line 747 of file dictionary.C.

References Foam::add(), and k.

Here is the call graph for this function:

◆ add() [8/9]

entry* add ( const keyType k,
const T v,
bool  overwrite = false 
)

Add a T entry.

Parameters
overwriteforce overwrite of existing entry
Returns
pointer to inserted entry or nullptr on failure

◆ set() [1/5]

◆ set() [2/5]

Foam::entry * set ( const entry e)

Assign a new entry, overwriting any existing entry.

Returns
pointer to inserted entry or nullptr on failure

Definition at line 777 of file dictionary.C.

References Foam::constant::electromagnetic::e.

◆ set() [3/5]

Foam::entry * set ( const keyType k,
const dictionary v 
)

Assign a dictionary entry, overwriting any existing entry.

Returns
pointer to inserted entry or nullptr on failure

Definition at line 783 of file dictionary.C.

References k.

◆ set() [4/5]

entry* set ( const keyType k,
const T v 
)

Assign a T entry, overwriting any existing entry.

Returns
pointer to inserted entry or nullptr on failure

◆ remove()

bool remove ( const word keyword)

Remove an entry specified by keyword.

Definition at line 580 of file dictionarySearch.C.

Referenced by removeEntry::execute().

Here is the caller graph for this function:

◆ changeKeyword()

bool changeKeyword ( const keyType oldKeyword,
const keyType newKeyword,
bool  overwrite = false 
)

Change the keyword for an entry,.

Parameters
overwriteforce overwrite of an existing entry.

Definition at line 609 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ merge()

bool merge ( const dictionary dict)

Merge entries from the given dictionary.

Also merge sub-dictionaries as required.

Definition at line 789 of file dictionary.C.

References Foam::abort(), Foam::add(), dict, Foam::constant::electromagnetic::e, Foam::FatalIOError, FatalIOErrorInFunction, and Foam::name().

Referenced by dictionary::add(), snappyLayerDriver::addLayers(), Time::readDict(), and functionObjectList::readFunctionObject().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear()

void clear ( )

Clear the dictionary.

Definition at line 834 of file dictionary.C.

References clear().

Referenced by Foam::operator>>(), and strainRateFunction::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ transfer()

void transfer ( dictionary dict)

Transfer the contents of the argument and annul the argument.

Definition at line 843 of file dictionary.C.

References dict, Foam::name(), and dictionary::name().

Referenced by csvTableReader< Type >::operator()(), and meshRefinement::updateMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkITstream()

void checkITstream ( const ITstream is,
const word keyword 
) const

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 230 of file dictionary.C.

References JobInfo::constructed, Foam::endl(), Foam::exit(), Foam::FatalIOError, IOstream::lineNumber(), Foam::name(), Foam::nl, and ITstream::nRemainingTokens().

Here is the call graph for this function:

◆ read() [1/2]

bool read ( Istream is)

Read dictionary from Istream.

Definition at line 141 of file dictionaryIO.C.

References Foam::read().

Referenced by dictionary::dictionary(), calcEntry::execute(), includeEtcEntry::execute(), includeEntry::execute(), sincludeEntry::execute(), codeStream::execute(), Foam::operator>>(), vanDriestDelta::read(), PrandtlDelta::read(), and smoothDelta::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read() [2/2]

bool read ( Istream is,
bool  keepHeader 
)

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().

Here is the call graph for this function:

◆ writeEntry()

void writeEntry ( const keyType keyword,
Ostream os 
) const

Write sub-dictionary with the keyword as its header.

Definition at line 164 of file dictionaryIO.C.

References Ostream::beginBlock(), and Ostream::endBlock().

Referenced by dictionaryEntry::write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeEntries()

void writeEntries ( Ostream os,
const bool  extraNewLine = false 
) const

Write dictionary entries.

Parameters
extraNewLineadds additional newline
between entries for "top-level" dictionaries

Definition at line 172 of file dictionaryIO.C.

References Foam::constant::electromagnetic::e, Foam::endl(), IOstream::good(), Foam::name(), Foam::nl, dictionary::null, and WarningInFunction.

Here is the call graph for this function:

◆ write()

void write ( Ostream os,
const bool  subDict = true 
) const

Write dictionary, normally with sub-dictionary formatting.

Definition at line 198 of file dictionaryIO.C.

References Ostream::beginBlock(), Ostream::endBlock(), and Foam::nl.

Referenced by Foam::operator<<(), dictionaryListEntry::write(), fieldDictionary::writeData(), baseIOdictionary::writeData(), and surfaceFeatures::writeDict().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ csearch()

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.

Parameters
recursivesearch parent dictionaries
patternMatchuse regular expressions

Definition at line 263 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ search() [1/2]

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.

Parameters
recursivesearch parent dictionaries
patternMatchuse regular expressions

Definition at line 301 of file dictionarySearch.C.

Referenced by entry::New().

Here is the caller graph for this function:

◆ search() [2/2]

Foam::dictionary::searcher search ( const word keyword,
enum keyType::option  matchOpt = keyType::REGEX 
)

Search dictionary for given keyword.

Default search: non-recursive with patterns.

Parameters
recursivesearch parent dictionaries
patternMatchuse regular expressions

Definition at line 311 of file dictionarySearch.C.

◆ csearchScoped()

Foam::dictionary::const_searcher csearchScoped ( const word keyword,
enum keyType::option  matchOpt 
) const

Search using scoping.

There are two types of scoping available:

  1. dot-scoping, where a '.' is used to delineate the scope
  2. slash-scoping, where a '/' is used to delineate the scope

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.

Parameters
recursivesearch parent dictionaries
patternMatchuse regular expressions

Definition at line 323 of file dictionarySearch.C.

References dictionary::null, and keyType::RECURSIVE.

Referenced by entry::New().

Here is the caller graph for this function:

◆ searchScoped() [1/2]

Foam::dictionary::const_searcher searchScoped ( const word keyword,
enum keyType::option  matchOpt 
) const

Search using dot or slash scoping.

Parameters
recursivesearch parent dictionaries
patternMatchuse regular expressions

Definition at line 353 of file dictionarySearch.C.

Referenced by removeEntry::execute(), and entry::New().

Here is the caller graph for this function:

◆ searchScoped() [2/2]

Foam::dictionary::searcher searchScoped ( const word keyword,
enum keyType::option  matchOpt 
)

Search using dot or slash scoping.

Parameters
recursivesearch parent dictionaries
patternMatchuse regular expressions

Definition at line 363 of file dictionarySearch.C.

◆ cfindScopedDict()

const Foam::dictionary * cfindScopedDict ( const fileName dictPath) const

Locate a sub-dictionary using slash-scoping.

Returns
nullptr if the dictionary path does not exist

Definition at line 375 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().

Here is the call graph for this function:

◆ findScopedDict() [1/2]

const Foam::dictionary * findScopedDict ( const fileName dictPath) const

Locate a sub-dictionary using slash-scoping.

Returns
nullptr if the dictionary path does not exist

Definition at line 460 of file dictionarySearch.C.

◆ findScopedDict() [2/2]

Foam::dictionary * findScopedDict ( const fileName dictPath)

Locate a sub-dictionary using slash-scoping.

Returns
nullptr if the dictionary path does not exist

Definition at line 469 of file dictionarySearch.C.

◆ makeScopedDict()

Foam::dictionary * makeScopedDict ( const fileName dictPath)

Locate existing or create sub-dictionary using slash-scoping.

Returns
nullptr if the dictionary path could not be created

Definition at line 478 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ csearchCompat()

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.

Parameters
compatlist 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,...
recursivesearch parent dictionaries
patternMatchuse regular expressions

Definition at line 49 of file dictionaryCompat.C.

References Foam::endl(), dictionary::Searcher< Const >::good(), Foam::name(), Foam::nl, and validate().

Referenced by functionObject::New().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ foundCompat()

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.

Parameters
compatlist of old compatibility keywords and the last OpenFOAM version for which they were used.
recursivesearch parent dictionaries
patternMatchuse regular expressions

Definition at line 98 of file dictionaryCompat.C.

◆ findCompat()

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.

Parameters
compatlist of old compatibility keywords and the last OpenFOAM version for which they were used.
recursivesearch parent dictionaries
patternMatchuse regular expressions

Definition at line 109 of file dictionaryCompat.C.

◆ lookupEntryCompat()

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.

Parameters
compatlist of old compatibility keywords and the last OpenFOAM version for which they were used.
recursivesearch parent dictionaries
patternMatchuse regular expressions

Definition at line 120 of file dictionaryCompat.C.

References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::name(), and dictionary::Searcher< Const >::ref().

Here is the call graph for this function:

◆ lookupCompat()

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.

Parameters
compatlist of old compatibility keywords and the last OpenFOAM version for which they were used.
recursivesearch parent dictionaries
patternMatchuse regular expressions

Definition at line 141 of file dictionaryCompat.C.

◆ getCompat()

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.

Parameters
compatlist of old compatibility keywords and the last OpenFOAM version for which they were used.
recursivesearch parent dictionaries
patternMatchuse regular expressions

Definition at line 83 of file dictionaryTemplates.C.

References Foam::T(), and Foam::val.

Referenced by faceZoneToCell::faceZoneToCell(), basicChemistryModel::New(), motionSolver::New(), patchToCell::patchToCell(), patchToFace::patchToFace(), plane::plane(), zoneToCell::zoneToCell(), zoneToFace::zoneToFace(), and zoneToPoint::zoneToPoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getOrDefaultCompat()

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.

Parameters
compatlist of old compatibility keywords and the last OpenFOAM version for which they were used.
recursivesearch parent dictionaries
patternMatchuse regular expressions

Definition at line 427 of file dictionaryTemplates.C.

References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), IOInfoInFunction, Foam::nl, dictionary::Searcher< Const >::ptr(), Foam::T(), and Foam::val.

Here is the call graph for this function:

◆ readCompat()

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.

Parameters
compatlist of old compatibility keywords and the last OpenFOAM version for which they were used.
valthe value to read
recursivesearch parent dictionaries
patternMatchuse regular expressions
Returns
true if the entry was found.

Definition at line 367 of file dictionaryTemplates.C.

References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::Searcher< Const >::good(), Foam::name(), Foam::nl, dictionary::Searcher< Const >::ptr(), and Foam::val.

Referenced by codedPoints0MotionSolver::codedPoints0MotionSolver().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readIfPresentCompat()

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.

Parameters
compatlist of old compatibility keywords and the last OpenFOAM version for which they were used.
valthe value to read
recursivesearch parent dictionaries
patternMatchuse regular expressions
Returns
true if the entry was found.

Definition at line 470 of file dictionaryTemplates.C.

References Foam::val.

Referenced by solidProperties::readIfPresent().

Here is the caller graph for this function:

◆ operator=()

void operator= ( const dictionary rhs)

Copy assignment.

Definition at line 858 of file dictionary.C.

References Foam::abort(), Foam::add(), clear(), Foam::constant::electromagnetic::e, Foam::FatalIOError, FatalIOErrorInFunction, Foam::name(), and dictionary::name().

Referenced by dictionary::dictionary(), IOdictionary::IOdictionary(), localIOdictionary::localIOdictionary(), baseIOdictionary::operator=(), and unwatchedIOdictionary::unwatchedIOdictionary().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator+=()

void operator+= ( const dictionary rhs)

Include entries from the given dictionary.

Warn, but do not overwrite existing entries.

Definition at line 881 of file dictionary.C.

References Foam::abort(), Foam::add(), Foam::constant::electromagnetic::e, Foam::FatalIOError, FatalIOErrorInFunction, and Foam::name().

Here is the call graph for this function:

◆ operator|=()

void operator|= ( const dictionary rhs)

Conditionally include entries from the given dictionary.

Do not overwrite existing entries.

Definition at line 898 of file dictionary.C.

References Foam::abort(), Foam::add(), Foam::constant::electromagnetic::e, Foam::FatalIOError, FatalIOErrorInFunction, found, and Foam::name().

Here is the call graph for this function:

◆ operator<<=()

void operator<<= ( const dictionary rhs)

Unconditionally include entries from the given dictionary.

Overwrite existing entries.

Definition at line 918 of file dictionary.C.

References Foam::abort(), Foam::constant::electromagnetic::e, Foam::FatalIOError, FatalIOErrorInFunction, and Foam::name().

Here is the call graph for this function:

◆ lookupOrDefault()

T lookupOrDefault ( const word keyword,
const T deflt,
enum keyType::option  matchOpt = keyType::REGEX 
) const
inline

Find and return a T, or return the given default value. FatalIOError if it is found and the number of tokens is incorrect.

Parameters
matchOptthe default search is non-recursive with patterns

Definition at line 1198 of file dictionary.H.

Referenced by atmBoundaryLayerInletEpsilonFvPatchScalarField::atmBoundaryLayerInletEpsilonFvPatchScalarField(), atmBoundaryLayerInletKFvPatchScalarField::atmBoundaryLayerInletKFvPatchScalarField(), atmBoundaryLayerInletVelocityFvPatchVectorField::atmBoundaryLayerInletVelocityFvPatchVectorField(), blockMesh::blockMesh(), ATCModel::createLimiter(), cylindrical::cylindrical(), stateFunctionObject::getTrigger(), Foam::MULES::limiter(), Foam::MULES::limiterCorr(), tableReader< scalar >::New(), engineTime::New(), zeroATCcells::New(), lineSearch::New(), RASModelVariables::New(), coordinateSystem::New(), Foam::operator>>(), adjointMeshMovementSolver::read(), solverControl::read(), sensitivitySurfacePoints::read(), sensitivitySurface::read(), solutionControl::read(), targetCoeffTrim::read(), explicitPorositySource::read(), adjointEikonalSolver::read(), areaWrite::read(), directionalPressureGradientExplicitSource::read(), functionObjectList::read(), MRFZone::read(), functionObject::read(), PDRblock::read(), sampledSurfaces::read(), smoothSolver::readControls(), lduMatrix::solver::readControls(), temperatureDependent::readDict(), adjointSolver::readDict(), externalFileCoupler::readDict(), refinementSurfaces::refinementSurfaces(), rotatingPressureInletOutletVelocityFvPatchVectorField::rotatingPressureInletOutletVelocityFvPatchVectorField(), searchableSurfaces::searchableSurfaces(), cellTable::selectType(), Time::setMonitoring(), slidingInterface::setTolerances(), stateFunctionObject::setTrigger(), shellSurfaces::shellSurfaces(), shortestPathSet::shortestPathSet(), populationBalanceModel::solve(), fvMatrix< Type >::solveSegregatedOrCoupled(), turbulentMixingLengthDissipationRateInletFvPatchScalarField::turbulentMixingLengthDissipationRateInletFvPatchScalarField(), turbulentMixingLengthFrequencyInletFvPatchScalarField::turbulentMixingLengthFrequencyInletFvPatchScalarField(), dynamicRefineFvMesh::update(), turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs(), turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs(), and ensightWriter::writeCollated().

◆ lookupOrAddDefault()

T lookupOrAddDefault ( const word keyword,
const T deflt,
enum keyType::option  matchOpt = keyType::REGEX 
)
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.

Parameters
matchOptthe default search is non-recursive with patterns

Definition at line 1215 of file dictionary.H.

Referenced by Foam::debug::debugSwitch(), Foam::debug::floatOptimisationSwitch(), Foam::debug::infoSwitch(), and Foam::debug::optimisationSwitch().

Here is the caller graph for this function:

◆ lookupOrDefaultCompat()

T lookupOrDefaultCompat ( const word keyword,
std::initializer_list< std::pair< const char *, int >>  compat,
const T deflt,
enum keyType::option  matchOpt = keyType::REGEX 
) const
inline

Find and return a T, or return the given default value using any compatibility names if needed.

Default search: non-recursive with patterns.

Parameters
compatlist of old compatibility keywords and the last OpenFOAM version for which they were used.
recursivesearch parent dictionaries
patternMatchuse regular expressions

Definition at line 1234 of file dictionary.H.

◆ FOAM_DEPRECATED_FOR() [1/2]

ITstream& FOAM_DEPRECATED_FOR ( 2018-  07,
"lookup() method"   
) const &
inline

Deprecated(2018-07) find and return an entry data stream.

Deprecated:
(2018-07) - use lookup() method

Definition at line 1247 of file dictionary.H.

◆ FOAM_DEPRECATED_FOR() [2/2]

T FOAM_DEPRECATED_FOR ( 2018-  10,
"get() method"   
) const &

Deprecated(2018-10) find and return a T.

Deprecated:
(2018-10) - use get() method

◆ getLabel()

label getLabel ( const word keyword,
enum keyType::option  matchOpt = keyType::REGEX 
) const
inline

Same as get< label >(const word&, keyType::option)

Definition at line 1444 of file dictionary.H.

◆ getScalar()

scalar getScalar ( const word keyword,
enum keyType::option  matchOpt = keyType::REGEX 
) const
inline

Same as get< scalar >(const word&, keyType::option)

Definition at line 1445 of file dictionary.H.

◆ getString()

string getString ( const word keyword,
enum keyType::option  matchOpt = keyType::REGEX 
) const
inline

Same as get< string >(const word&, keyType::option)

Definition at line 1446 of file dictionary.H.

◆ getWord()

word getWord ( const word keyword,
enum keyType::option  matchOpt = keyType::REGEX 
) const
inline

Same as get< word >(const word&, keyType::option)

Definition at line 1447 of file dictionary.H.

◆ getFileName()

fileName getFileName ( const word keyword,
enum keyType::option  matchOpt = keyType::REGEX 
) const
inline

Same as get< fileName >(const word&, keyType::option)

Definition at line 1448 of file dictionary.H.

◆ sortedToc() [3/3]

Foam::wordList sortedToc ( const Compare &  comp) const

Definition at line 34 of file dictionaryTemplates.C.

◆ add() [9/9]

Foam::entry* add ( const keyType k,
const T v,
bool  overwrite 
)

Definition at line 41 of file dictionaryTemplates.C.

References Foam::add(), and k.

Here is the call graph for this function:

◆ set() [5/5]

Foam::entry* set ( const keyType k,
const T v 
)

Definition at line 48 of file dictionaryTemplates.C.

References k.

Friends And Related Function Documentation

◆ entry

friend class entry
friend

Declare friendship with the entry class for IO.

Definition at line 275 of file dictionary.H.

◆ operator>>

Istream& operator>> ( Istream is,
dictionary dict 
)
friend

Read dictionary from Istream.

◆ operator<<

Ostream& operator<< ( Ostream os,
const dictionary dict 
)
friend

Write dictionary to Ostream.

Member Data Documentation

◆ const_searcher

Declare friendship with the searcher classes.

Definition at line 278 of file dictionary.H.

◆ searcher

friend searcher

Definition at line 279 of file dictionary.H.

◆ null

◆ recursive

T bool recursive = false

Definition at line 1260 of file dictionary.H.

◆ patternMatch

T bool bool patternMatch

Definition at line 1261 of file dictionary.H.


The documentation for this class was generated from the following files: