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

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

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

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 wordtype () 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< functionObjectclone () const
 Return clone. More...
 
virtual ~functionObject ()
 Destructor. More...
 
const wordname () 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 wordReListwriteObjectNames () 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< functionObjectNew (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 objectRegistrywriteObr_
 Reference to the region objectRegistry. More...
 
const Switchlog_
 Reference to the inheriting function object's log variable. More...
 
wordReList writeObjectNames_
 Object names requested by the user to be written. More...
 

Detailed Description

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:

$ autoWrite $ = objects set to write at output time
$ noWrite $ = objects set to not write by default
$ anyWrite $ = any option of the previous two

Example of function object specification:

    writeObjects1
    {
        type        writeObjects;
        libs        ("libutilityFunctionObjects.so");
        ...
        objects     (obj1 obj2);
        writeOption anyWrite;
    }
Usage
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.

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

Definition at line 130 of file writeObjects.H.

Member Enumeration Documentation

◆ writeOption

enum writeOption
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.

Constructor & Destructor Documentation

◆ writeObjects()

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().

Here is the call graph for this function:

◆ ~writeObjects()

~writeObjects ( )
virtual

Destructor.

Definition at line 149 of file writeObjects.C.

Member Function Documentation

◆ TypeName()

TypeName ( "writeObjects"  )

Runtime type information.

◆ read()

bool read ( const dictionary dict)
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().

Here is the call graph for this function:

◆ execute()

bool execute ( )
virtual

Do nothing.

Implements functionObject.

Definition at line 184 of file writeObjects.C.

◆ write()

bool write ( )
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().

Here is the call graph for this function:

Member Data Documentation

◆ writeOptionNames_

Definition at line 148 of file writeObjects.H.

Referenced by NamedEnum< directionType, 3 >::names().


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