Allows specification of different writing frequency of objects registered to the database. More...
Public Types | |
enum | writeOption { AUTO_WRITE, NO_WRITE, ANY_WRITE } |
Re-enumeration defining the write options, based on the original. More... | |
Public Member Functions | |
TypeName ("writeObjects") | |
Runtime type information. More... | |
writeObjects (const word &name, const Time &runTime, const dictionary &dict) | |
Construct from Time and dictionary. More... | |
virtual | ~writeObjects () |
Destructor. More... | |
virtual bool | read (const dictionary &) |
Read the writeObjects data. More... | |
virtual bool | execute () |
Do nothing. More... | |
virtual bool | write () |
Write the registered objects. More... | |
Public Member Functions inherited from functionObject | |
virtual const word & | type () const =0 |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict)) | |
functionObject (const word &name) | |
Construct from components. More... | |
autoPtr< functionObject > | clone () const |
Return clone. More... | |
virtual | ~functionObject () |
Destructor. More... | |
const word & | name () const |
Return the name of this functionObject. More... | |
virtual bool | end () |
Called when Time::run() determines that the time-loop exits. More... | |
virtual bool | setTimeStep () |
Called by Time::setDeltaT(). Allows the function object to override. More... | |
virtual scalar | timeToNextWrite () |
Called by Time::adjustTimeStep(). Allows the function object to. 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... | |
Public Member Functions inherited from writeObjectsBase | |
writeObjectsBase (const objectRegistry &obr, const Switch &logRef) | |
Construct from objectRegistry and inheriting function object. More... | |
virtual | ~writeObjectsBase () |
Destructor. More... | |
const wordReList & | writeObjectNames () const |
Return const access to the object names requested to be written. More... | |
Static Public Attributes | |
static const NamedEnum< writeOption, 3 > | writeOptionNames_ |
Static Public Attributes inherited from functionObject | |
static int | debug |
static bool | postProcess |
Global post-processing mode switch. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from functionObject | |
static autoPtr< functionObject > | New (const word &name, const Time &, const dictionary &) |
Select from dictionary, based on its "type" entry. More... | |
Public Attributes inherited from functionObject | |
Switch | log |
Switch write log to Info. More... | |
Protected Member Functions inherited from writeObjectsBase | |
void | resetWriteObjectName (const wordRe &name) |
Reset the list of object names to be written to a single regular. More... | |
void | resetWriteObjectNames (const wordReList &names) |
Reset the list of object names to be written. More... | |
virtual wordList | objectNames () |
Get the list of field names to be written. More... | |
Protected Attributes inherited from writeObjectsBase | |
const objectRegistry & | writeObr_ |
Reference to the region objectRegistry. More... | |
const Switch & | log_ |
Reference to the inheriting function object's log variable. More... | |
wordReList | writeObjectNames_ |
Object names requested by the user to be written. More... | |
Allows specification of different writing frequency of objects registered to the database.
It has similar functionality as the main time database through the writeControl
setting:
It also has the ability to write the selected objects that were defined with the respective write mode for the requested writeOption
, namely:
= | objects set to write at output time | |
= | objects set to not write by default | |
= | any option of the previous two |
Example of function object specification:
writeObjects1 { type writeObjects; libs ("libutilityFunctionObjects.so"); ... objects (obj1 obj2); writeOption anyWrite; }
Property | Description | Required | Default value |
---|---|---|---|
type | type name: writeObjects | yes | |
objects | objects to write | yes | |
writeOption | only those with this write option | no | anyWrite |
Note: Regular expressions can also be used in objects
.
Definition at line 130 of file writeObjects.H.
enum writeOption |
Re-enumeration defining the write options, based on the original.
ones at IOobject::writeOption
Enumerator | |
---|---|
AUTO_WRITE | |
NO_WRITE | |
ANY_WRITE |
Definition at line 141 of file writeObjects.H.
writeObjects | ( | const word & | name, |
const Time & | runTime, | ||
const dictionary & | dict | ||
) |
Construct from Time and dictionary.
Definition at line 126 of file writeObjects.C.
References Foam::read().
|
virtual |
Destructor.
Definition at line 149 of file writeObjects.C.
TypeName | ( | "writeObjects" | ) |
Runtime type information.
|
virtual |
Read the writeObjects data.
Reimplemented from functionObject.
Definition at line 155 of file writeObjects.C.
References dictionary::found(), dictionary::lookup(), writeObjectsBase::read(), and functionObject::read().
|
virtual |
|
virtual |
Write the registered objects.
Implements functionObject.
Definition at line 190 of file writeObjects.C.
References Foam::endl(), Foam::Info, Log, Foam::name(), Foam::nl, Foam::type(), and writeObjectsBase::write().
|
static |
Definition at line 148 of file writeObjects.H.
Referenced by NamedEnum< directionType, 3 >::names().