Foam::debug Namespace Reference

Namespace for handling debugging switches. More...

Functions

dictionarycontrolDict ()
 The central control dictionary. More...
 
dictionarydebugSwitches ()
 The DebugSwitches sub-dictionary in the central controlDict. More...
 
dictionaryinfoSwitches ()
 The InfoSwitches sub-dictionary in the central controlDict. More...
 
dictionaryoptimisationSwitches ()
 The OptimisationSwitches sub-dictionary in the central controlDict. More...
 
int debugSwitch (const char *name, const int defaultValue=0)
 Lookup debug switch or add default value. More...
 
int infoSwitch (const char *name, const int defaultValue=0)
 Lookup info switch or add default value. More...
 
int optimisationSwitch (const char *name, const int defaultValue=0)
 Lookup optimisation switch or add default value. More...
 
float floatOptimisationSwitch (const char *name, const float defaultValue=0)
 Lookup optimisation switch or add default value. More...
 
dictionaryswitchSet (const char *subDictName, dictionary *&subDictPtr)
 Internal function to lookup a sub-dictionary from controlDict. More...
 
void listSwitches (const bool unset)
 List debug switches. More...
 
void addDebugObject (const char *name, simpleRegIOobject *obj)
 Register debug switch read/write object. More...
 
void addInfoObject (const char *name, simpleRegIOobject *obj)
 Register info switch read/write object. More...
 
void addOptimisationObject (const char *name, simpleRegIOobject *obj)
 Register optimisation switch read/write object. More...
 
void addDimensionSetObject (const char *name, simpleRegIOobject *obj)
 Register DimensionSets read/write object. More...
 
void addDimensionedConstantObject (const char *name, simpleRegIOobject *)
 Register DimensionedConstant read/write object. More...
 
simpleObjectRegistrydebugObjects ()
 Get access to registered debug switch objects. More...
 
simpleObjectRegistryinfoObjects ()
 Get access to registered info switch objects. More...
 
simpleObjectRegistryoptimisationObjects ()
 Get access to registered optimisation switch objects. More...
 
simpleObjectRegistrydimensionSetObjects ()
 Get access to registered dimensionSets switch objects. More...
 
simpleObjectRegistrydimensionedConstantObjects ()
 Get access to registered dimensionedConstant switch objects. More...
 
void listRegisteredSwitches (const bool unset)
 List registered debug switches. More...
 

Detailed Description

Namespace for handling debugging switches.

Source files

Function Documentation

◆ controlDict()

Foam::dictionary & controlDict ( )

The central control dictionary.

Located in ~/.OpenFOAM/VERSION or $WM_PROJECT_DIR/etc

See also
Foam::findEtcFile()

Definition at line 94 of file debug.C.

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

Referenced by argList::displayDoc(), Foam::listSwitches(), and switchSet().

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.

Definition at line 160 of file debug.C.

References switchSet().

Referenced by debugSwitch(), listSwitches(), and Foam::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.

Definition at line 166 of file debug.C.

References switchSet().

Referenced by infoSwitch(), listSwitches(), and Foam::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.

Definition at line 172 of file debug.C.

References switchSet().

Referenced by floatOptimisationSwitch(), listSwitches(), NamedEnum< directionType, 3 >::names(), optimisationSwitch(), and UPstream::procNo().

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

◆ debugSwitch()

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

Lookup debug switch or add default value.

Definition at line 178 of file debug.C.

References debugSwitches(), and dictionary::lookupOrAddDefault().

Here is the call graph for this function:

◆ infoSwitch()

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

Lookup info switch or add default value.

Definition at line 187 of file debug.C.

References infoSwitches(), and dictionary::lookupOrAddDefault().

Here is the call graph for this function:

◆ optimisationSwitch()

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

Lookup optimisation switch or add default value.

Definition at line 196 of file debug.C.

References floatOptimisationSwitch(), dictionary::lookupOrAddDefault(), and optimisationSwitches().

Referenced by UPstream::procNo(), and addcommsTypeToOpt::writeData().

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

◆ floatOptimisationSwitch()

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

Lookup optimisation switch or add default value.

Definition at line 206 of file debug.C.

References dictionary::lookupOrAddDefault(), and optimisationSwitches().

Referenced by optimisationSwitch().

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 131 of file debug.C.

References controlDict(), entry::dict(), Foam::endl(), Foam::exit(), entry::isDict(), dictionary::lookupEntryPtr(), and dictionaryName::name().

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

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

◆ listSwitches()

void listSwitches ( const bool  unset)

List debug switches.

Definition at line 456 of file debug.C.

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

Referenced by dimensionedConstantObjects(), and listRegisteredSwitches().

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 218 of file debug.C.

References DictionaryBase< IDLListType, T >::append(), List< T >::append(), debugObjects(), and DictionaryBase< IDLListType, T >::lookupPtr().

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 239 of file debug.C.

References addOptimisationObject(), DictionaryBase< IDLListType, T >::append(), List< T >::append(), infoObjects(), and DictionaryBase< IDLListType, T >::lookupPtr().

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 261 of file debug.C.

References addDimensionSetObject(), DictionaryBase< IDLListType, T >::append(), List< T >::append(), DictionaryBase< IDLListType, T >::lookupPtr(), and optimisationObjects().

Referenced by addInfoObject().

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

◆ addDimensionSetObject()

void addDimensionSetObject ( const char *  name,
simpleRegIOobject obj 
)

Register DimensionSets read/write object.

Definition at line 286 of file debug.C.

References addDimensionedConstantObject(), DictionaryBase< IDLListType, T >::append(), List< T >::append(), dimensionSetObjects(), and DictionaryBase< IDLListType, T >::lookupPtr().

Referenced by addOptimisationObject().

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

◆ addDimensionedConstantObject()

void addDimensionedConstantObject ( const char *  name,
simpleRegIOobject obj 
)

Register DimensionedConstant read/write object.

Definition at line 311 of file debug.C.

References DictionaryBase< IDLListType, T >::append(), List< T >::append(), dimensionedConstantObjects(), and DictionaryBase< IDLListType, T >::lookupPtr().

Referenced by addDimensionSetObject().

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

◆ debugObjects()

Foam::simpleObjectRegistry & debugObjects ( )

Get access to registered debug switch objects.

Definition at line 338 of file debug.C.

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

Here is the caller graph for this function:

◆ infoObjects()

Foam::simpleObjectRegistry & infoObjects ( )

Get access to registered info switch objects.

Definition at line 349 of file debug.C.

Referenced by addInfoObject(), and listRegisteredSwitches().

Here is the caller graph for this function:

◆ optimisationObjects()

Foam::simpleObjectRegistry & optimisationObjects ( )

Get access to registered optimisation switch objects.

Definition at line 360 of file debug.C.

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

Here is the caller graph for this function:

◆ dimensionSetObjects()

Foam::simpleObjectRegistry & dimensionSetObjects ( )

Get access to registered dimensionSets switch objects.

Definition at line 371 of file debug.C.

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

Here is the caller graph for this function:

◆ dimensionedConstantObjects()

Foam::simpleObjectRegistry & dimensionedConstantObjects ( )

Get access to registered dimensionedConstant switch objects.

Definition at line 382 of file debug.C.

References listSwitches().

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

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

◆ listRegisteredSwitches()

void listRegisteredSwitches ( const bool  unset)

List registered debug switches.

Definition at line 468 of file debug.C.

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

Referenced by if().

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