functionObjectList: Rationalized and simplified the handling of disabled functionObjects

Simplified and generalized the handling of functionObjects which fail to
construct by removing them from the list rather than maintaining an
"enabled" switch in each functionObject.
This commit is contained in:
Henry Weller
2016-05-11 09:03:52 +01:00
parent 080908732d
commit 32dbb01e96
9 changed files with 222 additions and 271 deletions

View File

@ -138,7 +138,7 @@ public:
//- Destructor
virtual ~functionObjectList();
~functionObjectList();
// Member Functions
@ -153,46 +153,45 @@ public:
using PtrList<functionObject>::operator[];
//- Clear the list of function objects
virtual void clear();
void clear();
//- Find the ID of a given function object by name
virtual label findObjectID(const word& name) const;
label findObjectID(const word& name) const;
//- Switch the function objects on
virtual void on();
void on();
//- Switch the function objects off
virtual void off();
void off();
//- Return the execution status (on/off) of the function objects
virtual bool status() const;
bool status() const;
//- Called at the start of the time-loop
virtual bool start();
bool start();
//- Called at each ++ or += of the time-loop. forceWrite overrides
// the usual outputControl behaviour and forces writing always
// (used in postprocessing mode)
virtual bool execute(const bool forceWrite = false);
// (used in post-processing mode)
bool execute(const bool forceWrite = false);
//- Called when Time::run() determines that the time-loop exits
virtual bool end();
bool end();
//- Called when time was set at the end of the Time::operator++
virtual bool timeSet();
bool timeSet();
//- Called at the end of Time::adjustDeltaT() if adjustTime is true
virtual bool adjustTimeStep();
bool adjustTimeStep();
//- Read and set the function objects if their data have changed
virtual bool read();
bool read();
//- Update for changes of mesh
virtual void updateMesh(const mapPolyMesh& mpm);
void updateMesh(const mapPolyMesh& mpm);
//- Update for changes of mesh
virtual void movePoints(const polyMesh& mesh);
void movePoints(const polyMesh& mesh);
};