Loading...
Searching...
No Matches
writeObjects Class Reference

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

#include <writeObjects.H>

Inheritance diagram for writeObjects:
Collaboration diagram for writeObjects:

Public Types

enum  writeOption { NO_WRITE , AUTO_WRITE , ANY_WRITE , LOG }
 Re-enumeration defining the write options, Naming based on the IOobjectOption::writeOption. More...

Public Member Functions

 TypeName ("writeObjects")
 Runtime type information.
 writeObjects (const word &name, const Time &runTime, const dictionary &dict)
 Construct from name, Time and dictionary.
virtual ~writeObjects ()=default
 Destructor.
virtual bool read (const dictionary &)
 Read the function-object dictionary.
virtual bool execute ()
 Execute the function-object operations (no-op).
virtual bool write ()
 Write the function-object results.
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)
 Construct from components.
autoPtr< functionObjectclone () const
 Return clone.
virtual ~functionObject ()=default
 Destructor.
virtual const wordtype () const =0
 Runtime type information.
const wordname () const noexcept
 Return the name of this functionObject.
bool useNamePrefix () const noexcept
 Return the flag for adding a scoping name prefix.
bool useNamePrefix (bool on) noexcept
 Modify the flag for adding a scoping name prefix.
virtual bool execute (const label subIndex)
 Execute using the specified subIndex.
virtual bool end ()
 Called when Time::run() determines that the time-loop exits.
virtual bool adjustTimeStep ()
 Called at the end of Time::adjustDeltaT() if adjustTime is true.
virtual bool filesModified () const
 Did any file get changed during execution?
virtual void updateMesh (const mapPolyMesh &mpm)
 Update for changes of mesh.
virtual void movePoints (const polyMesh &mesh)
 Update for changes of mesh.

Static Public Attributes

static const Enum< writeOptionwriteOptionNames_
 Names for writeOption.
Static Public Attributes inherited from functionObject
static int debug
 Flag to execute debug content.
static bool postProcess
 Global post-processing mode switch.
static bool defaultUseNamePrefix
 Global default for useNamePrefix.
static word outputPrefix
 Directory prefix.

Additional Inherited Members

Static Public Member Functions inherited from functionObject
static autoPtr< functionObjectNew (const word &name, const Time &runTime, const dictionary &dict)
 Select from dictionary, based on its "type" entry.
Public Attributes inherited from functionObject
bool log
 Flag to write log into Info.
Protected Member Functions inherited from functionObject
word scopedName (const word &name) const
 Return a scoped (prefixed) name.

Detailed Description

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

Usage
Minimal example by using system/controlDict.functions:
writeObjectsFO
{
    // Mandatory entries
    type          writeObjects;
    libs          (utilityFunctionObjects);

    // Optional entries
    writeOption   <word>;

    // Conditional entries

        // Option-1
        field     <word>;

        // Option-2
        fields    (<wordRes>);

        // Option-3
        objects   (<wordRes>);

    // Inherited entries
    ...
}

where the entries mean:

Property Description Type Reqd Deflt
type Type name: writeObjects word yes -
libs Library name: utilityFunctionObjects word yes -
writeOption Select objects with the specified write mode no anyWrite
field Name of field to write word no -
fields Names of fields to write wordRes no -
objects Names of objects to write wordRes no -

Options for the writeOption entry:

$      autoWrite $=Objects set to write at output time
$      noWrite   $=Objects set to not write by default
$      anyWrite  $=Any option of the previous two
$      log       $=Only report registered objects without writing objects

The inherited entries are elaborated in:

Source files

Definition at line 166 of file writeObjects.H.

Member Enumeration Documentation

◆ writeOption

Re-enumeration defining the write options, Naming based on the IOobjectOption::writeOption.

Enumerator
NO_WRITE 
AUTO_WRITE 
ANY_WRITE 
LOG 

Definition at line 178 of file writeObjects.H.

Constructor & Destructor Documentation

◆ writeObjects()

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

Construct from name, Time and dictionary.

Definition at line 76 of file writeObjects.C.

References ANY_WRITE, dict, functionObject::functionObject(), functionObject::name(), read(), runTime, and setRegistry().

Here is the call graph for this function:

◆ ~writeObjects()

virtual ~writeObjects ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "writeObjects" )

Runtime type information.

References dict, functionObject::name(), and runTime.

Here is the call graph for this function:

◆ read()

bool read ( const dictionary & dict)
virtual

Read the function-object dictionary.

Reimplemented from functionObject.

Definition at line 94 of file writeObjects.C.

References ANY_WRITE, dict, functionObject::read(), and writeOptionNames_.

Referenced by writeObjects().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ execute()

bool execute ( )
virtual

Execute the function-object operations (no-op).

Implements functionObject.

Definition at line 126 of file writeObjects.C.

◆ write()

Member Data Documentation

◆ writeOptionNames_

Names for writeOption.

Definition at line 189 of file writeObjects.H.

Referenced by read(), and write().


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