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... | |
writeObjects (const writeObjects &)=delete | |
Disallow default bitwise copy construction. 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... | |
void | operator= (const writeObjects &)=delete |
Disallow default bitwise assignment. More... | |
Public Member Functions inherited from functionObject | |
ClassName ("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... | |
functionObject (const functionObject &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual | ~functionObject () |
Destructor. More... | |
const word & | name () const |
Return the name of this functionObject. More... | |
virtual bool | executeAtStart () const |
Return true if the functionObject should be executed at the start. More... | |
virtual bool | end () |
Called when Time::run() determines that the time-loop exits. More... | |
virtual scalar | timeToNextWrite () |
Called by Time::adjustTimeStep(). Allows the functionObject 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... | |
void | operator= (const functionObject &)=delete |
Disallow default bitwise assignment. More... | |
Public Member Functions inherited from writeObjectsBase | |
writeObjectsBase (const objectRegistry &obr, const Switch &logRef) | |
Construct from objectRegistry and inheriting function object. More... | |
writeObjectsBase (const writeObjectsBase &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual | ~writeObjectsBase () |
Destructor. More... | |
const wordReList & | writeObjectNames () const |
Return const access to the object names requested to be written. More... | |
void | operator= (const writeObjectsBase &)=delete |
Disallow default bitwise assignment. More... | |
Static Public Attributes | |
static const NamedEnum< writeOption, 3 > | writeOptionNames_ |
Static Public Attributes inherited from functionObject | |
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... | |
Switch | executeAtStart_ |
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... | |
Switch | regExp_ |
Optional switch for regular expression support. 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.
|
strong |
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 138 of file writeObjects.C.
References Foam::read().
Referenced by NamedEnum< compressibleField, 8 >::names().
|
delete |
Disallow default bitwise copy construction.
|
virtual |
Destructor.
Definition at line 161 of file writeObjects.C.
TypeName | ( | "writeObjects" | ) |
Runtime type information.
|
virtual |
Read the writeObjects data.
Reimplemented from functionObject.
Definition at line 167 of file writeObjects.C.
References dictionary::found(), dictionary::lookup(), dictionary::lookupOrDefault(), writeObjectsBase::read(), and functionObject::read().
|
virtual |
|
virtual |
Write the registered objects.
Implements functionObject.
Definition at line 204 of file writeObjects.C.
References Foam::endl(), Log, Foam::name(), Foam::nl, Foam::type(), and writeObjectsBase::write().
|
delete |
Disallow default bitwise assignment.
|
static |
Definition at line 148 of file writeObjects.H.
Referenced by NamedEnum< compressibleField, 8 >::names().