Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
functionObjectList Class Reference

List of function objects with start(), execute() and end() functions that is called for each object. More...

Inheritance diagram for functionObjectList:
Inheritance graph
[legend]
Collaboration diagram for functionObjectList:
Collaboration graph
[legend]

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 ()
 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 adjustTimeStep ()
 Called at the end of Time::adjustDeltaT() if adjustTime is true. 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< functionObjectListNew (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)
 Search for functionObject dictionary file in. More...
 
static bool readFunctionObject (const string &funcNameArgs0, dictionary &functionsDict, HashSet< word > &requiredFields, const word &region=word::null)
 Read the specified functionObject configuration dictionary parsing. More...
 

Static Public Attributes

static fileName functionObjectDictPath
 Default relative path to the directory structure. More...
 

Detailed Description

List of function objects with start(), execute() and end() functions that is called for each object.

See also
Foam::functionObject Foam::functionObjects::timeControl
Source files

Definition at line 60 of file functionObjectList.H.

Constructor & Destructor Documentation

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 313 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.

Parameters
[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 329 of file functionObjectList.C.

References functionObjectList::New().

Here is the call graph for this function:

Destructor.

Definition at line 435 of file functionObjectList.C.

Member Function Documentation

Foam::autoPtr< Foam::functionObjectList > New ( const argList args,
const Time runTime,
dictionary controlDict,
HashSet< word > &  requiredFields 
)
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 346 of file functionObjectList.C.

References dictionary::add(), forAll, 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().

Here is the call graph for this function:

Here is the caller graph for this function:

void clear ( )

Clear the list of function objects.

Definition at line 441 of file functionObjectList.C.

References PtrList< T >::clear(), and HashTable< T, Key, Hash >::clear().

Here is the call graph for this function:

Foam::label findObjectID ( const word name) const

Find the ID of a given function object by name.

Definition at line 450 of file functionObjectList.C.

References forAll, and Foam::name().

Here is the call graph for this function:

void list ( )
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:

  • user settings:
    • ~/.OpenFOAM/<VERSION>/caseDicts/postProcessing
    • ~/.OpenFOAM/caseDicts/postProcessing
  • group (site) settings (when $WM_PROJECT_SITE is set):
    • $WM_PROJECT_SITE/<VERSION>/caseDicts/postProcessing
    • $WM_PROJECT_SITE/caseDicts/postProcessing
  • group (site) settings (when $WM_PROJECT_SITE is not set):
    • $WM_PROJECT_INST_DIR/site/<VERSION>/caseDicts/postProcessing
    • $WM_PROJECT_INST_DIR/site/caseDicts/postProcessing
  • other (shipped) settings:
    • $WM_PROJECT_DIR/etc/caseDicts/postProcessing

Definition at line 104 of file functionObjectList.C.

References Foam::findEtcDirs(), forAll, functionObjectList::functionObjectDictPath, Foam::Info, Foam::nl, and HashTable< nil, Key, Hash >::sortedToc().

Here is the call graph for this function:

Foam::fileName findDict ( const word funcName)
static

Search for functionObject dictionary file in.

user/group/shipped directories. The search scheme allows for version-specific and version-independent files using the following hierarchy:

  • user settings:
    • ~/.OpenFOAM/<VERSION>/caseDicts/postProcessing
    • ~/.OpenFOAM/caseDicts/postProcessing
  • group (site) settings (when $WM_PROJECT_SITE is set):
    • $WM_PROJECT_SITE/<VERSION>/caseDicts/postProcessing
    • $WM_PROJECT_SITE/caseDicts/postProcessing
  • group (site) settings (when $WM_PROJECT_SITE is not set):
    • $WM_PROJECT_INST_DIR/site/<VERSION>/caseDicts/postProcessing
    • $WM_PROJECT_INST_DIR/site/caseDicts/postProcessing
  • other (shipped) settings:
    • $WM_PROJECT_DIR/etc/caseDicts/postProcessing
Returns
The path of the functionObject dictionary file if found otherwise null

Definition at line 122 of file functionObjectList.C.

References Foam::stringOps::expand(), Foam::findEtcDirs(), forAll, functionObjectList::functionObjectDictPath, Foam::isFile(), fileName::null, functionObjectList::readFunctionObject(), and Foam::search().

Referenced by functionObjectList::readFunctionObject().

Here is the call graph for this function:

Here is the caller graph for this function:

bool readFunctionObject ( const string funcNameArgs0,
dictionary functionsDict,
HashSet< word > &  requiredFields,
const word region = word::null 
)
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'

Definition at line 151 of file functionObjectList.C.

References dictionary::add(), List< T >::append(), args, Foam::constant::universal::c, Foam::endl(), functionObjectList::findDict(), UPtrList< T >::first(), forAll, dictionary::found(), HashSet< Key, Hash >::insert(), dictionary::isDict(), dictionary::lookup(), dictionary::merge(), entry::New(), word::null, fileName::null, path(), dictionary::set(), List< T >::size(), functionObjectList::start(), dictionary::subDict(), and WarningInFunction.

Referenced by includeFuncEntry::execute(), functionObjectList::findDict(), and functionObjectList::New().

Here is the call graph for this function:

Here is the caller graph for this function:

bool read ( )
void on ( )

Switch the function objects on.

Definition at line 464 of file functionObjectList.C.

void off ( )

Switch the function objects off.

Definition at line 470 of file functionObjectList.C.

bool status ( ) const

Return the execution status (on/off) of the function objects.

Definition at line 477 of file functionObjectList.C.

bool start ( )

Called at the start of the time-loop.

Definition at line 483 of file functionObjectList.C.

References functionObjectList::read().

Referenced by functionObjectList::readFunctionObject().

Here is the call graph for this function:

Here is the caller graph for this function:

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 489 of file functionObjectList.C.

References forAll, UPtrList< T >::operator[](), and functionObjectList::read().

Here is the call graph for this function:

bool end ( )

Called when Time::run() determines that the time-loop exits.

Definition at line 511 of file functionObjectList.C.

References forAll, UPtrList< T >::operator[](), and functionObjectList::read().

Here is the call graph for this function:

bool adjustTimeStep ( )

Called at the end of Time::adjustDeltaT() if adjustTime is true.

Definition at line 532 of file functionObjectList.C.

References forAll, UPtrList< T >::operator[](), and functionObjectList::read().

Here is the call graph for this function:

void updateMesh ( const mapPolyMesh mpm)

Update for changes of mesh.

Definition at line 716 of file functionObjectList.C.

References forAll, and UPtrList< T >::operator[]().

Here is the call graph for this function:

void movePoints ( const polyMesh mesh)

Update for changes of mesh.

Definition at line 728 of file functionObjectList.C.

References forAll, and UPtrList< T >::operator[]().

Here is the call graph for this function:

Member Data Documentation

Foam::fileName functionObjectDictPath
static

Default relative path to the directory structure.

containing the functionObject dictionary files

Definition at line 110 of file functionObjectList.H.

Referenced by functionObjectList::findDict(), and functionObjectList::list().


The documentation for this class was generated from the following files: