Namespace for handling debugging switches. More...
Functions | |
dictionary & | controlDict () |
The central control dictionary. More... | |
dictionary & | debugSwitches () |
The DebugSwitches sub-dictionary in the central controlDict. More... | |
dictionary & | infoSwitches () |
The InfoSwitches sub-dictionary in the central controlDict. More... | |
dictionary & | optimisationSwitches () |
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... | |
dictionary & | switchSet (const char *subDictName, dictionary *&subDictPtr) |
Internal function to lookup a sub-dictionary from controlDict. More... | |
void | listSwitches () |
List debug switches. More... | |
Foam::dictionary & controlDict | ( | ) |
The central control dictionary.
Located in ~/.OpenFOAM/VERSION or $WM_PROJECT_DIR/etc
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().