MRG: Initial commit after latest Foundation merge

This commit is contained in:
Andrew Heather
2016-09-30 11:16:28 +01:00
1177 changed files with 5472 additions and 1421 deletions

View File

@ -174,7 +174,8 @@ bool Foam::functionObjectList::readFunctionObject
(
const string& funcNameArgs,
dictionary& functionsDict,
HashSet<word>& requiredFields
HashSet<word>& requiredFields,
const word& region
)
{
// Parse the optional functionObject arguments:
@ -314,6 +315,12 @@ bool Foam::functionObjectList::readFunctionObject
funcDict.set(entry::New(entryStream).ptr());
}
// Insert the region name if specified
if (region != word::null)
{
funcDict.set("region", region);
}
// Merge this functionObject dictionary into functionsDict
dictionary funcArgsDict;
funcArgsDict.add(string::validate<word>(funcNameArgs), funcDict);
@ -377,6 +384,14 @@ Foam::autoPtr<Foam::functionObjectList> Foam::functionObjectList::New
dictionary& functionsDict = controlDict.subDict("functions");
word region = word::null;
// Set the region name if specified
if (args.optionFound("region"))
{
region = args["region"];
}
if
(
args.optionFound("dict")
@ -402,7 +417,13 @@ Foam::autoPtr<Foam::functionObjectList> Foam::functionObjectList::New
if (args.optionFound("func"))
{
readFunctionObject(args["func"], functionsDict, requiredFields);
readFunctionObject
(
args["func"],
functionsDict,
requiredFields,
region
);
}
if (args.optionFound("funcs"))
@ -411,7 +432,13 @@ Foam::autoPtr<Foam::functionObjectList> Foam::functionObjectList::New
forAll(funcs, i)
{
readFunctionObject(funcs[i], functionsDict, requiredFields);
readFunctionObject
(
funcs[i],
functionsDict,
requiredFields,
region
);
}
}