functionObjectList: Added support for 'libs' to load libraries for all functionObjects
e.g.
functions
{
libs ("libfieldFunctionObjects.so");
div
{
type div;
field U;
executeControl writeTime;
writeControl writeTime;
}
Q
{
type Q;
executeControl writeTime;
writeControl writeTime;
}
}
This commit is contained in:
@ -50,7 +50,7 @@ Foam::functionObject::functionObject(const word& name)
|
||||
Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
|
||||
(
|
||||
const word& name,
|
||||
const Time& t,
|
||||
const Time& runTime,
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
@ -63,7 +63,7 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
|
||||
|
||||
if (dict.found("functionObjectLibs"))
|
||||
{
|
||||
const_cast<Time&>(t).libs().open
|
||||
const_cast<Time&>(runTime).libs().open
|
||||
(
|
||||
dict,
|
||||
"functionObjectLibs",
|
||||
@ -72,7 +72,7 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
|
||||
}
|
||||
else
|
||||
{
|
||||
const_cast<Time&>(t).libs().open
|
||||
const_cast<Time&>(runTime).libs().open
|
||||
(
|
||||
dict,
|
||||
"libs",
|
||||
@ -102,7 +102,7 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<functionObject>(cstrIter()(name, t, dict));
|
||||
return autoPtr<functionObject>(cstrIter()(name, runTime, dict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -160,8 +160,8 @@ public:
|
||||
autoPtr,
|
||||
functionObject,
|
||||
dictionary,
|
||||
(const word& name, const Time& t, const dictionary& dict),
|
||||
(name, t, dict)
|
||||
(const word& name, const Time& runTime, const dictionary& dict),
|
||||
(name, runTime, dict)
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -284,12 +284,19 @@ bool Foam::functionObjectList::read()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
const dictionary& functionDicts = entryPtr->dict();
|
||||
const dictionary& functionsDict = entryPtr->dict();
|
||||
|
||||
newPtrs.setSize(functionDicts.size());
|
||||
newDigs.setSize(functionDicts.size());
|
||||
const_cast<Time&>(time_).libs().open
|
||||
(
|
||||
functionsDict,
|
||||
"libs",
|
||||
functionObject::dictionaryConstructorTablePtr_
|
||||
);
|
||||
|
||||
forAllConstIter(dictionary, functionDicts, iter)
|
||||
newPtrs.setSize(functionsDict.size());
|
||||
newDigs.setSize(functionsDict.size());
|
||||
|
||||
forAllConstIter(dictionary, functionsDict, iter)
|
||||
{
|
||||
const word& key = iter().keyword();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user