List of function objects with start(), execute() and end() functions that is called for each object. More...
Public Member Functions | |
functionObjectList (const Time &runTime, const bool execution=true) | |
Construct from Time and the execution setting. More... | |
functionObjectList (const Time &runTime, const dictionary &parentDict, const bool execution=true) | |
Construct from Time, a dictionary with "functions" entry. More... | |
~functionObjectList ()=default | |
Destructor. More... | |
label | triggerIndex () const |
Return the current trigger index (read from the stateDict) More... | |
void | resetState () |
Reset/read state dictionary for current time. More... | |
IOdictionary & | stateDict () |
const IOdictionary & | stateDict () const |
objectRegistry & | storedObjects () |
const objectRegistry & | storedObjects () const |
void | clear () |
Clear the list of function objects. More... | |
label | findObjectID (const word &name) const |
Find the ID of a given function object by name, -1 if not found. More... | |
bool | read () |
Read and set the function objects if their data have changed. More... | |
void | on () |
Switch the function objects on. More... | |
void | off () |
Switch the function objects off. More... | |
bool | status () const |
Return the execution status (on/off) of the function objects. More... | |
bool | start () |
Called at the start of the time-loop. More... | |
bool | execute () |
Called at each ++ or += of the time-loop. More... | |
bool | execute (const label subIndex) |
Execute function objects using the specified subIndex. More... | |
bool | execute (const UList< wordRe > &functionNames, const label subIndex) |
Execute a subset of function objects using the specified subIndex. More... | |
bool | end () |
Called when Time::run() determines that the time-loop exits. More... | |
bool | adjustTimeStep () |
Called at the end of Time::adjustDeltaT() if adjustTime is true. More... | |
bool | filesModified () const |
Did any file get changed during execution? More... | |
void | updateMesh (const mapPolyMesh &mpm) |
Update for changes of mesh. More... | |
void | movePoints (const polyMesh &mesh) |
Update for changes of mesh. More... | |
Static Public Member Functions | |
static autoPtr< functionObjectList > | New (const argList &args, const Time &runTime, dictionary &controlDict, HashSet< wordRe > &requiredFields) |
Construct and return a functionObjectList for an application. More... | |
static void | list () |
static fileName | findDict (const word &funcName) |
static bool | readFunctionObject (const string &funcNameArgs0, dictionary &functionsDict, HashSet< wordRe > &requiredFields, const word ®ion=word::null) |
Static Public Attributes | |
static fileName | functionObjectDictPath |
List of function objects with start(), execute() and end() functions that is called for each object.
Definition at line 66 of file functionObjectList.H.
functionObjectList | ( | const Time & | runTime, |
const bool | execution = true |
||
) |
Construct from Time and the execution setting.
The functionObject specifications are read from the controlDict
Definition at line 353 of file functionObjectList.C.
functionObjectList | ( | const Time & | runTime, |
const dictionary & | parentDict, | ||
const bool | execution = true |
||
) |
Construct from Time, a dictionary with "functions" entry.
and the execution setting.
[in] | runTime | - the other Time instance to construct from |
[in] | parentDict | - the parent dictionary containing a "functions" entry, which can either be a list or a dictionary of functionObject specifications. |
[in] | execution | - whether the function objects should execute or not. Default: true. |
Definition at line 371 of file functionObjectList.C.
|
default |
Destructor.
|
static |
Construct and return a functionObjectList for an application.
If the "dict" argument is specified the functionObjectList is constructed from that dictionary which is returned as controlDict otherwise the functionObjectList is constructed from the "functions" sub-dictionary of "system/controlDict"
Definition at line 390 of file functionObjectList.C.
References args, controlDict(), argList::found(), argList::getList(), argList::getOrDefault(), IOobject::MUST_READ_IF_MODIFIED, dictionary::null, regionName, autoPtr< T >::reset(), runTime, and functionObjectList::start().
Foam::label triggerIndex | ( | ) | const |
Return the current trigger index (read from the stateDict)
Definition at line 479 of file functionObjectList.C.
References Foam::labelMin.
void resetState | ( | ) |
Reset/read state dictionary for current time.
Definition at line 488 of file functionObjectList.C.
Foam::IOdictionary & stateDict | ( | ) |
Write access to the state dictionary ("functionObjectProperties") registered on Time
Definition at line 496 of file functionObjectList.C.
Referenced by stateFunctionObject::stateDict().
const Foam::IOdictionary & stateDict | ( | ) | const |
Const access to the state dictionary ("functionObjectProperties") registered on Time
Definition at line 507 of file functionObjectList.C.
Foam::objectRegistry & storedObjects | ( | ) |
Write access to the output objects ("functionObjectObjects") registered on Time
Definition at line 518 of file functionObjectList.C.
const Foam::objectRegistry & storedObjects | ( | ) | const |
Const access to the output objects ("functionObjectObjects") registered on Time
Definition at line 529 of file functionObjectList.C.
void clear | ( | ) |
Clear the list of function objects.
Definition at line 540 of file functionObjectList.C.
References PtrList< T >::clear().
Foam::label findObjectID | ( | const word & | name | ) | const |
Find the ID of a given function object by name, -1 if not found.
Definition at line 549 of file functionObjectList.C.
References Foam::name().
|
static |
Print a list of functionObject configuration files in the directories located using Foam::findEtcDirs("caseDicts/postProcessing")
other (shipped) settings
Where {PROJECT_API} is the value of the OPENFOAM define. See further notes in Foam::findEtcEntries()
Definition at line 142 of file functionObjectList.C.
References Foam::findEtcDirs(), Foam::Info, Foam::nl, and HashTable< T, Key, Hash >::sortedToc().
|
static |
Find a functionObject dictionary file in the case <system> directory or any directory located using Foam::findEtcDirs("caseDicts/postProcessing")
Definition at line 158 of file functionObjectList.C.
References Foam::stringOps::expand(), Foam::findEtcDirs(), Foam::isFile(), fileName::null, and Foam::search().
Referenced by functionObjectList::readFunctionObject().
|
static |
Read the specified functionObject configuration dictionary parsing the optional arguments included in the name 'funcNameArgs0', inserting 'field' or 'fields' entries as required and merging the resulting functionObject dictionary into 'functionsDict'. Any fields required to execute the functionObject are added to 'requiredFields'
Uses functionObjectList::findDict() for searching
Definition at line 183 of file functionObjectList.C.
References dictionary::add(), List< T >::append(), args, Foam::constant::universal::c, Foam::endl(), Foam::fileHandler(), functionObjectList::findDict(), dictionary::findDict(), dictionary::found(), dictionary::get(), HashSet< Key, Hash >::insert(), dictionary::merge(), entry::New(), fileName::null, path(), dictionary::set(), argList::size(), word::validate(), and WarningInFunction.
bool read | ( | ) |
Read and set the function objects if their data have changed.
Definition at line 728 of file functionObjectList.C.
References addProfiling, PtrList< T >::clear(), autoPtr< T >::clear(), dict, entry::dict(), dictionary::digest(), Foam::endl(), timeControl::entriesPresent(), Foam::exit(), Foam::FatalError, Foam::FatalIOError, FatalIOErrorInFunction, dictionary::getOrDefault(), Foam::Info, InfoInFunction, IOWarningInFunction, entry::isDict(), keyType::LITERAL, functionObject::name(), functionObject::New(), Foam::nl, functionObject::read(), autoPtr< T >::release(), autoPtr< T >::reset(), PtrList< T >::resize(), Foam::returnReduce(), error::throwExceptions(), PtrList< T >::transfer(), autoPtr< T >::valid(), Foam::Warning, and error::write().
void on | ( | ) |
Switch the function objects on.
Definition at line 567 of file functionObjectList.C.
void off | ( | ) |
Switch the function objects off.
Definition at line 573 of file functionObjectList.C.
bool status | ( | ) | const |
Return the execution status (on/off) of the function objects.
Definition at line 580 of file functionObjectList.C.
bool start | ( | ) |
Called at the start of the time-loop.
Definition at line 586 of file functionObjectList.C.
References Foam::read().
Referenced by functionObjectList::New().
bool execute | ( | ) |
Called at each ++ or += of the time-loop.
postProcess overrides the usual executeControl behaviour and forces execution (used in post-processing mode)
Definition at line 592 of file functionObjectList.C.
References addProfiling, IOstreamOption::ASCII, IOstream::precision_, and Foam::read().
bool execute | ( | const label | subIndex | ) |
Execute function objects using the specified subIndex.
subIndex | an execution sub-index corresponding to a sub-cycle or something similar |
Definition at line 639 of file functionObjectList.C.
Execute a subset of function objects using the specified subIndex.
functionNames | names or regex of existing functions to execute |
subIndex | an execution sub-index corresponding to a sub-cycle or something similar |
Definition at line 656 of file functionObjectList.C.
References Foam::stringOps::match(), and UList< T >::size().
bool end | ( | ) |
Called when Time::run() determines that the time-loop exits.
Definition at line 678 of file functionObjectList.C.
References addProfiling, and Foam::read().
bool adjustTimeStep | ( | ) |
Called at the end of Time::adjustDeltaT() if adjustTime is true.
Definition at line 703 of file functionObjectList.C.
References addProfiling, and Foam::read().
Referenced by Time::adjustDeltaT().
bool filesModified | ( | ) | const |
Did any file get changed during execution?
Definition at line 939 of file functionObjectList.C.
void updateMesh | ( | const mapPolyMesh & | mpm | ) |
Update for changes of mesh.
Definition at line 954 of file functionObjectList.C.
void movePoints | ( | const polyMesh & | mesh | ) |
|
static |
Default relative path ("caseDicts/postProcessing") to the directory structure containing functionObject dictionary files.
Definition at line 135 of file functionObjectList.H.