Skip to content
Snippets Groups Projects
Commit b1d2ecd3 authored by Andrew Heather's avatar Andrew Heather
Browse files

opened up function obect interface

parent 383823e6
Branches
Tags
No related merge requests found
......@@ -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
//- Return name
virtual const word& name() const
{
return name_;
}
//- 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_();
}
// Function object control
//- Switch the function object on
virtual void on();
//- Switch the function object on
virtual void on();
//- Switch the function object off
virtual void off();
//- Switch the function object off
virtual void off();
//- Called at the start of the time-loop
virtual bool start();
//- Called at the start of the time-loop
virtual bool start();
//- Called at each ++ or += of the time-loop
virtual bool execute();
//- Called at each ++ or += of the time-loop
virtual bool execute();
//- Called when Time::run() determines that the time-loop exits
virtual bool end();
//- 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&);
//- Read and set the function object if its data have changed
virtual bool read(const dictionary&);
};
......
......@@ -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
{
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment