Loading...
Searching...
No Matches
Foam::debug Namespace Reference

Namespace for handling debugging switches. More...

Functions

dictionarycontrolDict ()
 The central control dictionary, the contents of which are either taken directly from the FOAM_CONTROLDICT environment variable, or generated by merging the contents of user/group/other files.
dictionarydebugSwitches ()
 The DebugSwitches sub-dictionary in the central controlDict(s).
dictionaryinfoSwitches ()
 The InfoSwitches sub-dictionary in the central controlDict(s).
dictionaryoptimisationSwitches ()
 The OptimisationSwitches sub-dictionary in the central controlDict(s).
int debugSwitch (const char *name, const int deflt=0)
 Lookup debug switch or add default value.
int infoSwitch (const char *name, const int deflt=0)
 Lookup info switch or add default value.
int optimisationSwitch (const char *name, const int deflt=0)
 Lookup optimisation switch or add default value.
float floatOptimisationSwitch (const char *name, const float deflt=0)
 Lookup optimisation switch or add default value.
dictionaryswitchSet (const char *subDictName, dictionary *&subDictPtr)
 Internal function to lookup a sub-dictionary from controlDict.
void addDebugObject (const char *name, simpleRegIOobject *obj)
 Register debug switch read/write object.
void addInfoObject (const char *name, simpleRegIOobject *obj)
 Register info switch read/write object.
void addOptimisationObject (const char *name, simpleRegIOobject *obj)
 Register optimisation switch read/write object.
void addDimensionSetObject (const char *name, simpleRegIOobject *obj)
 Register DimensionSets read/write object.
void addDimensionedConstantObject (const char *name, simpleRegIOobject *)
 Register DimensionedConstant read/write object.
simpleObjectRegistrydebugObjects ()
 Access to registered DebugSwitch objects.
simpleObjectRegistryinfoObjects ()
 Access to registered InfoSwitch objects.
simpleObjectRegistryoptimisationObjects ()
 Access to registered OptimisationSwitch objects.
simpleObjectRegistrydimensionSetObjects ()
 Access to registered DimensionSets objects.
simpleObjectRegistrydimensionedConstantObjects ()
 Access to registered DimensionedConstants objects.
void listSwitches (const bool unset=false)
 List debug/info/optimisation switches.
void listDebugSwitches (const bool unset=false)
 List debug switches.
void listInfoSwitches (const bool unset=false)
 List info switches.
void listOptimisationSwitches (const bool unset=false)
 List optimisation switches.
void listRegisteredSwitches (const bool unset=false)
 List registered debug/info/optimisation switches.
void listRegisteredDebugSwitches (const bool unset=false)
 List debug switches.
void listRegisteredInfoSwitches (const bool unset=false)
 List info switches.
void listRegisteredOptimisationSwitches (const bool unset=false)
 List optimisation switches.

Detailed Description

Namespace for handling debugging switches.

Source files

Function Documentation

◆ controlDict()

Foam::dictionary & controlDict ( )

The central control dictionary, the contents of which are either taken directly from the FOAM_CONTROLDICT environment variable, or generated by merging the contents of user/group/other files.

  • ~/.OpenFOAM/{PROJECT_API}/controlDict
  • ~/.OpenFOAM/controlDict
  • $WM_PROJECT_SITE/{PROJECT_API}/etc/controlDict
  • $WM_PROJECT_SITE/etc/controlDict
  • $WM_PROJECT_DIR/etc/controlDict

Where {PROJECT_API} corresponds to the foamVersion::api value.

See also
Foam::findEtcFile()

Definition at line 142 of file debug.C.

References dictionary, Foam::findEtcFiles(), forAllReverse, Foam::getEnv(), IOstream::good(), and SafeFatalIOErrorInFunction.

Referenced by argList::displayDoc(), and Time::setMonitoring().

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

◆ debugSwitches()

Foam::dictionary & debugSwitches ( )

The DebugSwitches sub-dictionary in the central controlDict(s).

Definition at line 204 of file debug.C.

References switchSet().

Referenced by debugSwitch(), listDebugSwitches(), and listSwitches().

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

◆ infoSwitches()

Foam::dictionary & infoSwitches ( )

The InfoSwitches sub-dictionary in the central controlDict(s).

Definition at line 210 of file debug.C.

References switchSet().

Referenced by infoSwitch(), and listSwitches().

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

◆ optimisationSwitches()

Foam::dictionary & optimisationSwitches ( )

The OptimisationSwitches sub-dictionary in the central controlDict(s).

Definition at line 216 of file debug.C.

References switchSet().

Referenced by Foam::defineRunTimeSelectionTable(), floatOptimisationSwitch(), listOptimisationSwitches(), listSwitches(), optimisationSwitch(), argList::parse(), and registerOptSwitch().

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

◆ debugSwitch()

int debugSwitch ( const char * name,
const int deflt = 0 )

Lookup debug switch or add default value.

Definition at line 222 of file debug.C.

References debugSwitches(), Foam::getOrAdd(), and Foam::name().

Referenced by addpolyPatchToDebug::addpolyPatchToDebug(), and Foam::defineRunTimeSelectionTable().

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

◆ infoSwitch()

int infoSwitch ( const char * name,
const int deflt = 0 )

Lookup info switch or add default value.

Definition at line 228 of file debug.C.

References Foam::getOrAdd(), infoSwitches(), and Foam::name().

Referenced by Foam::defineTypeNameAndDebug(), and argList::parse().

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

◆ optimisationSwitch()

int optimisationSwitch ( const char * name,
const int deflt = 0 )

Lookup optimisation switch or add default value.

Definition at line 234 of file debug.C.

References Foam::getOrAdd(), Foam::name(), and optimisationSwitches().

Referenced by cwdPreference_(), Foam::defineTypeNameAndDebug(), registerDebugSwitchWithName(), registerOptSwitch(), registerOptSwitch(), registerOptSwitch(), registerOptSwitch(), registerOptSwitch(), registerOptSwitch(), registerOptSwitch(), registerOptSwitch(), registerOptSwitch(), and registerOptSwitch().

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

◆ floatOptimisationSwitch()

float floatOptimisationSwitch ( const char * name,
const float deflt = 0 )

Lookup optimisation switch or add default value.

Definition at line 240 of file debug.C.

References Foam::getOrAdd(), Foam::name(), and optimisationSwitches().

Referenced by Foam::fileOperations::addToRunTimeSelectionTable(), Foam::fileOperations::addToRunTimeSelectionTable(), and registerOptSwitch().

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

◆ switchSet()

Foam::dictionary & switchSet ( const char * subDictName,
dictionary *& subDictPtr )

Internal function to lookup a sub-dictionary from controlDict.

Definition at line 178 of file debug.C.

References controlDict(), dictionary::findDict(), and keyType::LITERAL.

Referenced by debugSwitches(), Foam::dimensionedConstants(), Foam::dimensionSystems(), infoSwitches(), and optimisationSwitches().

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

◆ addDebugObject()

void addDebugObject ( const char * name,
simpleRegIOobject * obj )

Register debug switch read/write object.

Definition at line 246 of file debug.C.

References Foam::appendNamedEntry(), debugObjects(), and Foam::name().

Here is the call graph for this function:

◆ addInfoObject()

void addInfoObject ( const char * name,
simpleRegIOobject * obj )

Register info switch read/write object.

Definition at line 252 of file debug.C.

References Foam::appendNamedEntry(), infoObjects(), and Foam::name().

Here is the call graph for this function:

◆ addOptimisationObject()

void addOptimisationObject ( const char * name,
simpleRegIOobject * obj )

Register optimisation switch read/write object.

Definition at line 258 of file debug.C.

References Foam::appendNamedEntry(), Foam::name(), and optimisationObjects().

Here is the call graph for this function:

◆ addDimensionSetObject()

void addDimensionSetObject ( const char * name,
simpleRegIOobject * obj )

Register DimensionSets read/write object.

Definition at line 268 of file debug.C.

References Foam::appendNamedEntry(), dimensionSetObjects(), and Foam::name().

Here is the call graph for this function:

◆ addDimensionedConstantObject()

void addDimensionedConstantObject ( const char * name,
simpleRegIOobject * obj )

Register DimensionedConstant read/write object.

Definition at line 278 of file debug.C.

References Foam::appendNamedEntry(), dimensionedConstantObjects(), and Foam::name().

Here is the call graph for this function:

◆ debugObjects()

Foam::simpleObjectRegistry & debugObjects ( )

Access to registered DebugSwitch objects.

Definition at line 288 of file debug.C.

Referenced by addDebugObject(), argList::argList(), listRegisteredDebugSwitches(), listRegisteredSwitches(), and Time::readDict().

Here is the caller graph for this function:

◆ infoObjects()

Foam::simpleObjectRegistry & infoObjects ( )

Access to registered InfoSwitch objects.

Definition at line 299 of file debug.C.

Referenced by addInfoObject(), argList::argList(), listInfoSwitches(), listRegisteredInfoSwitches(), listRegisteredSwitches(), and Time::readDict().

Here is the caller graph for this function:

◆ optimisationObjects()

Foam::simpleObjectRegistry & optimisationObjects ( )

Access to registered OptimisationSwitch objects.

Definition at line 310 of file debug.C.

Referenced by addOptimisationObject(), argList::argList(), listRegisteredOptimisationSwitches(), listRegisteredSwitches(), and Time::readDict().

Here is the caller graph for this function:

◆ dimensionSetObjects()

Foam::simpleObjectRegistry & dimensionSetObjects ( )

Access to registered DimensionSets objects.

Definition at line 321 of file debug.C.

Referenced by addDimensionSetObject(), and Time::readDict().

Here is the caller graph for this function:

◆ dimensionedConstantObjects()

Foam::simpleObjectRegistry & dimensionedConstantObjects ( )

Access to registered DimensionedConstants objects.

Definition at line 332 of file debug.C.

Referenced by addDimensionedConstantObject(), and Time::readDict().

Here is the caller graph for this function:

◆ listSwitches()

void listSwitches ( const bool unset = false)

List debug/info/optimisation switches.

Definition at line 443 of file debug.C.

References debugSwitches(), infoSwitches(), listSwitches(), and optimisationSwitches().

Referenced by listDebugSwitches(), listInfoSwitches(), listOptimisationSwitches(), listRegisteredDebugSwitches(), listRegisteredInfoSwitches(), listRegisteredOptimisationSwitches(), listRegisteredSwitches(), and listSwitches().

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

◆ listDebugSwitches()

void listDebugSwitches ( const bool unset = false)

List debug switches.

Definition at line 455 of file debug.C.

References debugSwitches(), listSwitches(), and List< word >::null().

Here is the call graph for this function:

◆ listInfoSwitches()

void listInfoSwitches ( const bool unset = false)

List info switches.

Definition at line 467 of file debug.C.

References infoObjects(), listSwitches(), and List< word >::null().

Here is the call graph for this function:

◆ listOptimisationSwitches()

void listOptimisationSwitches ( const bool unset = false)

List optimisation switches.

Definition at line 479 of file debug.C.

References listSwitches(), List< word >::null(), and optimisationSwitches().

Here is the call graph for this function:

◆ listRegisteredSwitches()

void listRegisteredSwitches ( const bool unset = false)

List registered debug/info/optimisation switches.

Definition at line 491 of file debug.C.

References debugObjects(), infoObjects(), listSwitches(), and optimisationObjects().

Here is the call graph for this function:

◆ listRegisteredDebugSwitches()

void listRegisteredDebugSwitches ( const bool unset = false)

List debug switches.

Definition at line 503 of file debug.C.

References debugObjects(), listSwitches(), and List< word >::null().

Here is the call graph for this function:

◆ listRegisteredInfoSwitches()

void listRegisteredInfoSwitches ( const bool unset = false)

List info switches.

Definition at line 515 of file debug.C.

References infoObjects(), listSwitches(), and List< word >::null().

Here is the call graph for this function:

◆ listRegisteredOptimisationSwitches()

void listRegisteredOptimisationSwitches ( const bool unset = false)

List optimisation switches.

Definition at line 527 of file debug.C.

References listSwitches(), List< word >::null(), and optimisationObjects().

Here is the call graph for this function: