diff --git a/src/OpenFOAM/db/dictionary/dictionary.H b/src/OpenFOAM/db/dictionary/dictionary.H index 5179745508..b757b31b56 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.H +++ b/src/OpenFOAM/db/dictionary/dictionary.H @@ -835,6 +835,7 @@ fileName findConfigFile ( const word& configName, const fileName& configFilesPath, + const word& configFilesDir, const word& region = word::null ); @@ -862,6 +863,7 @@ bool readConfigFile const string& argString, dictionary& parentDict, const fileName& configFilesPath, + const word& configFilesDir, const Pair& contextTypeAndValue, const word& region = word::null ); diff --git a/src/OpenFOAM/db/dictionary/dictionaryIO.C b/src/OpenFOAM/db/dictionary/dictionaryIO.C index 77d22ee210..b099de2fec 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryIO.C +++ b/src/OpenFOAM/db/dictionary/dictionaryIO.C @@ -351,15 +351,17 @@ Foam::fileName Foam::findConfigFile ( const word& configName, const fileName& configFilesPath, + const word& configFilesDir, const word& region ) { // First check if there is a configuration file in the - // region system directory + // region configFilesDir directory { const fileName dictFile ( - stringOps::expandEnvVar("$FOAM_CASE")/"system"/region/configName + stringOps::expandEnvVar("$FOAM_CASE") + /configFilesDir/region/configName ); if (isFile(dictFile)) @@ -369,12 +371,12 @@ Foam::fileName Foam::findConfigFile } // Next, if the region is specified, check if there is a configuration file - // in the global system directory + // in the global configFilesDir directory if (region != word::null) { const fileName dictFile ( - stringOps::expandEnvVar("$FOAM_CASE")/"system"/configName + stringOps::expandEnvVar("$FOAM_CASE")/configFilesDir/configName ); if (isFile(dictFile)) @@ -426,6 +428,7 @@ bool Foam::readConfigFile const string& argString, dictionary& parentDict, const fileName& configFilesPath, + const word& configFilesDir, const Pair& contextTypeAndValue, const word& region ) @@ -437,7 +440,13 @@ bool Foam::readConfigFile dictArgList(argString, funcType, args, namedArgs); // Search for the configuration file - fileName path = findConfigFile(funcType, configFilesPath, region); + fileName path = findConfigFile + ( + funcType, + configFilesPath, + configFilesDir, + region + ); if (path == fileName::null) { diff --git a/src/OpenFOAM/db/dictionary/functionEntries/includeFuncEntry/includeFuncEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/includeFuncEntry/includeFuncEntry.C index d320533629..1ef2458df9 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/includeFuncEntry/includeFuncEntry.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/includeFuncEntry/includeFuncEntry.C @@ -68,6 +68,7 @@ bool Foam::functionEntries::includeFuncEntry::execute fNameArgs, parentDict, functionObjectDictPath, + "system", {"file", is.name() + " at line " + Foam::name(is.lineNumber())} ); } diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C index a2d3a32e39..4c80b56183 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C @@ -173,6 +173,7 @@ Foam::autoPtr Foam::functionObjectList::New args["func"], functionsDict, functionEntries::includeFuncEntry::functionObjectDictPath, + "system", {"command", args.commandLine()}, region ); @@ -190,6 +191,7 @@ Foam::autoPtr Foam::functionObjectList::New funcs[i], functionsDict, functionEntries::includeFuncEntry::functionObjectDictPath, + "system", {"command", args.commandLine()}, region ); diff --git a/src/finiteVolume/cfdTools/general/fvConstraints/includeFvConstraintEntry/includeFvConstraintEntry.C b/src/finiteVolume/cfdTools/general/fvConstraints/includeFvConstraintEntry/includeFvConstraintEntry.C index aba133fc32..cec4dde7f5 100644 --- a/src/finiteVolume/cfdTools/general/fvConstraints/includeFvConstraintEntry/includeFvConstraintEntry.C +++ b/src/finiteVolume/cfdTools/general/fvConstraints/includeFvConstraintEntry/includeFvConstraintEntry.C @@ -69,6 +69,7 @@ bool Foam::functionEntries::includeFvConstraintEntry::execute fNameArgs, parentDict, fvConstraintDictPath, + "system", {"file", is.name() + " at line " + Foam::name(is.lineNumber())} ); } diff --git a/src/finiteVolume/cfdTools/general/fvModels/includeFvModelEntry/includeFvModelEntry.C b/src/finiteVolume/cfdTools/general/fvModels/includeFvModelEntry/includeFvModelEntry.C index b962b5585e..8ebe6cd406 100644 --- a/src/finiteVolume/cfdTools/general/fvModels/includeFvModelEntry/includeFvModelEntry.C +++ b/src/finiteVolume/cfdTools/general/fvModels/includeFvModelEntry/includeFvModelEntry.C @@ -68,6 +68,7 @@ bool Foam::functionEntries::includeFvModelEntry::execute fNameArgs, parentDict, fvModelDictPath, + "constant", {"file", is.name() + " at line " + Foam::name(is.lineNumber())} ); }