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 (const functionObjectList &)=delete | |
Disallow default bitwise copy construction. More... | |
~functionObjectList () | |
Destructor. More... | |
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. 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 | end () |
Called when Time::run() determines that the time-loop exits. More... | |
bool | setTimeStep () |
Override the time-step value. More... | |
scalar | timeToNextWrite () |
Return the time to the next write. More... | |
void | updateMesh (const mapPolyMesh &mpm) |
Update for changes of mesh. More... | |
void | movePoints (const polyMesh &mesh) |
Update for changes of mesh. More... | |
void | operator= (const functionObjectList &)=delete |
Disallow default bitwise assignment. More... | |
Static Public Member Functions | |
static autoPtr< functionObjectList > | New (const argList &args, const Time &runTime, dictionary &controlDict, HashSet< word > &requiredFields) |
Construct and return a functionObjectList for an application. More... | |
static void | list () |
Print a list of functionObject configuration files in. More... | |
static fileName | findDict (const word &funcName, const word ®ion=word::null) |
Search for functionObject dictionary file for given region. More... | |
static bool | readFunctionObject (const string &funcCall, dictionary &functionsDict, const string &context, HashSet< word > &requiredFields, const word ®ion=word::null) |
Read the specified functionObject configuration dictionary. More... | |
Static Public Attributes | |
static fileName | functionObjectDictPath |
Default relative path to the directory structure. More... | |
List of function objects with start(), execute() and end() functions that is called for each object.
Definition at line 61 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 460 of file functionObjectList.C.
Referenced by functionObjectList::New(), and functionObjectList::readFunctionObject().
functionObjectList | ( | const Time & | runTime, |
const dictionary & | parentDict, | ||
const bool | execution = true |
||
) |
Construct from Time, a dictionary with "functions" entry.
and the execution setting.
[in] | t | - 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 476 of file functionObjectList.C.
References functionObjectList::New().
|
delete |
Disallow default bitwise copy construction.
~functionObjectList | ( | ) |
Destructor.
Definition at line 584 of file functionObjectList.C.
|
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 493 of file functionObjectList.C.
References dictionary::add(), argList::commandLine(), forAll, functionObjectList::functionObjectList(), dictionary::merge(), IOobject::MUST_READ_IF_MODIFIED, word::null, dictionary::null, argList::optionFound(), argList::optionLookup(), functionObjectList::readFunctionObject(), autoPtr< T >::reset(), and dictionary::subDict().
Referenced by functionObjectList::functionObjectList().
void clear | ( | ) |
Clear the list of function objects.
Definition at line 590 of file functionObjectList.C.
References PtrList< T >::clear(), and HashTable< T, Key, Hash >::clear().
Foam::label findObjectID | ( | const word & | name | ) | const |
Find the ID of a given function object by name.
Definition at line 599 of file functionObjectList.C.
References forAll, and Foam::name().
|
static |
Print a list of functionObject configuration files in.
user/group/shipped directories. The search scheme allows for version-specific and version-independent files using the following hierarchy:
Definition at line 106 of file functionObjectList.C.
References functionObjectList::findDict(), Foam::findEtcDirs(), forAll, functionObjectList::functionObjectDictPath, Foam::Info, Foam::nl, and HashTable< nil, Key, Hash >::sortedToc().
|
static |
Search for functionObject dictionary file for given region.
and if not present also search the case directory as well as the user/group/shipped directories. The search scheme allows for version-specific and version-independent files using the following hierarchy:
Definition at line 125 of file functionObjectList.C.
References wordRe::compile(), dict, Foam::exit(), Foam::stringOps::expand(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::findEtcDirs(), forAll, forAllConstIter(), functionObjectList::functionObjectDictPath, Foam::isFile(), wordRe::match(), Foam::nl, word::null, fileName::null, functionObjectList::readFunctionObject(), and Foam::search().
Referenced by functionObjectList::list(), and functionObjectList::readFunctionObject().
|
static |
Read the specified functionObject configuration dictionary.
parsing the optional arguments included in the string 'funcCall', 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'
Parses the optional functionObject arguments: 'Q(U)' -> funcName = Q; args = (U) -> field U;
Supports named arguments: 'patchAverage(patch=inlet, p,U)' or 'patchAverage(patch=inlet, field=(p U))' -> funcName = patchAverage; args = (patch=inlet, p,U) -> patch inlet; fields (p U);
Definition at line 223 of file functionObjectList.C.
References dictionary::add(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), List< T >::append(), args, Foam::constant::universal::c, Foam::decrIndent(), entry::disableFunctionEntries, Foam::endl(), fields, Foam::fileHandler(), functionObjectList::findDict(), UPtrList< T >::first(), forAll, dictionary::found(), functionObjectList::functionObjectList(), Foam::incrIndent(), Foam::indent(), InfoInFunction, HashSet< Key, Hash >::insert(), dictionary::isDict(), dictionary::lookup(), dictionary::merge(), dictionaryName::name(), entry::New(), Foam::nl, word::null, fileName::null, dictionary::null, objects, path(), dictionary::set(), List< T >::size(), functionObjectList::start(), OStringStream::str(), dictionary::subDict(), WarningInFunction, and OSstream::write().
Referenced by includeFuncEntry::execute(), functionObjectList::findDict(), and functionObjectList::New().
bool read | ( | ) |
Read and set the function objects if their data have changed.
Definition at line 753 of file functionObjectList.C.
References PtrList< T >::clear(), HashTable< T, Key, Hash >::clear(), dict, entry::dict(), dictionary::digest(), error::dontThrowExceptions(), Foam::endl(), Foam::exit(), Foam::FatalError, Foam::FatalIOError, FatalIOErrorInFunction, forAllConstIter(), dictionary::found(), Foam::Info, HashTable< T, Key, Hash >::insert(), IOWarningInFunction, entry::isDict(), Foam::libs, dictionary::lookupEntryPtr(), dictionary::lookupOrDefault(), functionObject::New(), Foam::nl, dlLibraryTable::open(), autoPtr< T >::ptr(), functionObject::read(), autoPtr< T >::set(), PtrList< T >::set(), PtrList< T >::setSize(), List< T >::setSize(), error::throwExceptions(), PtrList< T >::transfer(), HashTable< T, Key, Hash >::transfer(), autoPtr< T >::valid(), and WarningInFunction.
Referenced by functionObjectList::end(), functionObjectList::execute(), Time::readModifiedObjects(), functionObjectList::setTimeStep(), functionObjectList::start(), and functionObjectList::timeToNextWrite().
void on | ( | ) |
Switch the function objects on.
Definition at line 613 of file functionObjectList.C.
void off | ( | ) |
Switch the function objects off.
Definition at line 619 of file functionObjectList.C.
bool status | ( | ) | const |
Return the execution status (on/off) of the function objects.
Definition at line 626 of file functionObjectList.C.
bool start | ( | ) |
Called at the start of the time-loop.
Definition at line 632 of file functionObjectList.C.
References forAll, UPtrList< T >::operator[](), and functionObjectList::read().
Referenced by functionObjectList::readFunctionObject().
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 652 of file functionObjectList.C.
References forAll, UPtrList< T >::operator[](), and functionObjectList::read().
bool end | ( | ) |
Called when Time::run() determines that the time-loop exits.
Definition at line 674 of file functionObjectList.C.
References forAll, UPtrList< T >::operator[](), and functionObjectList::read().
bool setTimeStep | ( | ) |
Override the time-step value.
Definition at line 695 of file functionObjectList.C.
References List< T >::append(), Foam::endl(), forAll, Foam::name(), functionObjectList::read(), List< T >::size(), and WarningInFunction.
Foam::scalar timeToNextWrite | ( | ) |
Return the time to the next write.
Definition at line 732 of file functionObjectList.C.
References forAll, Foam::min(), and functionObjectList::read().
void updateMesh | ( | const mapPolyMesh & | mpm | ) |
Update for changes of mesh.
Definition at line 916 of file functionObjectList.C.
References forAll, and UPtrList< T >::operator[]().
void movePoints | ( | const polyMesh & | mesh | ) |
Update for changes of mesh.
Definition at line 928 of file functionObjectList.C.
References forAll, and UPtrList< T >::operator[]().
|
delete |
Disallow default bitwise assignment.
|
static |
Default relative path to the directory structure.
containing the functionObject dictionary files
Definition at line 113 of file functionObjectList.H.
Referenced by functionObjectList::findDict(), and functionObjectList::list().