mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: added functionObject::execute(int) method
- this is a provision for defining execute actions that can be called largely independently of the normal time-loop constraints. This can be useful to provide hooks for sub-cycling, or to define an action that can be triggered manually or on some other event.
This commit is contained in:
@ -141,6 +141,12 @@ bool Foam::functionObject::read(const dictionary& dict)
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObject::execute(const label)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObject::end()
|
||||
{
|
||||
return true;
|
||||
|
||||
@ -222,13 +222,19 @@ public:
|
||||
const word& name() const;
|
||||
|
||||
//- Read and set the function object if its data have changed
|
||||
virtual bool read(const dictionary&);
|
||||
virtual bool read(const dictionary& dict);
|
||||
|
||||
//- Called at each ++ or += of the time-loop.
|
||||
// postProcess overrides the usual executeControl behaviour and
|
||||
// forces execution (used in post-processing mode)
|
||||
virtual bool execute() = 0;
|
||||
|
||||
//- Execute using the specified subIndex.
|
||||
// The base implementation is a no-op.
|
||||
// \param subIndex an execution sub-index corresponding to a
|
||||
// sub-cycle or something similar.
|
||||
virtual bool execute(const label subIndex);
|
||||
|
||||
//- Called at each ++ or += of the time-loop.
|
||||
// postProcess overrides the usual writeControl behaviour and
|
||||
// forces writing always (used in post-processing mode)
|
||||
@ -245,9 +251,11 @@ public:
|
||||
virtual bool filesModified() const;
|
||||
|
||||
//- Update for changes of mesh
|
||||
// The base implementation is a no-op.
|
||||
virtual void updateMesh(const mapPolyMesh& mpm);
|
||||
|
||||
//- Update for changes of mesh
|
||||
// The base implementation is a no-op.
|
||||
virtual void movePoints(const polyMesh& mesh);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user