mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: added timeFunctionObject virtual class in inheritance hierarchy
- simply a functionObject with an additional Time reference, which is a combination frequently used by concrete functionObjects
This commit is contained in:
@ -69,7 +69,7 @@ SourceFiles
|
||||
#ifndef functionObjects_setTimeStepFunctionObject_H
|
||||
#define functionObjects_setTimeStepFunctionObject_H
|
||||
|
||||
#include "functionObject.H"
|
||||
#include "timeFunctionObject.H"
|
||||
#include "Function1.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -80,23 +80,20 @@ namespace functionObjects
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class setTimeStepFunctionObject Declaration
|
||||
Class functionObjects::setTimeStepFunctionObject Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class setTimeStepFunctionObject
|
||||
:
|
||||
public functionObject
|
||||
public functionObjects::timeFunctionObject
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Reference to the time database
|
||||
const Time& time_;
|
||||
// Private Member Data
|
||||
|
||||
//- Time step function/table
|
||||
autoPtr<Function1<scalar>> timeStepPtr_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
setTimeStepFunctionObject(const setTimeStepFunctionObject&) = delete;
|
||||
@ -123,14 +120,11 @@ public:
|
||||
|
||||
|
||||
// Destructor
|
||||
virtual ~setTimeStepFunctionObject();
|
||||
virtual ~setTimeStepFunctionObject() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return time database
|
||||
const Time& time() const;
|
||||
|
||||
//- Called at the end of Time::adjustDeltaT() if adjustTime is true
|
||||
virtual bool adjustTimeStep();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user