opened up function obect interface

This commit is contained in:
andy
2009-07-06 12:31:16 +01:00
parent 383823e69d
commit b1d2ecd38a
2 changed files with 89 additions and 20 deletions

View File

@ -63,17 +63,28 @@ class OutputFilterFunctionObject
{
// Private data
//- Output filter name
word name_;
//- Reference to the time database
const Time& time_;
//- Input dictionary
dictionary dict_;
//- Name of region
word regionName_;
//- Optional dictionary name to supply required inputs
word dictName_;
//- Switch for the execution of the functionObject
bool enabled_;
//- Output controls
outputFilterOutputControl outputControl_;
//- Pointer to the output filter
autoPtr<OutputFilter> ptr_;
@ -108,31 +119,78 @@ public:
// Member Functions
//- Return name
virtual const word& name() const
{
return name_;
}
// Access
//- Switch the function object on
virtual void on();
//- Return name
virtual const word& name() const
{
return name_;
}
//- Switch the function object off
virtual void off();
//- Return time database
virtual const Time& time() const
{
return time_;
}
//- Return the input dictionary
virtual const dictionary& dict() const
{
return dict_;
}
//- Return the region name
virtual const word& regionName() const
{
return regionName_;
}
//- Return the optional dictionary name
virtual const word& dictName() const
{
return dictName_;
}
//- Return the enabled flag
virtual bool enabled() const
{
return enabled_;
}
//- Return the output control object
virtual const outputFilterOutputControl& outputControl() const
{
return outputControl_;
}
//- Return the output filter
virtual const OutputFilter& outputFilter() const
{
return ptr_();
}
//- Called at the start of the time-loop
virtual bool start();
// Function object control
//- Called at each ++ or += of the time-loop
virtual bool execute();
//- Switch the function object on
virtual void on();
//- Called when Time::run() determines that the time-loop exits
virtual bool end();
//- Switch the function object off
virtual void off();
//- Read and set the function object if its data have changed
virtual bool read(const dictionary&);
//- Called at the start of the time-loop
virtual bool start();
//- Called at each ++ or += of the time-loop
virtual bool execute();
//- Called when Time::run() determines that the time-loop exits
virtual bool end();
//- Read and set the function object if its data have changed
virtual bool read(const dictionary&);
};

View File

@ -175,9 +175,8 @@ public:
);
// Destructor
virtual ~probes();
//- Destructor
virtual ~probes();
// Member Functions
@ -188,6 +187,18 @@ public:
return name_;
}
//- Return names of fields to probe
virtual const wordList& fieldNames() const
{
return fieldNames_;
}
//- Return locations to probe
virtual const vectorField& probeLocations() const
{
return probeLocations_;
}
//- Cells to be probed (obtained from the locations)
const labelList& cells() const
{