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 // Private data
//- Output filter name
word name_; word name_;
//- Reference to the time database
const Time& time_; const Time& time_;
//- Input dictionary
dictionary dict_; dictionary dict_;
//- Name of region
word regionName_; word regionName_;
//- Optional dictionary name to supply required inputs
word dictName_; word dictName_;
//- Switch for the execution of the functionObject //- Switch for the execution of the functionObject
bool enabled_; bool enabled_;
//- Output controls
outputFilterOutputControl outputControl_; outputFilterOutputControl outputControl_;
//- Pointer to the output filter
autoPtr<OutputFilter> ptr_; autoPtr<OutputFilter> ptr_;
@ -108,12 +119,59 @@ public:
// Member Functions // Member Functions
// Access
//- Return name //- Return name
virtual const word& name() const virtual const word& name() const
{ {
return name_; 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 //- Switch the function object on
virtual void on(); virtual void on();

View File

@ -175,8 +175,7 @@ public:
); );
// Destructor //- Destructor
virtual ~probes(); virtual ~probes();
@ -188,6 +187,18 @@ public:
return name_; 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) //- Cells to be probed (obtained from the locations)
const labelList& cells() const const labelList& cells() const
{ {