Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -119,30 +119,49 @@ void Foam::functionObjectList::list()
|
||||
}
|
||||
|
||||
|
||||
Foam::fileName Foam::functionObjectList::findRegionDict
|
||||
Foam::fileName Foam::functionObjectList::findDict
|
||||
(
|
||||
const word& funcName,
|
||||
const word& region
|
||||
)
|
||||
{
|
||||
// First check if there is a functionObject dictionary file in the
|
||||
// case system directory
|
||||
fileName dictFile
|
||||
(
|
||||
stringOps::expand("$FOAM_CASE")/"system"/region/funcName
|
||||
);
|
||||
// region system directory
|
||||
{
|
||||
const fileName dictFile
|
||||
(
|
||||
stringOps::expand("$FOAM_CASE")/"system"/region/funcName
|
||||
);
|
||||
|
||||
if (isFile(dictFile))
|
||||
{
|
||||
return dictFile;
|
||||
if (isFile(dictFile))
|
||||
{
|
||||
return dictFile;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
// Next, if the region is specified, check if there is a functionObject
|
||||
// dictionary file in the global system directory
|
||||
if (region != word::null)
|
||||
{
|
||||
fileNameList etcDirs(findEtcDirs(functionObjectDictPath));
|
||||
const fileName dictFile
|
||||
(
|
||||
stringOps::expand("$FOAM_CASE")/"system"/funcName
|
||||
);
|
||||
|
||||
if (isFile(dictFile))
|
||||
{
|
||||
return dictFile;
|
||||
}
|
||||
}
|
||||
|
||||
// Finally, check etc directories
|
||||
{
|
||||
const fileNameList etcDirs(findEtcDirs(functionObjectDictPath));
|
||||
|
||||
forAll(etcDirs, i)
|
||||
{
|
||||
dictFile = search(funcName, etcDirs[i]);
|
||||
const fileName dictFile(search(funcName, etcDirs[i]));
|
||||
|
||||
if (!dictFile.empty())
|
||||
{
|
||||
return dictFile;
|
||||
@ -154,32 +173,6 @@ Foam::fileName Foam::functionObjectList::findRegionDict
|
||||
}
|
||||
|
||||
|
||||
Foam::fileName Foam::functionObjectList::findDict
|
||||
(
|
||||
const word& funcName,
|
||||
const word& region
|
||||
)
|
||||
{
|
||||
if (region == word::null)
|
||||
{
|
||||
return findRegionDict(funcName);
|
||||
}
|
||||
else
|
||||
{
|
||||
fileName dictFile(findRegionDict(funcName, region));
|
||||
|
||||
if (dictFile != fileName::null)
|
||||
{
|
||||
return dictFile;
|
||||
}
|
||||
else
|
||||
{
|
||||
return findRegionDict(funcName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::functionObjectList::checkUnsetEntries
|
||||
(
|
||||
const string& funcCall,
|
||||
|
||||
@ -194,31 +194,6 @@ public:
|
||||
// - $WM_PROJECT_DIR/etc/caseDicts/postProcessing
|
||||
static void list();
|
||||
|
||||
//- Search for functionObject dictionary file for given region
|
||||
// and the user/group/shipped directories.
|
||||
// The search scheme allows for version-specific and
|
||||
// version-independent files using the following hierarchy:
|
||||
// - \b user settings:
|
||||
// - ~/.OpenFOAM/\<VERSION\>/caseDicts/postProcessing
|
||||
// - ~/.OpenFOAM/caseDicts/postProcessing
|
||||
// - \b group (site) settings (when $WM_PROJECT_SITE is set):
|
||||
// - $WM_PROJECT_SITE/\<VERSION\>/etc/caseDicts/postProcessing
|
||||
// - $WM_PROJECT_SITE/etc/caseDicts/postProcessing
|
||||
// - \b group (site) settings (when $WM_PROJECT_SITE is not set):
|
||||
// - $WM_PROJECT_INST_DIR/site/\<VERSION\>/etc/
|
||||
// caseDicts/postProcessing
|
||||
// - $WM_PROJECT_INST_DIR/site/etc/caseDicts/postProcessing
|
||||
// - \b other (shipped) settings:
|
||||
// - $WM_PROJECT_DIR/etc/caseDicts/postProcessing
|
||||
//
|
||||
// \return The path of the functionObject dictionary file if found
|
||||
// otherwise null
|
||||
static fileName findRegionDict
|
||||
(
|
||||
const word& funcPath,
|
||||
const word& region = word::null
|
||||
);
|
||||
|
||||
//- Search for functionObject dictionary file for given region
|
||||
// and if not present also search the case directory as well as the
|
||||
// user/group/shipped directories.
|
||||
|
||||
Reference in New Issue
Block a user