Foam::debug Namespace Reference

Namespace for handling debugging switches. More...

Typedefs

typedef HashTable< Tuple2< word, HashTable< word > > > runTimeSelectionToCType
 

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

Variables

bool enableRunTimeSelectionToC = false
 Switch to enable runTimeSelectionToC collection and caching. More...
 
runTimeSelectionToCType runTimeSelectionToC
 Run-time selectable objects. More...
 

Detailed Description

Namespace for handling debugging switches.

Run-time selection table of contents and addition function.

Source files

Source files

Typedef Documentation

◆ runTimeSelectionToCType

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 Foam::findEtcFiles(), forAllReverse, Foam::getEnv(), IOstream::good(), and SafeFatalIOErrorInFunction.

Referenced by argList::displayDoc().

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(), 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, dictionary::lookupOrAddDefault(), and Foam::name().

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(), dictionary::lookupOrAddDefault(), and Foam::name().

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, found, dictionary::lookupOrAddDefault(), Foam::name(), and optimisationSwitches().

Here is the call graph for this function:

◆ floatOptimisationSwitch()

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

Lookup optimisation switch or add default value.

Definition at line 277 of file debug.C.

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

Here is the call 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 302 of file debug.C.

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

Referenced by 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 93 of file debug.H.

References Foam::name(), and wordOptimisationSwitch().

Here is the call 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 163 of file debug.C.

References controlDict(), entry::dict(), Foam::endl(), Foam::exit(), and entry::isDict().

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:

◆ listSwitches()

void listSwitches ( )

List debug switches.

Definition at line 467 of file debug.C.

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

Here is the call graph for this function:

Variable Documentation

◆ enableRunTimeSelectionToC

bool enableRunTimeSelectionToC = false
extern

Switch to enable runTimeSelectionToC collection and caching.

Definition at line 34 of file runTimeSelectionToC.C.

Referenced by Foam::addToRunTimeSelectionTableToC().

◆ runTimeSelectionToC

Foam::debug::runTimeSelectionToCType runTimeSelectionToC
extern

Run-time selectable objects.

Definition at line 36 of file runTimeSelectionToC.C.

Referenced by Foam::addToRunTimeSelectionTableToC().