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... | |
dictionary & | switchSet (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... | |
simpleObjectRegistry & | debugObjects () |
Get access to registered debug switch objects. More... | |
simpleObjectRegistry & | infoObjects () |
Get access to registered info switch objects. More... | |
simpleObjectRegistry & | optimisationObjects () |
Get access to registered optimisation switch objects. More... | |
simpleObjectRegistry & | dimensionSetObjects () |
Get access to registered dimensionSets switch objects. More... | |
simpleObjectRegistry & | dimensionedConstantObjects () |
Get access to registered dimensionedConstant switch objects. More... | |
void | listRegisteredSwitches (const bool unset) |
List registered debug switches. More... | |
Foam::dictionary & controlDict | ( | ) |
The central control dictionary.
Located in ~/.OpenFOAM/VERSION or $WM_PROJECT_DIR/etc
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
Foam::simpleObjectRegistry & infoObjects | ( | ) |
Get access to registered info switch objects.
Definition at line 349 of file debug.C.
Referenced by addInfoObject(), and listRegisteredSwitches().
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().
Foam::simpleObjectRegistry & dimensionSetObjects | ( | ) |
Get access to registered dimensionSets switch objects.
Definition at line 371 of file debug.C.
Referenced by addDimensionSetObject(), and Time::readDict().
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().
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().