diff --git a/src/OpenFOAM/db/functionObjects/functionObjectProperties/functionObjectProperties.C b/src/OpenFOAM/db/functionObjects/functionObjectProperties/functionObjectProperties.C index a4541f1cf6..b6754e708b 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectProperties/functionObjectProperties.C +++ b/src/OpenFOAM/db/functionObjects/functionObjectProperties/functionObjectProperties.C @@ -147,6 +147,29 @@ bool Foam::functionObjects::properties::getObjectDict } +bool Foam::functionObjects::properties::getObjectResultDict +( + const word& objectName, + dictionary& dict +) const +{ + const dictionary* dictptr = findDict(resultsName_); + + if (dictptr) + { + const dictionary* objptr = dictptr->findDict(objectName); + + if (objptr) + { + dict = *objptr; + return true; + } + } + + return false; +} + + bool Foam::functionObjects::properties::hasResultObject ( const word& objectName diff --git a/src/OpenFOAM/db/functionObjects/functionObjectProperties/functionObjectProperties.H b/src/OpenFOAM/db/functionObjects/functionObjectProperties/functionObjectProperties.H index 0c9bd506a7..ed1343f948 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectProperties/functionObjectProperties.H +++ b/src/OpenFOAM/db/functionObjects/functionObjectProperties/functionObjectProperties.H @@ -165,6 +165,13 @@ public: // Results + //- Get dictionary of object results, return true if set + bool getObjectResultDict + ( + const word& objectName, + dictionary& dict + ) const; + //- Add result from named object template void setObjectResult diff --git a/src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObject.C b/src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObject.C index 4a7d5884e2..9314783368 100644 --- a/src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObject.C +++ b/src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObject.C @@ -125,6 +125,16 @@ bool Foam::functionObjects::stateFunctionObject::getObjectDict } +bool Foam::functionObjects::stateFunctionObject::getObjectResultDict +( + const word& objectName, + dictionary& dict +) const +{ + return stateDict().getObjectResultDict(objectName, dict); +} + + Foam::word Foam::functionObjects::stateFunctionObject::resultType ( const word& entryName diff --git a/src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObject.H b/src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObject.H index 94b6518569..9474713373 100644 --- a/src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObject.H +++ b/src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObject.H @@ -189,6 +189,12 @@ public: // Results + bool getObjectResultDict + ( + const word& objectName, + dictionary& dict + ) const; + //- Add result template void setResult