Allows specification of different writing frequency of objects registered to the database. More...


Public Types | |
| enum class | 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 wordList | fields () const |
| Return the list of fields required. 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, const Time &runTime) | |
| Construct from components. More... | |
| functionObject (const word &name, const Time &runTime, const dictionary &dict) | |
| Construct from dictionary. 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 | timeToNextAction () |
| Called by Time::adjustTimeStep(). Allows the functionObject to. More... | |
| virtual scalar | maxDeltaT () const |
| Return the maximum time-step for stable operation. More... | |
| virtual void | movePoints (const polyMesh &mesh) |
| Update topology using the given map. More... | |
| virtual void | topoChange (const polyTopoChangeMap &map) |
| Update topology using the given map. More... | |
| virtual void | mapMesh (const polyMeshMap &) |
| Update from another mesh using the given map. More... | |
| virtual void | distribute (const polyDistributionMap &) |
| Redistribute or update using the given distribution map. More... | |
| void | operator= (const functionObject &)=delete |
| Disallow default bitwise assignment. More... | |
Public Member Functions inherited from writeObjectsBase | |
| writeObjectsBase (const objectRegistry &obr, const Switch &logRef=logFalse) | |
| 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 execute at start time. 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 functionObject | |
| const Time & | time_ |
| Reference to time. 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... | |
Static Protected Attributes inherited from writeObjectsBase | |
| static const Switch | logFalse |
| False switch to which log_ defaults. 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, fields or field | objects to write | yes | |
writeOption | only those with this write option | no | anyWrite |
The objects to be written can either be specified by the objects, fields or field entry, the latter two for backwards compatibility and to provide a more logical, obvious and readable interface when writing fields. Regular expressions can also be used when specifying multiple objects or fields.
Definition at line 135 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 146 of file writeObjects.H.
| writeObjects | ( | const word & | name, |
| const Time & | runTime, | ||
| const dictionary & | dict | ||
| ) |
Construct from Time and dictionary.
Definition at line 122 of file writeObjects.C.
References dict, and writeObjects::read().

|
delete |
Disallow default bitwise copy construction.
|
virtual |
Destructor.
Definition at line 146 of file writeObjects.C.
| TypeName | ( | "writeObjects" | ) |
Runtime type information.
|
virtual |
Read the writeObjects data.
Reimplemented from functionObject.
Definition at line 152 of file writeObjects.C.
References dict, functionObject::read(), and writeObjectsBase::read().
Referenced by writeObjects::writeObjects().


|
inlinevirtual |
Return the list of fields required.
Implements functionObject.
Definition at line 200 of file writeObjects.H.
References List< word >::null().

|
virtual |
|
virtual |
Write the registered objects.
Implements functionObject.
Definition at line 189 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 153 of file writeObjects.H.