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...
 
const word wordOptimisationSwitch (const char *name, const word &defaultValue)
 Lookup optimisation switch or add default value. More...
 
template<class Enum , unsigned int nEnum>
Enum namedEnumOptimisationSwitch (const char *name, const NamedEnum< Enum, nEnum > &enumNames, const Enum defaultValue)
 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 ()
 List 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 120 of file debug.C.

References entry::disableFunctionEntries, 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 193 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 199 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 205 of file debug.C.

References switchSet().

Referenced by floatOptimisationSwitch(), listSwitches(), NamedEnum< compressibleField, 8 >::names(), optimisationSwitch(), and wordOptimisationSwitch().

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

References debugSwitches(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, found, 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 233 of file debug.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, found, 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 255 of file debug.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, floatOptimisationSwitch(), found, dictionary::lookupOrAddDefault(), and optimisationSwitches().

Referenced by UPstream::procNo().

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

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, found, dictionary::lookupOrAddDefault(), optimisationSwitches(), and wordOptimisationSwitch().

Referenced by optimisationSwitch().

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

◆ wordOptimisationSwitch()

const Foam::word wordOptimisationSwitch ( const char *  name,
const word defaultValue 
)

Lookup optimisation switch or add default value.

Definition at line 303 of file debug.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, found, listSwitches(), dictionary::lookupOrAddDefault(), and optimisationSwitches().

Referenced by floatOptimisationSwitch(), and namedEnumOptimisationSwitch().

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

◆ namedEnumOptimisationSwitch()

Enum Foam::debug::namedEnumOptimisationSwitch ( const char *  name,
const NamedEnum< Enum, nEnum > &  enumNames,
const Enum  defaultValue 
)

Lookup optimisation switch or add default value.

Definition at line 94 of file debug.H.

References listSwitches(), switchSet(), and wordOptimisationSwitch().

Referenced by NamedEnum< compressibleField, 8 >::names(), and UPstream::procNo().

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 164 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(), namedEnumOptimisationSwitch(), and optimisationSwitches().

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

◆ listSwitches()

void listSwitches ( )

List debug switches.

Definition at line 467 of file debug.C.

References debugSwitches(), Foam::endl(), Foam::Info, infoSwitches(), and optimisationSwitches().

Referenced by Foam::listSwitches(), namedEnumOptimisationSwitch(), and wordOptimisationSwitch().

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