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


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. More... | |
| writeObjects (const word &name, const Time &runTime, const dictionary &dict) | |
| Construct from Time and dictionary. More... | |
| virtual | ~writeObjects ()=default |
| 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 | |
| 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. More... | |
| autoPtr< functionObject > | clone () const |
| Return clone. More... | |
| virtual | ~functionObject ()=default |
| Destructor. More... | |
| virtual const word & | type () const =0 |
| Runtime type information. More... | |
| const word & | name () const noexcept |
| Return the name of this functionObject. More... | |
| bool | useNamePrefix () const noexcept |
| Return the flag for adding a scoping name prefix. More... | |
| bool | useNamePrefix (bool on) noexcept |
| Modify the flag for adding a scoping name prefix. More... | |
| virtual bool | execute (const label subIndex) |
| Execute using the specified subIndex. More... | |
| virtual bool | end () |
| Called when Time::run() determines that the time-loop exits. More... | |
| virtual bool | adjustTimeStep () |
| Called at the end of Time::adjustDeltaT() if adjustTime is true. More... | |
| virtual bool | filesModified () const |
| Did any file get changed during execution? 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... | |
Static Public Attributes | |
| static const Enum< writeOption > | writeOptionNames_ |
| Names for writeOption. More... | |
Static Public Attributes inherited from functionObject | |
| static int | debug |
| Flag to execute debug content. More... | |
| static bool | postProcess |
| Global post-processing mode switch. More... | |
| static bool | defaultUseNamePrefix |
| Global default for useNamePrefix. More... | |
| static word | outputPrefix |
| Directory prefix. More... | |
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. More... | |
Public Attributes inherited from functionObject | |
| bool | log |
| Flag to write log into Info. More... | |
Protected Member Functions inherited from functionObject | |
| word | scopedName (const word &name) const |
| Return a scoped (prefixed) name. More... | |
Allows specification of different writing frequency of objects registered to the database.
system/controlDict.functions: writeObjects1
{
// 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 Time and dictionary.
Definition at line 77 of file writeObjects.C.
References dict, and Foam::blockMeshTools::read().

|
virtualdefault |
Destructor.
| TypeName | ( | "writeObjects" | ) |
Runtime type information.
|
virtual |
Read the writeObjects data.
Reimplemented from functionObject.
Definition at line 94 of file writeObjects.C.
References dict, UList< T >::first(), Enum< EnumType >::getOrDefault(), functionObject::read(), List< T >::resize(), and writeObjects::writeOptionNames_.

|
virtual |
|
virtual |
Write the registered objects.
Implements functionObject.
Definition at line 132 of file writeObjects.C.
References IOobjectOption::AUTO_WRITE, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::flatOutput(), forAllConstIters(), Foam::ListOps::found(), Log, Foam::name(), IOobject::name(), Foam::nl, IOobjectOption::NO_WRITE, Foam::BitOps::select(), bitSet::set(), Foam::subset(), Foam::type(), WarningInFunction, regIOobject::write(), and IOobjectOption::writeOpt().

|
static |
Names for writeOption.
Definition at line 189 of file writeObjects.H.
Referenced by writeObjects::read().