etc/controlDict: add support for merging etc/controlDict with user-specialised versions

This commit is contained in:
Henry
2011-07-06 12:40:06 +01:00
parent 5ee9f76ace
commit 49285512c7
4 changed files with 65 additions and 35 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -61,7 +61,12 @@ int main(int argc, char *argv[])
if (args.optionFound("old") || args.optionFound("new"))
{
dictionary controlDict(IFstream(findEtcFile("controlDict", true))());
fileNameList controlDictFiles = findEtcFile("controlDict", true);
dictionary controlDict;
forAllReverse(controlDictFiles, cdfi)
{
controlDict.merge(dictionary(IFstream(controlDictFiles[cdfi])()));
}
wordHashSet oldDebug
(