mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
functionObjects: Renamed dictionary entry 'functionObjectLibs' -> 'libs'
This changes simplifies the specification of functionObjects in controlDict and is consistent with the 'libs' option in controlDict to load special solver libraries. Support for the old 'functionObjectLibs' name is supported for backward compatibility.
This commit is contained in:
@ -61,12 +61,24 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
|
||||
Info<< "Selecting function " << functionType << endl;
|
||||
}
|
||||
|
||||
const_cast<Time&>(t).libs().open
|
||||
(
|
||||
dict,
|
||||
"functionObjectLibs",
|
||||
dictionaryConstructorTablePtr_
|
||||
);
|
||||
if (dict.found("functionObjectLibs"))
|
||||
{
|
||||
const_cast<Time&>(t).libs().open
|
||||
(
|
||||
dict,
|
||||
"functionObjectLibs",
|
||||
dictionaryConstructorTablePtr_
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
const_cast<Time&>(t).libs().open
|
||||
(
|
||||
dict,
|
||||
"libs",
|
||||
dictionaryConstructorTablePtr_
|
||||
);
|
||||
}
|
||||
|
||||
if (!dictionaryConstructorTablePtr_)
|
||||
{
|
||||
|
||||
@ -46,7 +46,7 @@ Description
|
||||
myFunctionObject // Name of functionObject entry
|
||||
{
|
||||
type functionObjectType;
|
||||
functionObjectLibs ("libMyFunctionObjectlib.so");
|
||||
libs ("libMyFunctionObjectlib.so");
|
||||
region defaultRegion;
|
||||
enabled yes;
|
||||
timeStart 0;
|
||||
@ -62,7 +62,7 @@ Description
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
type | Type of function object | yes |
|
||||
functionObjectLibs | Libraries containing implementation | yes |
|
||||
libs | Libraries containing implementation | yes |
|
||||
region | Name of region for multi-region cases | no |
|
||||
enabled | On/off switch | no | yes
|
||||
timeStart| Start time | no |
|
||||
|
||||
@ -64,12 +64,6 @@ void Foam::functionObjects::writeFiles::createFiles()
|
||||
}
|
||||
|
||||
|
||||
void Foam::functionObjects::writeFiles::write()
|
||||
{
|
||||
createFiles();
|
||||
}
|
||||
|
||||
|
||||
void Foam::functionObjects::writeFiles::resetNames(const wordList& names)
|
||||
{
|
||||
names_.clear();
|
||||
@ -200,4 +194,12 @@ Foam::OFstream& Foam::functionObjects::writeFiles::file(const label i)
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObjects::writeFiles::write(const bool postProcess)
|
||||
{
|
||||
createFiles();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -74,9 +74,6 @@ protected:
|
||||
//- Create the output file
|
||||
virtual void createFiles();
|
||||
|
||||
//- Write function
|
||||
virtual void write();
|
||||
|
||||
//- Reset the list of names from a wordList
|
||||
virtual void resetNames(const wordList& names);
|
||||
|
||||
@ -130,6 +127,9 @@ public:
|
||||
|
||||
//- Return file 'i'
|
||||
OFstream& file(const label i);
|
||||
|
||||
//- Write function
|
||||
virtual bool write(const bool postProcess = false);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user