Allows specification of different writing frequency of objects registered to the database. More...
#include <writeObjects.H>


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< functionObject > | clone () const |
| Return clone. | |
| virtual | ~functionObject ()=default |
| Destructor. | |
| virtual const word & | type () const =0 |
| Runtime type information. | |
| const word & | name () 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< writeOption > | writeOptionNames_ |
| 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< functionObject > | New (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. | |
Allows specification of different writing frequency of objects registered to the database.
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:
![]() | = | Objects set to write at output time |
![]() | = | Objects set to not write by default |
![]() | = | Any option of the previous two |
![]() | = | Only report registered objects without writing objects |
The inherited entries are elaborated in:
Definition at line 166 of file writeObjects.H.
| enum 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.
| 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().

|
virtualdefault |
Destructor.
| TypeName | ( | "writeObjects" | ) |
Runtime type information.
References dict, functionObject::name(), and runTime.

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


|
virtual |
Execute the function-object operations (no-op).
Implements functionObject.
Definition at line 126 of file writeObjects.C.
|
virtual |
Write the function-object results.
Implements functionObject.
Definition at line 132 of file writeObjects.C.
References bitSet::any(), ANY_WRITE, AUTO_WRITE, IOobjectOption::AUTO_WRITE, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::flatOutput(), forAllConstIters, Foam::ListOps::found(), LOG, Log, IOobject::name(), name, Foam::nl, NO_WRITE, IOobjectOption::NO_WRITE, bitSet::set(), Foam::subset(), Foam::type(), WarningInFunction, regIOobject::write(), IOobjectOption::writeOpt(), and writeOptionNames_.

|
static |
Names for writeOption.
Definition at line 189 of file writeObjects.H.