STYLE: update documentation about central controlDict

This commit is contained in:
Mark Olesen
2018-12-12 13:38:14 +01:00
parent 29a5793b5b
commit 67140f6b07
3 changed files with 17 additions and 5 deletions

View File

@ -219,7 +219,8 @@ echo "Using openfoam: $WM_PROJECT_DIR" 1>&2
echo "==> $moduleOutput" 1>&2 echo "==> $moduleOutput" 1>&2
# Remove some cruft # Remove some cruft
unset FOAM_JOB_DIR FOAM_RUN FOAM_SETTINGS FOAM_INST_DIR WM_PROJECT_INST_DIR unset FOAM_JOB_DIR FOAM_RUN FOAM_SETTINGS FOAM_CONTROLDICT
unset FOAM_INST_DIR WM_PROJECT_INST_DIR
unset WM_PROJECT_USER_DIR WM_THIRD_PARTY_DIR unset WM_PROJECT_USER_DIR WM_THIRD_PARTY_DIR
unset SCOTCH_VERSION unset SCOTCH_VERSION

View File

@ -89,13 +89,14 @@ deleteControlDictPtr deleteControlDictPtr_;
} // End namespace debug } // End namespace debug
} // End namespace Foam } // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::dictionary& Foam::debug::controlDict() Foam::dictionary& Foam::debug::controlDict()
{ {
if (!controlDictPtr_) if (!controlDictPtr_)
{ {
string controlDictString(getEnv("FOAM_CONTROLDICT")); string controlDictString(Foam::getEnv("FOAM_CONTROLDICT"));
if (!controlDictString.empty()) if (!controlDictString.empty())
{ {
// Read from environment // Read from environment

View File

@ -40,7 +40,7 @@ SourceFiles
namespace Foam namespace Foam
{ {
// Forward declaration of classes // Forward declarations
class dictionary; class dictionary;
class Istream; class Istream;
class Ostream; class Ostream;
@ -51,8 +51,18 @@ class simpleObjectRegistry;
namespace debug namespace debug
{ {
//- The central control dictionary. //- The central control dictionary, the contents of which are either
// Located in ~/.OpenFOAM/VERSION or $WM_PROJECT_DIR/etc //- taken directly from the FOAM_CONTROLDICT environment variable,
//- or generated by merging the contents of user/group/other files.
//
// - ~/.OpenFOAM/{PROJECT_API}/controlDict
// - ~/.OpenFOAM/controlDict
// - $WM_PROJECT_SITE/{PROJECT_API}/etc/controlDict
// - $WM_PROJECT_SITE/etc/controlDict
// - $WM_PROJECT_DIR/etc/controlDict
//
// Where {PROJECT_API} corresponds to the foamVersion::api value.
//
// \sa Foam::findEtcFile() // \sa Foam::findEtcFile()
dictionary& controlDict(); dictionary& controlDict();