mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: functionObjectProperties - added fn to return function object results
This commit is contained in:
@ -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
|
||||
|
||||
@ -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<class Type>
|
||||
void setObjectResult
|
||||
|
||||
@ -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
|
||||
|
||||
@ -189,6 +189,12 @@ public:
|
||||
|
||||
// Results
|
||||
|
||||
bool getObjectResultDict
|
||||
(
|
||||
const word& objectName,
|
||||
dictionary& dict
|
||||
) const;
|
||||
|
||||
//- Add result
|
||||
template<class Type>
|
||||
void setResult
|
||||
|
||||
Reference in New Issue
Block a user