functionObjects: Removed redundant "start()" member function

This commit is contained in:
Henry Weller
2016-05-11 10:20:39 +01:00
parent 862d963a95
commit 82151962c5
7 changed files with 10 additions and 39 deletions

View File

@ -128,13 +128,6 @@ Foam::OutputFilterFunctionObject<OutputFilter>::OutputFilterFunctionObject
),
outputControl_(t, dict, "output"),
evaluateControl_(t, dict, "evaluate")
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class OutputFilter>
bool Foam::OutputFilterFunctionObject<OutputFilter>::start()
{
readDict();
if (!allocateFilter())
@ -143,11 +136,11 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::start()
<< "Cannot construct " << OutputFilter::typeName
<< exit(FatalError);
}
return true;
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class OutputFilter>
bool Foam::OutputFilterFunctionObject<OutputFilter>::execute
(
@ -252,10 +245,11 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::read
if (dict != dict_)
{
dict_ = dict;
outputControl_.read(dict);
// Reset the OutputFilter
return start();
outputControl_.read(dict);
readDict();
return true;
}
else
{

View File

@ -158,9 +158,6 @@ public:
// Function object control
//- Called at the start of the time-loop
virtual bool start();
//- Called at each ++ or += of the time-loop. forceWrite overrides
// the usual outputControl behaviour and forces writing always
// (used in post-processing mode)

View File

@ -183,9 +183,6 @@ public:
//- Name
virtual const word& name() const;
//- Called at the start of the time-loop
virtual bool start() = 0;
//- Called at each ++ or += of the time-loop. forceWrite overrides
// the usual outputControl behaviour and forces writing always
// (used in post-processing mode)

View File

@ -136,6 +136,9 @@ Foam::codedFunctionObject::codedFunctionObject
{
read(dict_);
}
updateLibrary(redirectType_);
redirectFunctionObject();
}
@ -147,8 +150,7 @@ Foam::codedFunctionObject::~codedFunctionObject()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::functionObject&
Foam::codedFunctionObject::redirectFunctionObject() const
Foam::functionObject& Foam::codedFunctionObject::redirectFunctionObject() const
{
if (!redirectFunctionObjectPtr_.valid())
{
@ -166,13 +168,6 @@ Foam::codedFunctionObject::redirectFunctionObject() const
}
bool Foam::codedFunctionObject::start()
{
updateLibrary(redirectType_);
return redirectFunctionObject().start();
}
bool Foam::codedFunctionObject::execute(const bool forceWrite)
{
updateLibrary(redirectType_);

View File

@ -171,9 +171,6 @@ public:
//- Dynamically compiled functionObject
functionObject& redirectFunctionObject() const;
//- Called at the start of the time-loop
virtual bool start();
//- Called at each ++ or += of the time-loop. forceWrite overrides the
// outputControl behaviour.
virtual bool execute(const bool forceWrite);

View File

@ -75,12 +75,6 @@ Foam::functionObjects::setTimeStepFunctionObject::time() const
}
bool Foam::functionObjects::setTimeStepFunctionObject::start()
{
return true;
}
bool Foam::functionObjects::setTimeStepFunctionObject::execute
(
const bool forceWrite

View File

@ -109,9 +109,6 @@ public:
// Function object control
//- Called at the start of the time-loop
virtual bool start();
//- Called at each ++ or += of the time-loop
virtual bool execute(const bool forceWrite);