functionObjects: rewritten to all be derived from 'functionObject'

- Avoids the need for the 'OutputFilterFunctionObject' wrapper
  - Time-control for execution and writing is now provided by the
    'timeControlFunctionObject' which instantiates the processing
    'functionObject' and controls its operation.
  - Alternative time-control functionObjects can now be written and
    selected at run-time without the need to compile wrapped version of
    EVERY existing functionObject which would have been required in the
    old structure.
  - The separation of 'execute' and 'write' functions is now formalized in the
    'functionObject' base-class and all derived classes implement the
    two functions.
  - Unnecessary implementations of functions with appropriate defaults
    in the 'functionObject' base-class have been removed reducing
    clutter and simplifying implementation of new functionObjects.
  - The 'coded' 'functionObject' has also been updated, simplified and tested.
  - Further simplification is now possible by creating some general
    intermediate classes derived from 'functionObject'.
This commit is contained in:
Henry Weller
2016-05-15 16:40:01 +01:00
parent 1441f8cab0
commit 91aba2db2e
230 changed files with 2731 additions and 8756 deletions

View File

@ -51,10 +51,10 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
(
const word& name,
const Time& t,
const dictionary& functionDict
const dictionary& dict
)
{
const word functionType(functionDict.lookup("type"));
const word functionType(dict.lookup("type"));
if (debug)
{
@ -63,7 +63,7 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
const_cast<Time&>(t).libs().open
(
functionDict,
dict,
"functionObjectLibs",
dictionaryConstructorTablePtr_
);
@ -90,7 +90,7 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
<< exit(FatalError);
}
return autoPtr<functionObject>(cstrIter()(name, t, functionDict));
return autoPtr<functionObject>(cstrIter()(name, t, dict));
}
@ -126,4 +126,12 @@ bool Foam::functionObject::adjustTimeStep()
}
void Foam::functionObject::updateMesh(const mapPolyMesh&)
{}
void Foam::functionObject::movePoints(const polyMesh&)
{}
// ************************************************************************* //