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 }
 

Public Member Functions

 TypeName ("writeObjects")
 
 writeObjects (const word &name, const Time &runTime, const dictionary &dict)
 
virtual ~writeObjects ()=default
 
virtual bool read (const dictionary &)
 
virtual bool execute ()
 
virtual bool write ()
 
- Public Member Functions inherited from functionObject
 declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict))
 
 functionObject (const word &name, const bool withNamePrefix=defaultUseNamePrefix)
 
autoPtr< functionObjectclone () const
 
virtual ~functionObject ()=default
 
virtual const wordtype () const =0
 
const wordname () const noexcept
 
bool useNamePrefix () const noexcept
 
bool useNamePrefix (bool on) noexcept
 
virtual bool execute (const label subIndex)
 
virtual bool end ()
 
virtual bool adjustTimeStep ()
 
virtual bool filesModified () const
 
virtual void updateMesh (const mapPolyMesh &mpm)
 
virtual void movePoints (const polyMesh &mesh)
 

Static Public Attributes

static const Enum< writeOptionwriteOptionNames_
 
- Static Public Attributes inherited from functionObject
static int debug
 
static bool postProcess
 
static bool defaultUseNamePrefix
 
static word outputPrefix
 

Additional Inherited Members

- Static Public Member Functions inherited from functionObject
static autoPtr< functionObjectNew (const word &name, const Time &runTime, const dictionary &dict)
 
- Public Attributes inherited from functionObject
bool log
 
- Protected Member Functions inherited from functionObject
word scopedName (const word &name) const
 

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
Usage
Example of function object specification:
writeObjects1
{
    type        writeObjects;
    libs        (utilityFunctionObjects);
    ...
    objects     (obj1 obj2);
    writeOption anyWrite;
}

Where the entries comprise:

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::timeControl
Source files

Definition at line 135 of file writeObjects.H.

Member Enumeration Documentation

◆ writeOption

Enumerator
AUTO_WRITE 
NO_WRITE 
ANY_WRITE 

Definition at line 145 of file writeObjects.H.

Constructor & Destructor Documentation

◆ writeObjects()

writeObjects ( const word name,
const Time runTime,
const dictionary dict 
)

Definition at line 60 of file writeObjects.C.

References dict, and Foam::blockMeshTools::read().

Here is the call graph for this function:

◆ ~writeObjects()

virtual ~writeObjects ( )
virtualdefault

Member Function Documentation

◆ TypeName()

TypeName ( "writeObjects"  )

◆ read()

bool read ( const dictionary dict)
virtual

Reimplemented from functionObject.

Definition at line 83 of file writeObjects.C.

References dict, Enum::getOrDefault(), functionObject::read(), List::resize(), and writeObjects::writeOptionNames_.

Here is the call graph for this function:

◆ execute()

bool execute ( )
virtual

Implements functionObject.

Definition at line 112 of file writeObjects.C.

◆ write()

bool write ( )
virtual

Member Data Documentation

◆ writeOptionNames_

Definition at line 152 of file writeObjects.H.

Referenced by writeObjects::read().


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