List of function objects with start(), execute() and end() functions that is called for each object. More...
Public Member Functions | |
functionObjectList (const Time &, const bool execution=true) | |
Construct from Time and the execution setting. More... | |
functionObjectList (const Time &, const dictionary &parentDict, const bool execution=true) | |
Construct from Time, a dictionary with "functions" entry. More... | |
virtual | ~functionObjectList () |
Destructor. More... | |
IOdictionary & | stateDict () |
Return the state dictionary. More... | |
const IOdictionary & | stateDict () const |
Return const access to the state dictionary. More... | |
virtual void | clear () |
Clear the list of function objects. More... | |
virtual label | findObjectID (const word &name) const |
Find the ID of a given function object by name. More... | |
virtual void | on () |
Switch the function objects on. More... | |
virtual void | off () |
Switch the function objects off. More... | |
virtual bool | status () const |
Return the execution status (on/off) of the function objects. More... | |
virtual bool | start () |
Called at the start of the time-loop. More... | |
virtual bool | execute (const bool forceWrite=false) |
Called at each ++ or += of the time-loop. forceWrite overrides. 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 () |
Read and set the function objects if their 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... | |
Private Member Functions | |
void | createStateDict () const |
Create state dictionary. More... | |
functionObject * | remove (const word &, label &oldIndex) |
Remove and return the function object pointer by name,. More... | |
functionObjectList (const functionObjectList &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const functionObjectList &) |
Disallow default bitwise assignment. More... | |
![]() | |
PtrList () | |
Null Constructor. More... | |
PtrList (const label) | |
Construct with size specified. More... | |
PtrList (const PtrList< T > &) | |
Copy constructor. More... | |
PtrList (const PtrList< T > &, const CloneArg &) | |
Copy constructor with additional argument for clone. More... | |
PtrList (const Xfer< PtrList< T > > &) | |
Construct by transferring the parameter contents. More... | |
PtrList (PtrList< T > &, bool reUse) | |
Construct as copy or re-use as specified. More... | |
PtrList (const SLPtrList< T > &) | |
Construct as copy of SLPtrList<T> More... | |
PtrList (Istream &, const INew &) | |
Construct from Istream using given Istream constructor class. More... | |
PtrList (Istream &) | |
Construct from Istream using default Istream constructor class. More... | |
PtrList () | |
PtrList (const label s) | |
PtrList (const PtrList< T > &a) | |
PtrList (const Xfer< PtrList< T > > &lst) | |
PtrList (PtrList< T > &a, bool reUse) | |
PtrList (const SLPtrList< T > &sll) | |
PtrList (Istream &is) | |
~PtrList () | |
Destructor. More... | |
label | size () const |
Return the number of elements in the PtrList. More... | |
bool | empty () const |
Return true if the PtrList is empty (ie, size() is zero). More... | |
T & | first () |
Return reference to the first element of the list. More... | |
const T & | first () const |
Return reference to first element of the list. More... | |
T & | last () |
Return reference to the last element of the list. More... | |
const T & | last () const |
Return reference to the last element of the list. More... | |
void | setSize (const label) |
Reset size of PtrList. If extending the PtrList, new entries are. More... | |
void | resize (const label) |
Alias for setSize(const label) More... | |
void | clear () |
Clear the PtrList, i.e. set size to zero deleting all the. More... | |
void | append (T *) |
Append an element at the end of the list. More... | |
void | append (const autoPtr< T > &) |
void | append (const tmp< T > &) |
void | transfer (PtrList< T > &) |
Transfer the contents of the argument PtrList into this PtrList. More... | |
Xfer< PtrList< T > > | xfer () |
Transfer contents to the Xfer container. More... | |
bool | set (const label) const |
Is element set. More... | |
autoPtr< T > | set (const label, T *) |
Set element. Return old element (can be NULL). More... | |
autoPtr< T > | set (const label, const autoPtr< T > &) |
autoPtr< T > | set (const label, const tmp< T > &) |
void | reorder (const labelUList &) |
Reorders elements. Ordering does not have to be done in. More... | |
const T & | operator[] (const label) const |
Return element const reference. More... | |
T & | operator[] (const label) |
Return element reference. More... | |
const T * | operator() (const label) const |
Return element const pointer. More... | |
PtrList< T > & | operator= (const PtrList< T > &) |
Assignment. More... | |
iterator | begin () |
Return an iterator to begin traversing the PtrList. More... | |
const_iterator | begin () const |
Return an const_iterator to begin traversing the PtrList. More... | |
iterator | end () |
Return an iterator to end traversing the PtrList. More... | |
const_iterator | end () const |
Return an const_iterator to end traversing the PtrList. More... | |
const_iterator | cbegin () const |
Return an const_iterator to begin traversing the PtrList. More... | |
const_iterator | cend () const |
Return an const_iterator to end traversing the PtrList. More... | |
void | read (Istream &, const INew &inewt) |
Read from Istream using given Istream constructor class. More... | |
Private Attributes | |
List< SHA1Digest > | digests_ |
A list of SHA1 digests for the function object dictionaries. More... | |
HashTable< label > | indices_ |
Quick lookup of the index into functions/digests. More... | |
const Time & | time_ |
const dictionary & | parentDict_ |
The parent dictionary containing a "functions" entry. More... | |
autoPtr< IOdictionary > | stateDictPtr_ |
Function object properties - stores state information. More... | |
bool | execution_ |
Switch for the execution of the functionObjects. More... | |
bool | updated_ |
Tracks if read() was called while execution is on. More... | |
![]() | |
const typedef T & | const_reference |
Type that can be used for storing into constant PtrList::value_type. More... | |
Additional Inherited Members | |
![]() | |
typedef T | value_type |
Type of values the PtrList contains. More... | |
typedef T & | reference |
Type that can be used for storing into PtrList::value_type objects. More... | |
List of function objects with start(), execute() and end() functions that is called for each object.
Definition at line 58 of file functionObjectList.H.
|
private |
Disallow default bitwise copy construct.
functionObjectList | ( | const Time & | t, |
const bool | execution = true |
||
) |
Construct from Time and the execution setting.
The functionObject specifications are read from the controlDict
Definition at line 85 of file functionObjectList.C.
functionObjectList | ( | const Time & | t, |
const dictionary & | parentDict, | ||
const bool | execution = true |
||
) |
Construct from Time, a dictionary with "functions" entry.
and the execution setting.
[in] | parentDict | - the parent dictionary containing a "functions" entry, which can either be a list or a dictionary of functionObject specifications. |
Definition at line 102 of file functionObjectList.C.
|
virtual |
Destructor.
Definition at line 121 of file functionObjectList.C.
|
private |
Create state dictionary.
Definition at line 32 of file functionObjectList.C.
References IOobject::NO_WRITE, IOobject::READ_IF_PRESENT, functionObjectList::stateDictPtr_, functionObjectList::time_, and Time::timeName().
|
private |
Remove and return the function object pointer by name,.
and returns the old index via the parameter. Returns a NULL pointer (and index -1) if it didn't exist.
Definition at line 55 of file functionObjectList.C.
References HashTable::find().
|
private |
Disallow default bitwise assignment.
const Foam::IOdictionary & stateDict | ( | ) |
Return the state dictionary.
Definition at line 127 of file functionObjectList.C.
const IOdictionary& stateDict | ( | ) | const |
Return const access to the state dictionary.
|
virtual |
Clear the list of function objects.
Definition at line 149 of file functionObjectList.C.
References PtrList::clear().
|
virtual |
Find the ID of a given function object by name.
Definition at line 158 of file functionObjectList.C.
References forAll, and Foam::name().
|
virtual |
Switch the function objects on.
Definition at line 172 of file functionObjectList.C.
|
virtual |
Switch the function objects off.
Definition at line 178 of file functionObjectList.C.
Referenced by main().
|
virtual |
Return the execution status (on/off) of the function objects.
Definition at line 185 of file functionObjectList.C.
|
virtual |
Called at the start of the time-loop.
Definition at line 191 of file functionObjectList.C.
References Foam::read().
|
virtual |
Called at each ++ or += of the time-loop. forceWrite overrides.
the usual outputControl behaviour and forces writing always (used in postprocessing mode)
Definition at line 197 of file functionObjectList.C.
References IOstream::ASCII, IOstream::currentVersion, forAll, IOstream::precision_, and Foam::read().
|
virtual |
Called when Time::run() determines that the time-loop exits.
Definition at line 234 of file functionObjectList.C.
References forAll, and Foam::read().
|
virtual |
Called when time was set at the end of the Time::operator++.
Definition at line 255 of file functionObjectList.C.
References forAll, and Foam::read().
|
virtual |
Called at the end of Time::adjustDeltaT() if adjustTime is true.
Definition at line 276 of file functionObjectList.C.
References forAll, and Foam::read().
Referenced by Time::adjustDeltaT().
|
virtual |
Read and set the function objects if their data have changed.
Definition at line 297 of file functionObjectList.C.
References PtrList::clear(), dict, entry::dict(), dictionary::digest(), forAllConstIter(), forAllIter, HashTable::insert(), entry::isDict(), functionObject::New(), functionObject::read(), PtrList::set(), List::setSize(), PtrList::setSize(), PtrList::size(), functionObject::start(), entry::stream(), and PtrList::transfer().
|
virtual |
|
virtual |
Update for changes of mesh.
Definition at line 447 of file functionObjectList.C.
|
private |
A list of SHA1 digests for the function object dictionaries.
Definition at line 65 of file functionObjectList.H.
Quick lookup of the index into functions/digests.
Definition at line 68 of file functionObjectList.H.
|
private |
Definition at line 70 of file functionObjectList.H.
Referenced by functionObjectList::createStateDict().
|
private |
The parent dictionary containing a "functions" entry.
This entry can either be a list or a dictionary of functionObject specifications.
Definition at line 75 of file functionObjectList.H.
|
mutableprivate |
Function object properties - stores state information.
Definition at line 78 of file functionObjectList.H.
Referenced by functionObjectList::createStateDict().
|
private |
Switch for the execution of the functionObjects.
Definition at line 81 of file functionObjectList.H.
|
private |
Tracks if read() was called while execution is on.
Definition at line 84 of file functionObjectList.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.