Utility sample: replaced by 'postProcess -func sample'

To re-use existing 'sampleDict' files simply add the following entries:

    type sets;
    libs ("libsampling.so");

and run

    postProcess -func sampleDict

It is probably better to also rename 'sampleDict' -> 'sample' and then run

    postProcess -func sampleDict
This commit is contained in:
Henry Weller
2016-06-13 14:27:46 +01:00
parent ffc5578812
commit d9f423ec85
22 changed files with 122 additions and 573 deletions

View File

@ -233,7 +233,14 @@ bool Foam::functionObjectList::readFunctionObject
// Read the functionObject dictionary
IFstream fileStream(path);
dictionary funcsDict(fileStream);
dictionary& funcDict = funcsDict.subDict(funcName);
dictionary* funcDictPtr = &funcsDict;
if (funcsDict.found(funcName) && funcsDict.isDict(funcName))
{
funcDictPtr = &funcsDict.subDict(funcName);
}
dictionary& funcDict = *funcDictPtr;
// Insert the 'field' and/or 'fields' entry corresponding to the optional
// arguments or read the 'field' or 'fields' entry and add the required