This function object overrides the calculation time step. Can only be used with solvers with adjustTimeStep control (e.g. pimpleFoam). It makes no attempt to co-operate with other time step 'controllers', e.g. maxCo, other functionObjects. Supports 'enabled' flag but none of the other options 'timeStart', 'timeEnd', 'outputControl' etc. More...
Public Member Functions | |
TypeName ("setTimeStep") | |
Runtime type information. More... | |
setTimeStepFunctionObject (const word &name, const Time &runTime, const dictionary &dict) | |
Construct from components. More... | |
virtual const Time & | time () const |
Return time database. More... | |
virtual bool | enabled () const |
Return the enabled flag. More... | |
virtual void | on () |
Switch the function object on. More... | |
virtual void | off () |
Switch the function object off. More... | |
virtual bool | start () |
Called at the start of the time-loop. More... | |
virtual bool | execute (const bool forceWrite) |
Called at each ++ or += of the time-loop. More... | |
virtual bool | end () |
Called when Time::run() determines that the time-loop exits. More... | |
virtual bool | timeSet () |
Called when time was set at the end of the Time::operator++. More... | |
virtual bool | adjustTimeStep () |
Called at the end of Time::adjustDeltaT() if adjustTime is true. More... | |
virtual bool | read (const dictionary &) |
Read and set the function object if its data have changed. More... | |
virtual void | updateMesh (const mapPolyMesh &mpm) |
Update for changes of mesh. More... | |
virtual void | movePoints (const polyMesh &mesh) |
Update for changes of mesh. More... | |
![]() | |
virtual const word & | type () const =0 |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &t, const dictionary &dict),(name, t, dict)) | |
functionObject (const word &name) | |
Construct from components. More... | |
autoPtr< functionObject > | clone () const |
Return clone. More... | |
virtual | ~functionObject () |
Destructor. More... | |
virtual const word & | name () const |
Name. More... | |
Private Member Functions | |
setTimeStepFunctionObject (const setTimeStepFunctionObject &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const setTimeStepFunctionObject &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
const Time & | time_ |
Reference to the time database. More... | |
Switch | enabled_ |
Switch for the execution - defaults to 'yes/on'. More... | |
autoPtr< DataEntry< scalar > > | timeStepPtr_ |
Time step. More... | |
Additional Inherited Members | |
![]() | |
static autoPtr< functionObject > | New (const word &name, const Time &, const dictionary &) |
Select from dictionary, based on its "type" entry. More... | |
![]() | |
static int | debug |
This function object overrides the calculation time step. Can only be used with solvers with adjustTimeStep control (e.g. pimpleFoam). It makes no attempt to co-operate with other time step 'controllers', e.g. maxCo, other functionObjects. Supports 'enabled' flag but none of the other options 'timeStart', 'timeEnd', 'outputControl' etc.
Example of function object specification to manipulate the time step:
setTimeStep1 { type setTimeStep; functionObjectLibs ("libutilityFunctionObjects.so"); ... }
Function object usage
Property | Description | Required | Default value |
---|---|---|---|
type | Type name: setTimeStep | yes | |
enabled | On/off switch | no | yes |
Definition at line 91 of file setTimeStepFunctionObject.H.
|
private |
Disallow default bitwise copy construct.
setTimeStepFunctionObject | ( | const word & | name, |
const Time & | runTime, | ||
const dictionary & | dict | ||
) |
Construct from components.
Definition at line 47 of file setTimeStepFunctionObject.C.
References dict, and Foam::read().
|
private |
Disallow default bitwise assignment.
TypeName | ( | "setTimeStep" | ) |
Runtime type information.
|
inlinevirtual |
Return time database.
Definition at line 138 of file setTimeStepFunctionObject.H.
References setTimeStepFunctionObject::time_.
|
inlinevirtual |
Return the enabled flag.
Definition at line 144 of file setTimeStepFunctionObject.H.
References setTimeStepFunctionObject::enabled_.
|
virtual |
Switch the function object on.
Definition at line 63 of file setTimeStepFunctionObject.C.
References setTimeStepFunctionObject::enabled_.
|
virtual |
Switch the function object off.
Definition at line 69 of file setTimeStepFunctionObject.C.
|
virtual |
Called at the start of the time-loop.
Implements functionObject.
Definition at line 75 of file setTimeStepFunctionObject.C.
|
virtual |
Called at each ++ or += of the time-loop.
Implements functionObject.
Definition at line 81 of file setTimeStepFunctionObject.C.
|
virtual |
Called when Time::run() determines that the time-loop exits.
Reimplemented from functionObject.
Definition at line 87 of file setTimeStepFunctionObject.C.
|
virtual |
Called when time was set at the end of the Time::operator++.
Reimplemented from functionObject.
Definition at line 93 of file setTimeStepFunctionObject.C.
|
virtual |
Called at the end of Time::adjustDeltaT() if adjustTime is true.
Reimplemented from functionObject.
Definition at line 99 of file setTimeStepFunctionObject.C.
|
virtual |
Read and set the function object if its data have changed.
Implements functionObject.
Definition at line 117 of file setTimeStepFunctionObject.C.
References controlDict(), dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, and DataEntry::New().
|
virtual |
Update for changes of mesh.
Implements functionObject.
Definition at line 144 of file setTimeStepFunctionObject.C.
|
virtual |
Update for changes of mesh.
Implements functionObject.
Definition at line 148 of file setTimeStepFunctionObject.C.
|
private |
Reference to the time database.
Definition at line 98 of file setTimeStepFunctionObject.H.
Referenced by setTimeStepFunctionObject::time().
|
private |
Switch for the execution - defaults to 'yes/on'.
Definition at line 104 of file setTimeStepFunctionObject.H.
Referenced by setTimeStepFunctionObject::enabled(), and setTimeStepFunctionObject::on().
Time step.
Definition at line 107 of file setTimeStepFunctionObject.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.